Skip to content

test(helpers): shared helpers for the formerly held checks-lane test files - #3246

Merged
freeqaz merged 4 commits into
mainfrom
test-dry-1022g-a
Oct 23, 2026
Merged

freeqaz merged 4 commits into
mainfrom
test-dry-1022g-a

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The test files held back while the Credential Proxy stack was open still carried their own copies of logic that
tests/helpers/ already provides: mkdtemp + t.after(rm) pairs, a private selfSignedCertificate openssl
wrapper, private listen and waitFor functions, hand-rolled poll loops and a hand-written command stand-in.

Change

Test-only. The formerly held files in the checks lanes (checks-baseline-1, checks-baseline-2, checks-browser) now use
the shared helpers:

  • temporaryDirectory(t, prefix): 32 sites in 14 files (kubernetes-client x11, configuration-controller x4,
    repository-credentials-config x3, repository-credentials-package x3, skipper-private-git-origin x2, and one each in
    kubernetes-configuration, openshell-prepared-git-provider, repository-credentials-registry,
    repository-credentials-source-boundary, common-logging, egress-enrollment and the harness-tls, static-egress and
    protected-driver-package helpers).
  • selfSigned (certificates.mjs): kubernetes-client's private openssl wrapper (CN kept as the certificate's name,
    which the API server stand-in records per connection), the static-egress fixture certificate (its PEM text is
    reused as Buffers for gRPC, no second read) and repository-credentials-client-config's native Git peer.
  • listen (listen.mjs): static-egress's private copy and its raw TCP origin, kubernetes-client's API server
    stand-ins, egress-connected-preflight, protected-driver-registration, egress-enrollment (was importing the
    container-mounted process.mjs copy).
  • waitUntil (wait-for.mjs): kubernetes-client's private waitFor, repository-credentials-package's two start
    polls, skipper-private-git-origin's discovery poll and repository-credentials-driver's disposal poll.
  • writeCommand (fake-commands.mjs): egress-enrollment's codex stand-in (PATH stays the stand-in directory plus
    Node only, as before).

Kept as is: harness-tls's CA and leaf generation (callers sign extra leaves with ca.key/ca.pem in its directory),
kubernetes-client's CONNECT proxy (it tracks tunnel sockets too), and repository-credentials-package's RSA
certificate for the detached runtime.

Verification

  • Mutants planted in the code under test, run on main (1545c3b) and on this branch with the same files: identical
    per-test kill sets for all 20 (redirect following, keep-alive, provisioning cancellation, protected-file and
    registry checks, the detached service's start event, the boundary verifier's symlink check, native Git redirect
    defaults, egress enrollment revision binding, authority TLS, filesystem Configuration validation, prepared Git CAS,
    connected-request redirect, default log level, the private origin's held discovery, session disposal; the last
    hangs the driver test on both sides). The 9 static-egress callers were rerun after the review nits: identical,
    365/365, 51.0 s on main vs 48.2 s here.
  • The 22 touched and helper-dependent files: 925/925 passing on both sides, wall 48.5 s on main vs 47.6 s here;
    the 8-file subset 453/453, 10.4 s on both.
  • Touched test files, plus the static-egress helper's heaviest callers, pinned 20/20 at 2 CPUs (taskset), in
    seven groups; mean group walls 9-58 s.
  • eslint and prettier clean on the touched files; tsc --build tests/tsconfig.json reports nothing new.

Risks

Test-only. Failure messages from the converted polls now read "Timed out waiting for ...". Certificates from
selfSigned are P-256 rather than RSA in static-egress and the client-config Git peer; every suite that uses them
passed locally.

…ed test helpers

temporaryDirectory for 26 temp-dir sites, selfSigned for the kubernetes-client and static-egress
certificates, listen for local fixture servers, waitUntil for hand-rolled polls, writeCommand for
the egress-enrollment codex stand-in.
@freeqaz
freeqaz requested a review from a team as a code owner October 23, 2026 00:23
@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces duplicated test setup, certificate generation, server cleanup, polling, and command scaffolding with existing shared helpers.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused cleanup supported by preserved assertions and relevant exact-head CI, with no introduced defect identified.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored, test-only cleanup changes fixture plumbing; relevant exact-head CI passed, and the body reports matching mutation kill sets, without a new shipped behavior requiring media proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Contributors maintain duplicate fixture plumbing across related suites.
Reason: The maintainer-authored change continues established helper consolidation and preserves independent behavioral assertions.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR is useful, focused test cleanup with no actionable defect found; PostgreSQL Platform CI remains in progress.

Priority: P3
Reviewed head: 9e8be56721a65c93eef4c8e87449f166cc1e6a21

Before merge

None.

Findings

None.

Agent review details

How this fits together

Conformance and integration tests use these helpers to create temporary files, loopback peers, certificates, and command fixtures, then exercise existing controller and Driver behavior.

flowchart TB
 Runner[Test runner] --> Tests[Conformance and integration tests]
 Tests --> Helpers[Shared test helpers]
 Helpers --> Fixtures[Temporary files and loopback peers]
 Tests --> Owners[Controller and Driver implementations]
 Fixtures --> Owners
 Owners --> Assertions[Existing behavioral assertions]
Loading

Technical review

Best possible solution:

Land the existing helper consolidation after the remaining required CI completes successfully.

Do we have a high-confidence way to reproduce the issue?

This is test maintenance rather than a product bug; source inspection confirms the duplicated setup on current main.

Is this the best way to solve the issue?

Reusing existing helpers is the smallest complete cleanup, while retaining specialized certificate and CONNECT-proxy setup where callers require it.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9c10e6d57133.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit c8e5e2a adds tests/helpers/listen.mjs:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c8e5e2a9d412; files: tests/helpers/listen.mjs)

Review metrics

Metric Value Why it matters
Change footprint Production +0/-0; tests and helpers +150/-342 Removes 192 net lines by reusing established helpers without adding another abstraction.

Labels

Label changes:

  • add P3: Test maintenance reduces duplication without changing supported product behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Test maintenance reduces duplication without changing supported product behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 8:36 PM ET / October 23, 2026, 00:36 UTC.

…ess, report the exit code on the control-socket wait
@freeqaz

freeqaz commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@freeqaz
freeqaz merged commit 8531fc7 into main Oct 23, 2026
41 of 43 checks passed
@freeqaz
freeqaz deleted the test-dry-1022g-a branch October 23, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant