Repository navigation
test: publish runtime config at fixture owners and repair remaining #169714 fallout - #170433
Conversation
The prepared config snapshot skips the former synchronous config load and its config-health initialization of the shared-state handle. Without that handle, Incognito deletion-fence checks repeatedly spawn synchronous SQLite snapshot children and exhaust the case timeout. Open the fixture-owned shared-state database explicitly, as Gateway startup does. Existing fixture teardown closes it. Preserve all nine cases, assertions, and timeouts. Validation: baseline 4 passed / 5 failed (four timeouts and one assertion); full file after the fix 9 passed in 135.07s wall time. Scoped format, lint, and independent Codex review passed. No production files changed.
…ion harness 7e48efb (#169714) made getRuntimeConfig a strict read of the published snapshot. ComposedGatewayHarness handed its config to services but never published it, so chat-event admission (resolveRestartRecoveryLifecycleState) threw "Runtime config is not prepared" inside the composed Gateway and native-worker.integration failed 6 of 9 cases on downstream admission assertions. Publish the harness config at start, as Gateway startup does, and clear it after session-state cleanup. Fold the duplicated worker handshake builder into one helper so the harness stays within its line budget.
…ture Publish the suite's Gateway config when authored and clear it after service shutdown so runtime-config readers have the same startup state as production. Remove equivalent placement dispatch/reclaim/targeted recovery, provisioning replay, and Portal policy publications and redundant per-file clears. Keep shutdown replay's post-mutation publication and all different-config overrides.
Remove duplicate fixture publishes and clears from placement abandonment, native-worker, fault-injection, and transcript-failure tests, plus the chat-abort mid-test publish. Keep chat-abort pre-harness snapshot/source restoration, distinct-config overrides, and shutdown replay post-mutation publication.
After #169714, getRuntimeConfig reads only an already published snapshot. The direct lane-controller fixtures reached that read through session placement admission without preparing config, rejecting queue tasks before their entry signals and leaving attempt-control cases to time out. The unavailable-finalization fixture also missed the snapshot during fallback transcript target resolution, so it never claimed transcript ownership. Publish each fixture's authored empty config in its file-level setup and clear it during teardown. Preserve all cases, assertions, and timeouts; leave production code and generic cold-load helpers unchanged. Validation: each file reproduced alone before and passed alone afterward with pnpm test <file> --maxWorkers=1 (6, 18, and 1 cases). Targeted typecheck, lint, formatting, diff checks, and isolated P2 autoreview passed.
|
Codex review: needs maintainer review before merge. What this changesThis PR makes shared test fixtures publish and clear their runtime config and prepares missing config and shared-state prerequisites in affected tests. Example: Run lane-controller.attempt-controls.test.ts after runtime config reads became prepared-only.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs concrete fixture failures and consolidates runtime-config ownership without weakening assertions; no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThese fixtures supply config and isolated state to production agent-admission, worker-placement, transcript, and Incognito lifecycle code, then drain their owners during teardown. flowchart TD
A[Test fixture setup] --> B[Published runtime config]
A --> C[Isolated shared state]
B --> D[Production runtime consumers]
C --> D
D --> E[Existing behavioral assertions]
E --> F[Owner drainage and snapshot cleanup]
Technical reviewBest possible solution: Use the owning fixtures to prepare and retire runtime state while preserving the existing behavioral coverage. Do we have a high-confidence way to reproduce the issue? Source confirms unprepared config reads in the affected fixture paths, and the PR records matching before/after failures; this read-only review ran no target code. Is this the best way to solve the issue? Preparing state at existing fixture owners addresses the setup failure directly and removes duplicate publications without restoring synchronous cold loading. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4ca02f6c720e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests -59. Total -59 across 21 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:20 PM ET / October 13, 2026, 00:20 UTC. |
|
Merged via squash.
|
…penclaw#169714 fallout (openclaw#170433) * test(gateway): retain shared state in incognito lifetime fixture The prepared config snapshot skips the former synchronous config load and its config-health initialization of the shared-state handle. Without that handle, Incognito deletion-fence checks repeatedly spawn synchronous SQLite snapshot children and exhaust the case timeout. Open the fixture-owned shared-state database explicitly, as Gateway startup does. Existing fixture teardown closes it. Preserve all nine cases, assertions, and timeouts. Validation: baseline 4 passed / 5 failed (four timeouts and one assertion); full file after the fix 9 passed in 135.07s wall time. Scoped format, lint, and independent Codex review passed. No production files changed. * test(worker): publish the composed Gateway config in the fault-injection harness 5dbf215 (openclaw#169714) made getRuntimeConfig a strict read of the published snapshot. ComposedGatewayHarness handed its config to services but never published it, so chat-event admission (resolveRestartRecoveryLifecycleState) threw "Runtime config is not prepared" inside the composed Gateway and native-worker.integration failed 6 of 9 cases on downstream admission assertions. Publish the harness config at start, as Gateway startup does, and clear it after session-state cleanup. Fold the duplicated worker handshake builder into one helper so the harness stays within its line budget. * test(gateway): publish the worker-environment suite config at its fixture Publish the suite's Gateway config when authored and clear it after service shutdown so runtime-config readers have the same startup state as production. Remove equivalent placement dispatch/reclaim/targeted recovery, provisioning replay, and Portal policy publications and redundant per-file clears. Keep shutdown replay's post-mutation publication and all different-config overrides. * test: drop per-file config publishes owned by their fixtures Remove duplicate fixture publishes and clears from placement abandonment, native-worker, fault-injection, and transcript-failure tests, plus the chat-abort mid-test publish. Keep chat-abort pre-harness snapshot/source restoration, distinct-config overrides, and shutdown replay post-mutation publication. * test(agents): prepare embedded runtime fixture configs After openclaw#169714, getRuntimeConfig reads only an already published snapshot. The direct lane-controller fixtures reached that read through session placement admission without preparing config, rejecting queue tasks before their entry signals and leaving attempt-control cases to time out. The unavailable-finalization fixture also missed the snapshot during fallback transcript target resolution, so it never claimed transcript ownership. Publish each fixture's authored empty config in its file-level setup and clear it during teardown. Preserve all cases, assertions, and timeouts; leave production code and generic cold-load helpers unchanged. Validation: each file reproduced alone before and passed alone afterward with pnpm test <file> --maxWorkers=1 (6, 18, and 1 cases). Targeted typecheck, lint, formatting, diff checks, and isolated P2 autoreview passed.
…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
Fixes: four test files still fail or time out on
mainafter #169714 (7e48efb) madegetRuntimeConfig()a strict read of the published runtime-config snapshot, and fifteen fixture consumers carry hand-copied config publishes that belong to their shared fixture. Main push CI runs only changed-file selections and no infra bundles, so these reds surface only in nightly full CI or when selection happens to pick the file.User Impact
No user-visible change. Test-only; production code is unchanged.
Why This Change Was Made
setupWorkerEnvironmentServiceSuite()now publishestestState.configwhen it authors it and clears it after service shutdown;ComposedGatewayHarnesspublishesthis.cfginstart()and clears it inclose(). Fifteen consumers drop their now-duplicate publish/clear pairs (including copies that landed in refactor: move bundled session reads and authority into workers #169622 and earlier sweeps). Publishes of a different config object, the shutdown-replay post-mutation republish, and chat-abort's pre-harness snapshot restore are kept.session-placement-admission.ts:238) and fallback transcript-target resolution (run-session-target.ts:57) read config;holdLaneswallowed the rejection and kept waiting for an entry signal, which is whylane-controller.attempt-controlsshowed 18 timeouts instead of an error.openclaw-test-state, command-queue support) was changed, matching 2dc1dad. Net diff: 21 files, +58/−117.Evidence
Census
Source: nightly Full Release Validation child CI run 38292371460 at
6112e37e00, the first full run containing #169714. 61 test files loggedRuntime config is not prepared, 10 more failed for other reasons, and shardagentic-gateway-server-isolated-7stalled (no output for 300 s, exit 143), so 57 of its 64 files never reported.checks-uifailures contained no runtime-config errors and are out of scope.Already repaired on
mainby parallel work (not duplicated here): 2dc1dad (44 files), be7696c, d7be702, 996b35c, f10cc08, f1aee76, d8253ad, 7e596d5, a919b21, #170236 (ACP native process fixture), #169622 (placement-abandon-lifecycle,native-worker.integration), #170292 (integrity-lease).Local census (macOS,
OPENCLAW_NODE_TEST_PLAN_CONTINUE_ON_FAILURE=1 pnpm test <files>onmain8f4cf41/8de511a5d808) of every candidate those commits did not touch, plus all 57 unreported stalled-shard files:server.incognito-lifetime(6 timeouts),lane-controller(2 failed + 3 unhandled rejections),lane-controller.attempt-controls(18 timeouts),settled-turn-finalization.unavailable(1 failed)mainconcurrentlyplacement-abandon-lifecycle(25),native-worker.integration(6),session-cost-usage-cache.creation-race(4: same shared-state side effect as incognito),openclaw-agent-db.integrity-lease(1; see below)mainsession-accessor,doctor-config-preflight,doctor-session-canonical-keys.scale,server-restart-update-run,session-observer-model,chat-reply-media.authority,server-methods.canonical-validation,server.chat-dashboard-title-rollover,run-entry.cleanup,media-generate-background-retention,agent-runner-result-accounting.fallback,state-migrations.transcript-directives,update-managed-service-handoff-lifecycle,openclaw-agent-worker-store,openclaw-state-db-cron-delivery-migration,ci-changed-node-test-plan.policy, and 56 of the 57 stalled-shard filespre-bootstrap.process"Doctor-repaired escaped reference": finite work at 54 to 56 s against its 60 s subprocess deadline (33 s in Doctor preflight); CI killed it at 60 s; not a hang and not attributable without bisect.client-native-actions: failed on 8de511a, passes after #170359.worker.fault-injectioncancellation case: failed once, passed in two later runs.server.agents.config-readiness: times out locally, and was already failing in the pre-#169714 nightly at 5066848.integrity-leaseis #169983 fallout, not #169714, and not macOS-specific: the infra lane runs it in a forks pool (isMainThread), so the agent database delegates WAL maintenance,walMaintenance.close()always returnsfalse, and a native close with an empty WAL seals clean. #170292 already repaired the fixture.Proof
pnpm test <file> --maxWorkers=1. Host load averaged 40 to 70 from other agents, so wall times are inflated.server.incognito-lifetimelane-controllerlane-controller.attempt-controlssettled-turn-finalization.unavailableplacement-abandon-lifecyclewith only the suite fixture changesetupWorkerEnvironmentServiceSuite()consumersComposedGatewayHarnessconsumers +placement-abandon-lifecycleafter the duplicate cutover (7 files)Formatting passed via the pre-commit hook and
oxfmt --check. Scoped oxlint and a scoped type check ran in the worker lanes. Codex autoreview of the branch (P0 to P2) was scoped-clean.Gaps: E2E/live suites and darwin-only native tests were not censused beyond the nightly CI run. Windows was not run locally. Full typecheck and lint are left to PR CI.