Repository navigation
refactor(test): share core process-result fixtures - #174149
Conversation
|
🦞👀 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. |
|
Codex review: needs changes before merge. What this changesThis PR replaces four identical process-result fixture builders with one shared test utility while preserving existing exports. Example: A test requests a failed command result with code 2 and stderr "config preflight failure".
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-authored PR makes a useful, behavior-preserving fixture consolidation with no actionable code findings; required CI remains unresolved. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherGateway worker and npm installer tests feed command-result overrides into a test-only builder that returns SpawnResult fixtures for their existing runners and assertions. flowchart TD
A[Worker bootstrap tests] --> E[Shared process result fixture]
B[Crabbox preflight tests] --> E
C[Workspace synchronization tests] --> E
D[Npm install and update tests] --> E
E --> F[SpawnResult fixtures]
F --> G[Existing runners and assertions]
Technical reviewBest possible solution: Land the shared fixture consolidation after the remaining failed CI gate is resolved through the repository’s supported landing policy. Do we have a high-confidence way to reproduce the issue? There is no reported product defect to reproduce; source inspection confirms four identical fixture builders and unchanged caller behavior. Is this the best way to solve the issue? A pure shared builder is appropriately scoped, preserves existing imports and override precedence, and avoids pulling npm-specific test dependencies into Gateway fixtures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fa191c5ce97f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests -29. Total -29 across 5 files. Added test files: 1. View PR surface stats
LabelsLabel changes: No label 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 16, 2026, 8:37 AM ET / 12:37 UTC. |
|
Merged via squash.
|
…restoration-ci-189390-20261127 * commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits) fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341) refactor(codex): centralize native completion delivery (#206447) fix(subagents): finish claimed stops after session rotation (#206405) fix: let owners fork a chat with exec after a subagent or exec completion (#206483) test(cli): gate agent --local cold-start processes and workers (#206466) perf(ci): skip baseline inventory when line-cap debt is empty (#189909) refactor(test): share core process-result fixtures (#174149) refactor(ci): reuse canonical budget flag parsing (#189480) fix: recover Codex chats after oversized requests (#206475) fix(agents): skip the bootstrap ritual in one-shot runs (#206477) fix(test): preserve stack coordinates in redacted failure reports (#152384) fix(gateway): return consistent unavailable response guidance (#191933) fix: preserve emphasis in Markdown table row labels (#205349) fix(nextcloud-talk): keep webhook spool helpers private (#206470) perf(plugins): overlay native receipts once per visible root (#206464) fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129) perf(config): retain one snapshot for unchanged validation results (#206465) refactor(test): reuse canonical secret fixture cleanup (#189492) refactor(subagents): own descendant Stop cancellation (#206444) refactor(subagents): keep announce cleanup action type private (#206407) ...
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (2115 commits) fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485) fix(ci): update iOS screenshot reducer gate (#206497) fix: keep chat photo previews sharp within their byte limits (#206461) fix: let agents use short Workboard card IDs fix(tui): run provider sign-in in the local TUI (#200605) improve(config): reduce repeated directory checks for larger agent rosters (#206494) perf(test): reuse the Periphery producer workflow snapshot (#189681) fix(ci): keep locale assets within the installed package budget (#206492) fix: preserve failed Apple chat messages across partial history pages (#205404) improve: avoid merging unrelated settings for agent directory lookups (#206489) fix: show typing while a queued follow-up turn runs (#201920) fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341) refactor(codex): centralize native completion delivery (#206447) fix(subagents): finish claimed stops after session rotation (#206405) fix: let owners fork a chat with exec after a subagent or exec completion (#206483) test(cli): gate agent --local cold-start processes and workers (#206466) perf(ci): skip baseline inventory when line-cap debt is empty (#189909) refactor(test): share core process-result fixtures (#174149) refactor(ci): reuse canonical budget flag parsing (#189480) fix: recover Codex chats after oversized requests (#206475) ...
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (923 commits) fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485) fix(ci): update iOS screenshot reducer gate (#206497) fix: keep chat photo previews sharp within their byte limits (#206461) fix: let agents use short Workboard card IDs fix(tui): run provider sign-in in the local TUI (#200605) improve(config): reduce repeated directory checks for larger agent rosters (#206494) perf(test): reuse the Periphery producer workflow snapshot (#189681) fix(ci): keep locale assets within the installed package budget (#206492) fix: preserve failed Apple chat messages across partial history pages (#205404) improve: avoid merging unrelated settings for agent directory lookups (#206489) fix: show typing while a queued follow-up turn runs (#201920) fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341) refactor(codex): centralize native completion delivery (#206447) fix(subagents): finish claimed stops after session rotation (#206405) fix: let owners fork a chat with exec after a subagent or exec completion (#206483) test(cli): gate agent --local cold-start processes and workers (#206466) perf(ci): skip baseline inventory when line-cap debt is empty (#189909) refactor(test): share core process-result fixtures (#174149) refactor(ci): reuse canonical budget flag parsing (#189480) fix: recover Codex chats after oversized requests (#206475) ...
Current branch qualification
The branch now includes
4e766e6e61baaf7c2dc309ee943e7f9baa7aa557. Since the original qualification, main consolidated the provider's duplicate fixture constructor. Its current preflight test is preserved byte-for-byte. The bootstrap and workspace-sync fixtures now load the sharedSpawnResulthelper directly, and the npm installer helper keeps its existing export. Seven combinations of defaults and overrides matched both previous constructors, including signal termination, command timeout and truncated output. Each call returned a fresh object. Production files are unchanged. The historical E2E findings below concern the older head.On this head, CI and Darwin tooling passed. The current local test-line check passed with 13 fewer counted lines.
Prior qualification
What Problem This Solves
Four core test helpers independently construct the same process-result fixture.
User Impact
No user-visible change. Existing test cases, assertions, subprocess behavior, and production code are unchanged.
Why This Change Was Made
Move the existing fixture builder into a pure test utility and reuse it from worker bootstrap, Crabbox preflight, workspace synchronization, and npm install/update helpers. Preserve defaults, override precedence, and existing helper exports. Plugin-owned fixtures remain within their package boundary.
Evidence
git diff --checkpass.57cfd91bd894008e35fd5e0b9af0ab5551105774: 119 tests across six files (82 Gateway, six update-command, 31 plugin-install). This includes real bootstrap/archive and workspace subprocess tests, provider cleanup/restart cases, and worker claim-admission ownership checks.checks-node-changed-17failsrequired-native-same-session.e2e.test.tsduring remote skill discovery withTypeError: Cannot read properties of undefined (reading 'readWorkspaceSkillsRequest');checks-node-changed-18failsskill-library-worker-wire.e2e.test.tsbecauseagent.waitforskill-library-local-firstreturns an error instead of settling successfully.unknownin the completed native classification. The failed jobs in scheduled-main run 38887900861 exercise different cases and do not establish inheritance. The newer scheduled-main run 38894297213 also has no matching Node-test failure annotation.1bd999ae494dd1cf872b31781ad503da137ec6c0has main parent11bbb8291b929db893cef5fdf91e9bb6fb9d6813and this exact PR head. Its delta from that parent is only the five intended test/support files. The failing E2E tests, runtime owners, dependency inputs, scripts, and E2E configuration are byte-identical to that parent. The native import graph finds 62 transitive test/support consumers, no production consumers, and no path to either failed E2E.qaRuntimebuild and separate per-file processes. It does not establish inherited-only attribution. Test execution passed; the wrapper initially failed during cleanup settlement, which was subsequently reconciled through the native stop route.qaRuntimebuild and native per-file shard runner on the exact main parent. The required-native case reproduced the samereadWorkspaceSkillsRequestfailure before settlement; it is inherited. The skill-library case passed in 35.1 seconds, so its inheritance remains unproven. Both files ran in separate processes, serially; the runner had 4 CPUs and 16 GB RAM versus CI's observed 2 CPUs and 8 GB. The command exited 1 with both plans completed and native lease cleanup settled.taskset, privateqaRuntimebuild, and two-CPU affinity for only the test runner and descendants. The single skill-library case passed in 43.1 seconds. The runner retained 16 GB RAM rather than CI's 8 GB; this is not a claim of identical hardware or a fix. Its initial cleanup-settlement error was reconciled through the native stop route.qaRuntimebuild passed; the single native shard passed in 38.2 seconds with Node 24.19.0 and two-CPU affinity. RAM remained 16 GB. No failure occurred, so the hook produced no underlying-error evidence. Payload exit was 0; the wrapper's cleanup-settlement failure was subsequently reconciled through the same native stop route. The diagnostic edit was not published to this PR, whose head remains unchanged.agent.wait local-firsterror. The available CI log contains only generic request-too-long text, which can also represent provider stream failures; it does not establish an elapsed timeout. The run has no available Gateway diagnostic artifact. Its underlying cause and inherited-only attribution remain unresolved. No merge or CI exception has been submitted, and neither original failure is marked fixed or waived.