Repository navigation
fix(test): isolated setup Gateway exits before readiness - #182990
Conversation
Copy standalone-runtime-profile.mjs into the shared isolated runtime fixture. The LLM validation import added in #182856 otherwise makes every interactive setup Gateway child exit with ERR_MODULE_NOT_FOUND. Existing authenticated Gateway handoff assertions remain unchanged.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesCopy the runtime-profile module into isolated test runtimes so setup Gateway children can start. Example: The SQLite interactive onboard test starts its isolated Gateway child.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: it repairs a confirmed fixture omission still present on main, using the existing owner without weakening assertions or changing production behavior. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared runtime fixture assembles isolated package roots for CLI and Doctor process tests; setup integration tests consume those roots to launch and authenticate Gateway children. flowchart LR
A[Setup integration test] --> B[Shared runtime fixture]
B --> C[Isolated package root]
D[Runtime profile module] --> C
C --> E[CLI and Gateway child]
E --> F[Authenticated readiness and shutdown assertions]
Technical reviewBest possible solution: Retain the single file-list addition in the shared fixture and let the existing integration assertions verify Gateway handoff. Do we have a high-confidence way to reproduce the issue? Yes: the preserved-symlink fixture omits a root module imported by linked validation code, and the body reports matching baseline failures; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair: supply the required asset through the existing fixture owner while preserving isolation, readiness detection, timeouts, and assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b6303cdd2f4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +1. Total +1 across 1 file. 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 24, 2026, 7:07 PM ET / 23:07 UTC. |
## What Problem This Solves The session-accessor conformance matrix executes five SQLite scenarios twice through identical functions and fixture scopes. ## User Impact No production behavior changes. The suite executes 37 cases instead of 42 (-11.9%), preserving every assertion. Five registration lines change; no test declarations, source lines, production seams, SQL, schemas, or PostgreSQL conformance cases are deleted. ## Why This Change Was Made The direct SQLite adapter inherits every method from the public adapter except entry listing and entry updating. Keep the CRUD scenario on both adapters because it exercises those two distinct entry points. Register the five scenarios that use only inherited methods once through the existing SQLite-only registrar, as the rest of the suite already does. The bounded audit covered 24 complete test files and 201 expanded cases. It retained the other 196 cases, including worker settlement, cancellation, authority, cache invalidation and upgrade regressions. Five duplicate executions are below the requested batch target; there is no safe reason to delete distinct contracts to fill a quota. | Duplicate scenario | Retained proof | | --- | --- | | Exact persisted-key lookup | Same callback once: canonical lookup, exact miss and exact hit | | Lifecycle cleanup | Same callback once: age/segment filtering, retained history and archive content | | Raw event append/read | Same callback once, including sync and async reads | | Raw message rejection | Same callback once, retaining the message-write integrity boundary | | Message append/idempotency/publication | Same callback once: durable message, idempotency conflict and emitted update | ## Evidence Acceptance recorded before the first test or benchmark execution: run the complete conformance suite on baseline `349369c020470a2184304c35f99ab3fc45f13726` and candidate with the default pinned Bun runner and one worker. Primary result must be 42 passing baseline cases and 37 passing candidate cases; the five removed executions must retain their unchanged callbacks, and production must remain untouched. Require no new static findings. Timing is secondary: acquire the campaign timing lock, require host load below 24, keep cold and warm cohorts separate, alternate baseline/candidate with at least five samples per arm, and report wall-clock median/p95/range. Any >20% adverse cell stops a performance claim. If no qualified window appears after 60 minutes, report counts and unqualified observed durations without a speedup claim. Correctness runs do not require the timing lock. No application SQL saving is claimed or SQL harness pair needed for this test-registration change. Formatting, basic lint, type-aware core lint and diff whitespace checks pass. One isolated Codex preservation review found no accepted/actionable P0–P2 findings. The complete affected suite passed on both revisions: baseline 42/42 and candidate 37/37. Observed command durations were 310.026 s and 197.963 s, respectively. These are unqualified high-load observations: the baseline built worker bundles, and the candidate reused them; no wall-clock speedup, median/p95, or application SQL saving is claimed. Exact-head CI [40140586585](https://github.com/openclaw/openclaw/actions/runs/40140586585) completed with 20 successful jobs, 30 skipped jobs, and two failures: [PostgreSQL shard 2](https://github.com/openclaw/openclaw/actions/runs/40140586585/job/121011570679) and its aggregate gate. The seven setup failures are the independently reproduced missing synthetic runtime profile, fixed on main by #182990 (`27e87016a5e4`). The equivalent repair in #182996 passed all eight PTY cases and all three PostgreSQL shards in CI 40140628966. This older-head, test-only patch does not touch that fixture; the scoped pre-existing-failure exception applies. Changed tests, selected types/lint, source contracts, architecture checks, baseline ratchets, and PostgreSQL shards 1 and 3 passed. Canonical Knip baseline/candidate comparisons completed with identical findings in all three graphs: production 70/70, full tree 84/84, scripts 1,136/1,136; zero new or resolved entries, no resolution errors or timeouts. Madge passed. Local `check:changed` passed its non-type guards, including worker/T1, dialect, mock-export, timeout, formatting, boundary, and deprecation checks. Its graph/type subchecks refused the required external virtual-store layout; no guard was changed, and the exact-head CI type/lint checks passed. The aggregate command's redundant second candidate export scan was stopped after the completed comparison. An earlier extra unused-file scan exceeded its unchanged 600-second limit and is not counted as a pass. The timing qualification window exceeded 60 minutes with no eligible samples (host load remained above 24). The counts-only fallback applies; the observed correctness-run durations above remain unqualified. No timeouts, resource budgets, snapshots, or expectations were relaxed. Open-PR conflict check at 2026-10-25T00:31:34.745541+00:00: 2,680 other open PRs targeting main, zero overlap with the edited file, zero new merge conflicts. No production, SQL, schema, SDK, or PostgreSQL identity change.
Reduce the durable submitted-input source lookup from five SQL statements to one snapshot-consistent autocommit SELECT on SQLite and PostgreSQL. Keep restart, expired-memory, and attachment duplicate-dispatch protection, with the original bounded recovery transaction unchanged. The normal new-input path saves four statements without adding a worker request. The accepted rare recovery tradeoff is one additional statement for pending or committed input. Verified with both-engine count regressions, 56 focused behavior/prompt-prefix tests, three synthetic Gateway baseline/candidate pairs, and PostgreSQL owner review. Exact-head CI passes all static gates; the inherited PostgreSQL shard 2 fixture failure was independently fixed in #182990. Follow-up to #182334; single-statement precedent #182883.
…ve-setup source runtime (openclaw#182990) openclaw#182856 made the launcher import standalone-runtime-profile.mjs, but the interactive-setup integration fixture's createSourceRuntime copy list omitted it, so the onboarding/setup/crestodian child exited with a missing module before reporting ready (PostgreSQL conformance shard 2 on unrelated PRs). Adds the file to the shared fixture's copy list; all three SQLite handoffs pass again.
## What Problem This Solves The session-accessor conformance matrix executes five SQLite scenarios twice through identical functions and fixture scopes. ## User Impact No production behavior changes. The suite executes 37 cases instead of 42 (-11.9%), preserving every assertion. Five registration lines change; no test declarations, source lines, production seams, SQL, schemas, or PostgreSQL conformance cases are deleted. ## Why This Change Was Made The direct SQLite adapter inherits every method from the public adapter except entry listing and entry updating. Keep the CRUD scenario on both adapters because it exercises those two distinct entry points. Register the five scenarios that use only inherited methods once through the existing SQLite-only registrar, as the rest of the suite already does. The bounded audit covered 24 complete test files and 201 expanded cases. It retained the other 196 cases, including worker settlement, cancellation, authority, cache invalidation and upgrade regressions. Five duplicate executions are below the requested batch target; there is no safe reason to delete distinct contracts to fill a quota. | Duplicate scenario | Retained proof | | --- | --- | | Exact persisted-key lookup | Same callback once: canonical lookup, exact miss and exact hit | | Lifecycle cleanup | Same callback once: age/segment filtering, retained history and archive content | | Raw event append/read | Same callback once, including sync and async reads | | Raw message rejection | Same callback once, retaining the message-write integrity boundary | | Message append/idempotency/publication | Same callback once: durable message, idempotency conflict and emitted update | ## Evidence Acceptance recorded before the first test or benchmark execution: run the complete conformance suite on baseline `bf7154cc71ebd502913559ca791c49405e4a580e` and candidate with the default pinned Bun runner and one worker. Primary result must be 42 passing baseline cases and 37 passing candidate cases; the five removed executions must retain their unchanged callbacks, and production must remain untouched. Require no new static findings. Timing is secondary: acquire the campaign timing lock, require host load below 24, keep cold and warm cohorts separate, alternate baseline/candidate with at least five samples per arm, and report wall-clock median/p95/range. Any >20% adverse cell stops a performance claim. If no qualified window appears after 60 minutes, report counts and unqualified observed durations without a speedup claim. Correctness runs do not require the timing lock. No application SQL saving is claimed or SQL harness pair needed for this test-registration change. Formatting, basic lint, type-aware core lint and diff whitespace checks pass. One isolated Codex preservation review found no accepted/actionable P0–P2 findings. The complete affected suite passed on both revisions: baseline 42/42 and candidate 37/37. Observed command durations were 310.026 s and 197.963 s, respectively. These are unqualified high-load observations: the baseline built worker bundles, and the candidate reused them; no wall-clock speedup, median/p95, or application SQL saving is claimed. Exact-head CI [40140586585](https://github.com/openclaw/openclaw/actions/runs/40140586585) completed with 20 successful jobs, 30 skipped jobs, and two failures: [PostgreSQL shard 2](https://github.com/openclaw/openclaw/actions/runs/40140586585/job/121011570679) and its aggregate gate. The seven setup failures are the independently reproduced missing synthetic runtime profile, fixed on main by openclaw#182990 (`36066dd233a4`). The equivalent repair in openclaw#182996 passed all eight PTY cases and all three PostgreSQL shards in CI 40140628966. This older-head, test-only patch does not touch that fixture; the scoped pre-existing-failure exception applies. Changed tests, selected types/lint, source contracts, architecture checks, baseline ratchets, and PostgreSQL shards 1 and 3 passed. Canonical Knip baseline/candidate comparisons completed with identical findings in all three graphs: production 70/70, full tree 84/84, scripts 1,136/1,136; zero new or resolved entries, no resolution errors or timeouts. Madge passed. Local `check:changed` passed its non-type guards, including worker/T1, dialect, mock-export, timeout, formatting, boundary, and deprecation checks. Its graph/type subchecks refused the required external virtual-store layout; no guard was changed, and the exact-head CI type/lint checks passed. The aggregate command's redundant second candidate export scan was stopped after the completed comparison. An earlier extra unused-file scan exceeded its unchanged 600-second limit and is not counted as a pass. The timing qualification window exceeded 60 minutes with no eligible samples (host load remained above 24). The counts-only fallback applies; the observed correctness-run durations above remain unqualified. No timeouts, resource budgets, snapshots, or expectations were relaxed. Open-PR conflict check at 2026-10-25T00:31:34.745541+00:00: 2,680 other open PRs targeting main, zero overlap with the edited file, zero new merge conflicts. No production, SQL, schema, SDK, or PostgreSQL identity change.
…182971) Reduce the durable submitted-input source lookup from five SQL statements to one snapshot-consistent autocommit SELECT on SQLite and PostgreSQL. Keep restart, expired-memory, and attachment duplicate-dispatch protection, with the original bounded recovery transaction unchanged. The normal new-input path saves four statements without adding a worker request. The accepted rare recovery tradeoff is one additional statement for pending or committed input. Verified with both-engine count regressions, 56 focused behavior/prompt-prefix tests, three synthetic Gateway baseline/candidate pairs, and PostgreSQL owner review. Exact-head CI passes all static gates; the inherited PostgreSQL shard 2 fixture failure was independently fixed in openclaw#182990. Follow-up to openclaw#182334; single-statement precedent openclaw#182883.
Apply the exact fixture asset correction from upstream openclaw#182990 (27e8701).
Related: #182968, #182957
What Problem This Solves
Fixes interactive setup conformance tests exiting before authenticated Gateway readiness after the runtime-profile validation change in #182856.
User Impact
No production behavior, configuration, or migration changes. Restores the existing onboarding, setup, and crestodian persistence and Gateway ownership-handoff proof.
Why This Change Was Made
The real published package already includes
standalone-runtime-profile.mjs. The sharedcreateSourceRuntimefixture omitted it, so its linkedpackages/llm-core/src/validation.tsimport failed when each isolated Gateway started. Copy that root module through the existing fixture owner. No timeout, readiness detection, or assertion changes are needed.Production: +0/-0 LOC. Test support: +1/-0 LOC. The author simplification pass retained this single required file-list entry; existing integration tests already reproduce the defect and protect the complete handoff.
Evidence
Cannot find module .../runtime/standalone-runtime-profile.mjs, imported frompackages/llm-core/src/validation.ts, followed by child exit 1. This is a deterministic missing fixture asset, not a PTY readiness race.273fe5a0e97d92401762c92eebacd95b1b5c11b6: all three SQLite cases fail identically (3 failed, 5 PostgreSQL cases skipped). Two additional Node-only onboard runs also fail identically (1 failed, 7 skipped each). Vitest durations: 99.63 s, 29.24 s, 27.65 s; wrapper wall times: 206.31 s, 38.64 s, 37.51 s. The first run used the default pinned Bun test runner; repeat runs and the fixed proof used Node 26.12.1.git diff --check, and Madge pass; Madge reports 0 cycles. Independent Codex autoreview through P2: scoped-clean, no actionable findings.HOMEandOPENCLAW_STATE_DIR; no operator Gateway or state was used. No remote lease was used. Fullcheck:changed/SQLite inventory was omitted under the campaign's local gate budget; PR CI supplies broad proof. PostgreSQL was not exercised locally. The earlier PTY-exit timeout reported on fix(doctor): stop doctor --lint from creating empty PostgreSQL workboard schemas #182827 has a different signature; this PR does not claim to fix it.Commands (with isolated state exported before each runtime/check command):