Repository navigation
refactor(test): share requester and session transcript fixtures - #159372
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 maintainer review before merge. Reviewed September 26, 2026, 11:25 PM ET / September 27, 2026, 03:25 UTC. ClawSweeper reviewWhat this changesMoves requester-input and terminal session-transcript fixtures from two test files into their existing shared test-support modules. Merge readiness✅ Ready for maintainer review Keep open. Current main does not contain this fixture move, and the verified test merge retains it. The moved helpers preserve their values, write order, and existing callers; I found no actionable patch defect. Priority: P3 Review scores
Verification
How this fits togetherAgent MCP tests use requester fixtures to exercise session-scoped server runtimes. Reply-session tests use a transcript fixture to seed session state before checking lifecycle behavior; this PR changes test support only. flowchart LR
A[Requester test cases] --> B[Shared MCP fixture]
B --> C[MCP runtime tests]
D[Session lifecycle cases] --> E[Shared transcript fixture]
E --> F[Session store and transcript]
F --> G[Reply session tests]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +4. Total +4 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Preserve these fixture semantics as later scheduler tests adopt the shared helpers, and validate scheduler lifecycle behavior with the production cutover. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reports no user-facing bug; the relevant check is whether the moved fixture definitions and callers match current main. Is this the best way to solve the issue? Yes: the existing test-support modules are the narrow owners for these shared fixtures, and the patch preserves their behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a6b5ed882cb5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Prepare the existing MCP requester and session transcript fixtures for the remaining scheduler cutover without mixing fixture reorganization into production lifecycle changes.
User Impact and Update Behavior
No production or test behavior changes. Existing installs, state, configuration, ports, storage, schemas and public SDK contracts are unchanged; no migration is required.
Why This Change Was Made
Move
makeRequesterParamsinto the existing MCP manager test-support module andwriteTerminalTranscriptSessionStoreinto the existing session test-support module. Their current tests import and use the helpers in this same slice. Fixture values, transcript/registry write ordering, assertions and cleanup are unchanged. The original in-file definitions are deleted; this slice adds no scheduler, timing change or assertion.LOC: production +0/−0/net 0; tests/support +62/−58/net +4; docs +0/−0/net 0. The 120 changed lines are the helper moves, imports and one derived parameter type.
Evidence
Focused proof used blacksmith-testbox, lease
tbx_01m3fqja9r983kwbphpb3v3g5g, run 36270738491. Both files passed after frozen installation: 334 cases in 121.067 s command wall. Each ran aspnpm test <file> --maxWorkers=1.src/agents/agent-bundle-mcp-runtime.test.tssrc/auto-reply/reply/session.test.tsThese existing suites cover MCP runtime/process lifecycle and persisted session/transcript transitions through their current owners; no cases or process boots were added. Their full-file costs are retained rather than adding duplicate extraction tests. The receipts pin source head
789dae3c09d9b621a781f3d3c7e65aac2ff39d18and tree0bf241b0b8bfd776488d552d6fa861dc7b89fd3b. All four changed files are byte-identical to that proved stage. The standalone publication rebase onto fresh main preserves the exact reviewed patch and drops unrelated diagnostic/auth ancestors; historical proof is not described as a run of this new publication head.Deslop, cross-shard caller search and
git diff --checkpassed. Independent Codex review through P2 had no accepted/actionable findings; its exact unchanged fixture payload is reused. Requiredopenclaw/ci-gatevalidates the published composition. Exact-head CI run 36291139075 passed onf79567cfdf894113d7897f2ca68beef237a7cbf3in 760 s workflow elapsed, including the enforcedopenclaw/ci-gate. Auto-merge landed66dae510ea24dfee512a0dde66c4ad990ab6e86b, verified on freshorigin/main.Stack
This behavior-neutral preparation can land independently before diagnostic/auth work. Preceding slices include session delivery #159275, update watcher #159291 and update campaign #159306. Remaining slices cover diagnostic/CLI/SDK lifetime, auth pruning, CLI settlement, the required MCP scheduler cutover, and final timer census/docs. The final Gateway/cron/suspend/restart/shutdown proof belongs to merged main after those production slices land.
Merged scheduler slices