Repository navigation
test(helpers): share helmTemplate and let waitFor retry errors - #3194
Conversation
Move the byte-identical helmTemplate copies from profile-renderer and profile-public-github-read into production-chart.mjs. Add retryErrors to waitFor: every error counts as not yet, and the timeout reports the last one. The runtime image fixture's process-group settle loop uses it.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
…ause Review nit: the timeout message carried only the error's text. Keep the error itself as cause, and say that it may come from an earlier read.
|
Codex review: needs maintainer review before merge. What this changesThis PR shares the profile tests’ Helm renderer and adds optional error retries to the common polling helper. Example: A detached process group remains active after the fixture’s 3-second settling deadline.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open for maintainer triage: it provides focused test-helper consolidation, and no actionable defect was found in the introduced changes. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThese test helpers turn rendered profile values into Helm manifests and poll fixture observations until success or a deadline; they do not change deployed platform behavior. flowchart TD
A[Profile tests] --> B[Shared Helm helper]
B --> C[Helm chart rendering]
C --> D[Manifest assertions]
E[Process group fixture test] --> F[Shared waiter]
F --> G[Process group observation]
Technical reviewBest possible solution: Use the existing chart-helper and waiter owners while retaining profile assertions, default error propagation, and bounded process-group observation. Do we have a high-confidence way to reproduce the issue? This is a test-maintenance refactor rather than a product bug report; source confirms the duplicated renderers and retry loop, and no target code was run during review. Is this the best way to solve the issue? The extraction uses existing helper owners, preserves Helm argument precedence and refusal behavior, and keeps error retries explicit. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dd8706ff9ed3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 7:09 AM ET / 11:09 UTC. |
Problem
profile-rendererandprofile-public-github-readeach carry a byte-identicalhelmTemplate(output, extraValueFiles, releaseName, extraArgs)(22 lines). The sharedwaitForfails at once on any error, so loops that treat errors as "not yet" keep their own deadline and last-error code (test DRY survey clusters 10 and 8).Change
tests/helpers/production-chart.mjsexportshelmTemplate(same arguments andexecFileSyncoptions, plus the module'sGOGC=offtool environment). Both profile files import it; their call sites are unchanged.profile-public-github-readalso importschartToolingstatically instead of through a dynamic import.waitFor(description, read, { retryErrors: true })treats every error fromreadas "not yet" and appends the most recent one to the timeout message (and keeps it ascause). Without the option nothing changes.tests/helpers/runtime-image-fixture.test.mjs: the process-group settle loop now uses it (3 s, 25 ms, as before). A timeout now readsTimed out waiting for the detached process group to settle. Last error: ...instead of the raw last error.profile-preflight-chart-parity'shelmTemplateis a different function (async, returns{ ok, output }for refused renders). The remaining retry-on-error copies need a model key, a runtime image or a cluster, or are held for another PR: docker-compute-real, docker-compute-token-retry, kubernetes-client, logging-otel-observation.Verification
All runs compared against a main worktree at 2bc826a.
automountServiceAccountToken: true, a constant installation checksum annotation, andassertProcessGroupSettlednever seeingESRCH). The same test cases fail on main and on the branch for each.cause, and the doc says the reported error may come from an earlier read. MB3 re-run on the new head: same kill, and runtime-image-fixture.test 20/20 again.Risks
Test-only. The shared
helmTemplatenow runs Helm withGOGC=off, as every other render inproduction-chart.mjsalready does; the output does not change.