Skip to content

fix: restore isolated interactive setup runtime - #182996

Closed
steipete wants to merge 1 commit into
mainfrom
dbasync/redmain14
Closed

steipete wants to merge 1 commit into
mainfrom
dbasync/redmain14

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the interactive setup PostgreSQL CI failures introduced by #182856. The isolated source runtime omitted standalone-runtime-profile.mjs, which @openclaw/llm-core now imports during CLI startup.

User Impact

Test fixture repair only; no production, database, schema, or runtime behavior changes.

Why This Change Was Made

Copy the missing module alongside the fixture's existing package-root runtime files. The existing PTY setup tests cover the failure without adding duplicate tests. This deliberately keeps the emergency repair to one line; the remaining root-file lists are audited separately.

Evidence

Acceptance: on Node 26.12.1, run the existing interactive setup test file against an isolated PostgreSQL 17 instance with pgvector, pg_trgm, and unaccent. Reproduce the seven CLI startup failures on the base, then pass all eight cases (seven affected setup flows plus the malformed-config bare-root control) with the repair. No SQL or timing improvement is claimed, so performance A/B measurements do not apply.

Baseline 0f6631638b2e: all seven SQLite/PostgreSQL setup flows reproduce the missing runtime/standalone-runtime-profile.mjs import from packages/llm-core/src/validation.ts; the bare-root malformed-config control passes (7 failed / 1 passed). The local candidate resolves all seven original missing-module errors. It finishes with two passes (including an authenticated SQLite Gateway handoff and clean shutdown) and six later authenticated-readiness timeouts under host load 64–91; no assertion or deadline was changed. This does not establish the cause of those later timeouts. CI passes all eight PTY cases (the seven affected setup flows plus the malformed-config control), and all three PostgreSQL conformance shards pass. Shard 2 finishes with 40 files / 278 tests passed. Independent Codex review with the fixture, importer, manifest, and PTY suite supplied as context found no actionable P0–P2 findings. Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/40140628966 (all three PostgreSQL shards, types, lint, source contracts, architecture, and ratchets pass). The final shared index covers 2,677 open main-target PRs: the sole overlap is #137014 at 9d9481f94763; current-main-only and current-main+candidate each have 285 existing conflict paths and 575 conflict hunks, with no new conflicts.

The simplification pass retained the one-line repair (+1 test-fixture line, no production change). Local formatting/basic lint and diff checks pass. The type-aware local wrapper rejects the campaign-mandated isolated virtual store at its containment guard; CI supplies the required type-aware lint and type checks.

The canonical Knip export scan completed without setup failures. Production (69) and script (1,136) findings exactly match the shared main baseline. The full-tree scan has 83 findings versus the older baseline’s 81. The extra findings are createReportRunFixtureFetch and fetchWithSsrFGuard in extensions/team-reports/src/report-run.benchmark-fixtures.test-support.ts. That file is byte-identical on the exact PR base, head, and current main (blob c1534fa2f7bb1a52e162a5a7d4a1e15fe9b2b708), and neither export has a consumer outside its defining file on the base. The entire PR changes only one string in the runtime-copy list; all export declarations, import edges, Knip configs and dependencies match the base. These two findings are source-attributed as inherited; this is not an exact scan match against the older shared baseline.

@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T22:57:36.583195Z 123f2f1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: XS labels Oct 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR copies standalone-runtime-profile.mjs into isolated CLI test runtimes.

Example: The isolated PostgreSQL setup test launches openclaw setup --wizard.

  • Before: CLI startup cannot resolve runtime/standalone-runtime-profile.mjs.
  • After: The fixture includes the imported module so startup can proceed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source supports the minimal repair and existing coverage is appropriate; completed after-fix integration evidence is still pending.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored change repairs test-fixture assembly only, so the ordinary production-behavior proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Developers and CI cannot exercise interactive setup because the isolated runtime fails during module loading.
Reason: The maintainer-authored repair restores existing coverage through its established fixture owner without adding product behavior.

Regression provenance

Regression provenance — verified: source commit 4a38dbdb6b1d by Peter Steinberger; canonical PR #182856 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a verified omission in the shared test fixture with the smallest complete change; no actionable patch defects were found.

Priority: P2
Reviewed head: 123f2f1e1efb2de02872f764c81aeefaa10468cb

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The existing CLI PTY suite provides the right regression boundary, but its completed candidate result is not yet recorded.
Agent review details

How this fits together

The shared fixture assembles isolated package roots for CLI process tests, linking source directories and copying package-root runtime dependencies.

flowchart LR
  A[Test fixture] --> B[Isolated package root]
  C[Root runtime modules] --> B
  B --> D[CLI process]
  D --> E[LLM validation import]
  E --> F[Runtime profile module]
Loading

Technical review

Best possible solution:

Retain the one-line addition in the existing shared fixture and let the current integration checks complete.

Do we have a high-confidence way to reproduce the issue?

The missing relative import is directly traceable through the isolated fixture, and the author reports matching baseline failures; no target code was executed during this review.

Is this the best way to solve the issue?

Yes: adding the required root module to the existing copy list fixes the fixture invariant without changing production code, assertions, or isolation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 285f5be610fa.

Provenance checked

  • Isolated runtime root-file inventory keeps the original intent (3529142: The existing inventory copies root runtime dependencies into fixtures; the earlier worker-heap repair addressed the same dependency-closure requirement.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3529142 adds src/commands/doctor-config-preflight.process.test-support.ts:126 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3529142cc84f; files: src/commands/doctor-config-preflight.process.test-support.ts)

PR surface

Tests +1. Total +1 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 0 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 0 +1

Labels

Label changes:

  • add P2: The omission breaks isolated CLI integration coverage rather than shipped setup behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The omission breaks isolated CLI integration coverage rather than shipped setup behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 24, 2026, 7:12 PM ET / 23:12 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

The identical one-line repair landed in #182990 as 27e87016a5e410e5b317773eb3f6b6e3661f01b3. Verified current main contains the exact candidate fixture blob, so this PR is now redundant.

Additional proof from this PR: exact-head CI passes all eight interactive-setup PTY cases, all three PostgreSQL shards, types, lint, source contracts, architecture and ratchets. The local base reproduced all seven missing-module failures; the candidate removed all seven, with six later readiness timeouts disclosed in the body. No deadlines or assertions changed.

Closing as a duplicate; the manifest-derived fixture-list follow-up remains separate.

@steipete steipete closed this Oct 24, 2026
steipete added a commit that referenced this pull request Oct 25, 2026
## 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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant