Repository navigation
test(agents): prepare config in lane and finalization fixtures - #170447
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. What this changesThis PR prepares runtime config in lane-controller fixtures and supplies explicit config to the unavailable-finalization fixture. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs concrete fixture failures under the prepared-config contract without changing production behavior or weakening assertions; no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherEmbedded-runner tests invoke lane admission and settled-turn finalization directly, so their fixtures must supply config normally prepared during Gateway startup. flowchart TD
A[Test fixtures] --> B[Prepared runtime config]
A --> C[Lane controller]
B --> D[Session placement admission]
C --> D
A --> E[Settled turn finalization]
E --> F[Transcript persistence]
Technical reviewBest possible solution: Retain this focused fixture repair while preserving the prepared-only production contract and all existing behavioral assertions. Do we have a high-confidence way to reproduce the issue? Source tracing establishes how unprepared config prevents lane entry and fallback transcript ownership; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch supplies missing inputs at the fixture boundary, follows an existing sibling pattern, and leaves production validation and authority checks intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 78c03ce66050. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +13. Total +13 across 3 files. Added test files: 0. View PR surface stats
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 12, 2026, 8:34 PM ET / October 13, 2026, 00:34 UTC. |
…law#170447) ## What Problem This Solves Three direct embedded-runner fixtures omit config preparation after 5dbf215 (openclaw#169714) made runtime config reads use prepared snapshots. They bypass Gateway startup, so queue admission can reject before the test task starts, and fallback finalization can leave transcript ownership unset. Publish each lane fixture's effective config when constructing its controller and clear it during existing cleanup. Supply explicit config to the unavailable-finalization attempt. All assertions, deadlines, authority checks, and production behavior remain intact. Three test files; **+13 / -0 lines**. ## Evidence [Scheduled CI run 38322669274, job 115054342681](https://github.com/openclaw/openclaw/actions/runs/38322669274/job/115054342681), at `3272d64317f9c3020301f0a9718b92a5f038f054`, records: - 18 attempt-controls cases timing out before lane entry. - Two lane-controller cases failing with early lease release or timeout, alongside `Runtime config is not prepared` at `runtime-snapshot.ts:397` through `lane-controller.ts:374`. - Unavailable finalization receiving `assistantTranscriptOwned: undefined` instead of `true`. The affected fixtures and seven relevant owner/helper files are unchanged through `a4bd85e2ec974228d49631e98ddf22113e58ed1e`. The timeout/finalization causal link is source-attributed; the candidate results below validate the repaired fixture paths. The passing queue-liveness sibling already uses the same config setup and cleanup pattern. Focused formatting, basic lint, diff checks and isolated Codex review (P0–P2) pass. The complete selected CI run passed: 19 successful and 29 skipped jobs, including the CI gate and all selected static checks. The passing queue-liveness sibling is the existing setup pattern. No production, SQL/T1, schema, SDK, update or service-lifecycle change. [Candidate CI 38327432386](https://github.com/openclaw/openclaw/actions/runs/38327432386/job/115069548906) passed all three changed files: lane-controller 6/6, attempt-controls 18/18, and unavailable-finalization 1/1, **25/25 total in 33.80 seconds**. Actual checkout `508d8042` integrates candidate `26906ccac4d091b60392e14e6941a15433bb3117` with main `2520b1bd2e67480cd9286ea258a8a94ee9ea0141`. This is the selected CI runner duration, not a separate local test timing. Static scope: only test setup changes. The two added imports consume existing config-snapshot exports; no production import/export, SQL, database-worker, SDK, or dialect input changes. Broader Madge/Knip scans skipped by this PR plan are not claimed as executed passes. The selected type-aware lint, test types, source contracts, and baseline-ratchet jobs qualify the changed files.
…re (#170630) #170447 and #170433 both repaired the same #169714 fallout in three embedded-agent fixtures, and both landed. Keep #170447's run-level owner, which follows each run's authored config, and drop #170433's redundant beforeEach publishes. The lane-controller fixtures keep their controller-factory publish and single afterEach clear. The settled-turn fixture keeps config: {} in its run params. Without both that and the publish it fails with assistantTranscriptOwned undefined; with config alone it passes and no snapshot is published, so its clear and import are dropped as dead. Assertions, timeouts and cases are unchanged; all three files now match #170447's post-images.
…re (openclaw#170630) openclaw#170447 and openclaw#170433 both repaired the same openclaw#169714 fallout in three embedded-agent fixtures, and both landed. Keep openclaw#170447's run-level owner, which follows each run's authored config, and drop openclaw#170433's redundant beforeEach publishes. The lane-controller fixtures keep their controller-factory publish and single afterEach clear. The settled-turn fixture keeps config: {} in its run params. Without both that and the publish it fails with assistantTranscriptOwned undefined; with config alone it passes and no snapshot is published, so its clear and import are dropped as dead. Assertions, timeouts and cases are unchanged; all three files now match openclaw#170447's post-images.
What Problem This Solves
Three direct embedded-runner fixtures omit config preparation after 7e48efb (#169714) made runtime config reads use prepared snapshots. They bypass Gateway startup, so queue admission can reject before the test task starts, and fallback finalization can leave transcript ownership unset.
Publish each lane fixture's effective config when constructing its controller and clear it during existing cleanup. Supply explicit config to the unavailable-finalization attempt. All assertions, deadlines, authority checks, and production behavior remain intact. Three test files; +13 / -0 lines.
Evidence
Scheduled CI run 38322669274, job 115054342681, at
96db2f6dfa4f47fd579a6d8408011950b8af53e1, records:Runtime config is not preparedatruntime-snapshot.ts:397throughlane-controller.ts:374.assistantTranscriptOwned: undefinedinstead oftrue.The affected fixtures and seven relevant owner/helper files are unchanged through
4ca02f6c720e6346a0d57b158cc38484fdf5c8da. The timeout/finalization causal link is source-attributed; the candidate results below validate the repaired fixture paths. The passing queue-liveness sibling already uses the same config setup and cleanup pattern.Focused formatting, basic lint, diff checks and isolated Codex review (P0–P2) pass. The complete selected CI run passed: 19 successful and 29 skipped jobs, including the CI gate and all selected static checks. The passing queue-liveness sibling is the existing setup pattern. No production, SQL/T1, schema, SDK, update or service-lifecycle change.
Candidate CI 38327432386 passed all three changed files: lane-controller 6/6, attempt-controls 18/18, and unavailable-finalization 1/1, 25/25 total in 33.80 seconds. Actual checkout
508d8042integrates candidate26906ccac4d091b60392e14e6941a15433bb3117with main2403bfa7969510852b44dad28fd9918d793decdd. This is the selected CI runner duration, not a separate local test timing.Static scope: only test setup changes. The two added imports consume existing config-snapshot exports; no production import/export, SQL, database-worker, SDK, or dialect input changes. Broader Madge/Knip scans skipped by this PR plan are not claimed as executed passes. The selected type-aware lint, test types, source contracts, and baseline-ratchet jobs qualify the changed files.