Skip to content

fix: prevent startup refusals in chat and queued model discovery - #200147

Open
steipete wants to merge 8 commits into
openclaw:mainfrom
steipete:fix/gateway-catalog-firstbirth-2518-cf74
Open

steipete wants to merge 8 commits into
openclaw:mainfrom
steipete:fix/gateway-catalog-firstbirth-2518-cf74

Conversation

@steipete

@steipete steipete commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Related: #197784

What Problem This Solves

A first chat can be refused when background model discovery creates its database after the request has captured session facts. Queued discovery can also fail because it inherits a temporary SQLite inspection scope that closes before the queued work starts.

User Impact

First chats can proceed while remote discovery finishes asynchronously. Read-first startup keeps its existing write restriction, and queued catalog work can read auth after the caller's inspection ends. The real Gateway regression preserves custom-store sessions, history and settings and completes a synthetic model-backed chat.

Cold native initialization moves earlier. Historical owner measurements observed about 771 ms more work before publication, warm repeat process CPU of 7.50→9.69 ms (+2.20 ms observed, not established causal overhead), and +4.8792 µs at warm background-callback entry. These are correctness tradeoffs, not throughput improvements. Already-admitted existing databases skip native preparation. There is no new schema, configuration option, cache, retry policy or operator action.

Why This Change Was Made

Independent catalog persistence from #197784 (76385fd77e3f77604489178112344be0b3ffed43) could create a database after chat captured its absence. Registration checks then correctly rejected the stale facts. Configured model publication now awaits existing native preparation within its current build budget before capturing auth facts, only when writable admission permits it. Read-only startup publication does not borrow write authority.

The existing background catalog launch now exits only the caller's SQLite inspection scope. Spawn-broker and database-engine context remain intact, and the current plugin-generation and authority owners still govern the work when it starts.

The final change adds 37 production lines across four files. A controlled subtraction removed the entire proposed startup-path expansion: the real custom-store Gateway case still preserved session authority, catalog persistence, stored data and chat. This PR therefore does not add canonical-path preparation to the writable startup owner. The remaining growth carries the awaited callback through its existing budget and provides the narrow background lifetime transfer. Affected fixtures use the maintained writer to establish the native storage prerequisite before simulating Gateway publication; their original assertions and deadlines remain.

Evidence

Reviewed candidate: 44ae9fd79e9bae3f819dfea40cbf3d01454da8e5, composed on exact main 282d5efe4b21f96339d915359dfef7978afd969e. This baseline contains the landed Goal completion fix #200391 (bbefb541) and WebKit animation-check fix #200399 (282d5efe), both repairing actual failures in this PR's previous CI. The previous hosted candidate was 60ae9e5. The final 20-file working tree is bound as f6e05e0a450851648266dd8a9285be160e07f48c; fresh local review and affected checks are complete as reported below; new-head hosted CI and Claw review remain pending.

  • The defect still exists on the selected main. Its unchanged original xAI case passes under Node but fails under pinned Bun with SESSION_MUTATION_AUTHORIZATION_CHANGED. With only the deterministic test packet added, the same request/catalog interleaving fails under both runtimes. The real queued custom-store catalog case fails under Node with SQLITE_READONLY_WORKER_SCOPE_CLOSED; its Bun arm passes. These observations do not establish a runtime-only defect.
  • The integrated fix passes the real flows. At signed a1c31b49, the controlled xAI case and real custom-store catalog case pass under both Node and pinned Bun. The tests use actual catalog persistence, retain independent authority witnesses and preserve the original request assertions.
  • The smaller source is supported by a removal control. Replacing only the startup owner with its exact main version, while retaining the admission guard and background scope fix, passes the complete Node catalog case in 17.237 s. It preserves read-first admission, the captured witness through catalog persistence, session creation and stored ID, model-backed chat/history, and existing transcript/settings. This is why the 14-line startup companion was deleted. Additional affected proof for this final source: the smaller source passes the real catalog case under pinned Bun, eight selected ownership/auth/scope cases under each runtime, and all 15 Node prompt-prefix cases. The Node catalog subtraction control already uses the exact final inputs. Prior xAI Node/Bun results are reused through the documented default-layout call-path equivalence, not presented as reruns. The external prefix receipt initially expected 14 cases and was corrected after all 15 actual cases passed; no test was repeated.
  • Review and required checks: Fresh independent LOCAL Codex review of all 20 changed files and 63 context files, three complete passes with zero actionable P0–P2 findings; reviewed staged tree equals the signed checkpoint tree. Cumulative pnpm check:changed --base 282d5efe4b21f96339d915359dfef7978afd969e --staged --timed passed 35/36 gates and exited 1 in 694.735 s; only the dead-export scan failed with 7 production/3 full-tree symbols. The exact 282 baseline scan reproduced the complete same sets in 100.792 s with identical 254 install inputs; all type/lint/format and remaining guards passed. This qualifies the local baseline failure only, not hosted CI or an inherited landing exception. Actual cumulative growth remains 701 test lines, with 301 explicitly allocated beyond the unchanged 400-line allowance. Final-source context binding and ratchet receipts: all 20 source/63 review-context hashes and the whole final tree match the signed checkpoint; the current changed check passed its line-growth and mock ratchets. The allocation remains 701 / (400 + 301).
  • Remaining CI gap: run 44001040624 on hosted 60ae9e5 failed Goal, UI and heartbeat jobs. Goal and UI have separately landed source repairs now incorporated through the selected baseline. The heartbeat timeout did not reproduce in the recorded Mac and Linux parent/merge replays, and has no identified introducing cause. It remains unexplained; those passes are not a fix or an inherited-failure waiver. A new exact-head CI verdict is still required.
Historical causal proof, previous failed gates, and compatibility limits

The original xAI investigation forced the real catalog-save interleaving: Bun failed on the original owner, an explicit pre-#197784 save control passed, and the fix passed under Node and pinned Bun with actual persistence. Independent session-entry and database-absence witnesses still reject actual changes. Historical 842fe0b startup proof exposed an unconditional eager-write refusal on both runtimes; its exact invoking publication phase was not uniquely recorded. That evidence supports preserving read-only admission, not claiming the now-deleted startup expansion was independently necessary.

Both original background-owner variants failed with SQLITE_READONLY_WORKER_SCOPE_CLOSED; the scope repair passed the owner cases under Node and Bun with broker/engine restrictions intact. The final Gateway fixture uses real catalog-limiter occupancy. Canonical SQL assertions retain the supported identity and birthtime contract added by #200192; the earlier cross-base claim that the birthtime field was inert was withdrawn. Its failed typecheck and intermediate checks remain historical, not final-source qualification.

The overlapping agent add/delete fixtures reproduced on Linux under Node and Bun. The correlated failure retained the original dispatch while the configured owner was replaced. Removing only this PR's first-birth addition made the original nine-case prefix pass. With production unchanged, persisting the union of required stores before initial roster publication made the prefix pass under both runtimes. Later reload ordering, snapshot publications, generation checks and deadlines stayed intact. This qualifies fixture initialization, not a Bun-only defect or an inherited CI exception.

Earlier CI exposed additional fixture consumers. The complete retained census is 17 failed cases in eight files; a catalog-projection case was missed in the initial census and corrected later. The actual-merge originals failed under Node/Bun, exact-parent controls passed, and the maintained-writer corrections passed without changing their assertions. The 100 ms no-replay test retains its timer, exact work counts and zero-owner precondition; real persisted-reader setup occurs before the timed contract. Partial logger/legacy mocks retain real module exports, with only the two obsolete baseline rows removed.

Prior full/correction checks remain recorded with their actual nonzero exits. The integrated 13-file check passed 35/36 and exited 1 solely on 14 production/108 full-tree export findings. Later eight- and two-file correction checks passed 25/26 and exited 1 on exactly those same sets; type/lint/format passed. Those findings matched the exact 2435 main-parent run and all 113 symbols had source causes: #200114, #198133, #198835, #198933, #198936, #198943 and 94e34f956969a2070aa7ad614894b443a6b63049 (PR unidentified). This was local baseline qualification only. It does not qualify a different parent or waive new hosted CI. An earlier aggregate exited2 on the material birthtime API mismatch. Previous independent Codex reviews were scoped-clean on their respective supplied sources, did not execute project code, and reported unavailable surrounding/sensitive context. The current source has the separate fresh LOCAL review and exact tree binding reported above.

The original first-birth measurement used a real synthetic 35 GiB agent database and 5,000 sessions, with comparison samples and A/A controls. Warm native preparation remained 0→0. Cold publication plus later save measured 974.01→896.45 ms wall, 1332.13→1343.65 ms process CPU, and 38.62→39.04 MB sampled host-JS allocation. Warm repeat wall was 7.41→8.30 ms; CPU A/A range was 29.20%. This covers the original 842 insertion, not subsequent source revisions. Its workspace was empty; it does not demonstrate a 62,000-file traversal.

The background-launch measurement used the retained synthetic 35 GiB database, 5,000 sessions and actual 62,000-file workspace path through an APFS COW clone. The scheduler/auth read does not traverse that workspace. Three counterbalanced A/B pairs and two independent A/A pairs performed equal work: 220 actual canonical reads with matching results and context checks. Warm callback entry was 4.7166→9.5958 µs (+4.8792 µs), above the observed A/A difference. End-to-end wall changes were inconsistent, including one increase beyond A/A bounds; no speedup, neutrality or noise-only conclusion follows. Sampled host-JS allocation was inconclusive. Both measurements are single-agent APFS owner controls with uncontrolled GC/page cache, not btrfs, fleet, total native-allocation or Gateway-throughput proof. Changed main auth/catalog contexts prevent treating these as fresh final-base measurements.

Installed compatibility proof remains bound to historical 553b9430143c4013cd818635e122016ccaabeccd, before the background-scope repair: stable 2026.11.4 (d843d6af) → that exact package through verified backup, external package installation and Doctor. The installed Gateway retained the same custom-store session ID, thinking/verbosity settings, transcript prefix and remaining configuration except the explicitly asserted supported Workshop migration/marker from #192766. One real inference request to a synthetic Responses server produced a retained assistant reply. This is not a packaged upgrade of the final head, self-update, live xAI, or attribution of which operation created the database during the combined transition. Failed setup attempts and the corrected same-specimen assertion remain recorded; proof resources were cleaned up.

All fixtures are synthetic. Final-head CI and zero-open Claw review remain separate landing requirements. Previous successful reviews and passing replays do not waive them.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: S labels Nov 16, 2026
@steipete
steipete marked this pull request as ready for review November 16, 2026 15:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T05:48:45.468617Z 44ae9fd New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 842fe0bb6f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +526 to +528
if (identity?.key.startsWith("path:")) {
// Settle first birth inside the build before publishing request-visible facts.
await prepareOpenClawAgentDatabaseExecution(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor read-only startup admission before creating agent storage

During Gateway's deferred read-first startup, an agent can have an existing custom session.store database but no <agentDir>/openclaw-agent.sqlite, for example when credentials come from config or environment variables. src/state/agent-database-startup.ts:523-526 publishes model inputs inside preparePendingAgentDatabaseRead, but those configured inputs still have readOnly unset. This new opener therefore requests writable admission, which src/state/agent-database-admission.ts:583-585 explicitly refuses in that scope. Publication fails and startup marks the otherwise valid agent degraded before reaching openAgent. Defer this creation to a write-admitted phase instead of treating !input.readOnly as sufficient permission to initialize storage.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR prepares missing agent storage before publishing model facts and lets queued discovery outlive its caller’s temporary SQLite inspection scope.

Example: A chat to agent:fallback:xai-fallback overlaps discovery of xai/grok-4.6.

  • Before: Catalog persistence creates the database after session facts were captured, causing SESSION_MUTATION_AUTHORIZATION_CHANGED.
  • After: Writable preparation settles database creation before fact capture, allowing the chat to proceed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused correctness repair with meaningful production-boundary coverage and explicitly bounded historical installed proof; hosted CI for the reviewed head is still pending.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The supplied evidence combines historical installed stable-to-candidate Gateway inference with final-source real Gateway, SQLite and HTTP-provider regressions, including queued discovery after inspection closes and retained custom-store data; the inspected screenshots concern related UI work and provide no model-discovery coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A valid first chat can be refused, and queued model discovery can inherit an inspection scope that has already closed.
Reason: The maintainer-authored repair restores working startup through existing owners, preserves read-first restrictions and records the accepted initialization cost.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses two current startup failures, and no actionable introduced defect was found; exact-head CI remains pending.

Priority: P1
Reviewed head: 44ae9fd79e9bae3f819dfea40cbf3d01454da8e5

Before merge

None.

Findings

None.

Agent review details

How this fits together

Configured model-runtime publication combines agent configuration, credentials and storage facts into request-visible snapshots; background catalog discovery later publishes and persists provider inventory.

flowchart TD
  A[Gateway startup or reload] --> B[Configured runtime owner]
  B --> C[Existing database admission and preparation]
  C --> D[Auth facts and runtime publication]
  D --> E[Chat and session requests]
  D --> F[Background catalog queue]
  F --> G[Provider discovery and catalog persistence]
Loading

Technical review

Best possible solution:

Retain the final four-file repair through the existing publication and database owners, subject to the normal exact-head CI gate.

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

Source exposes both failing interleavings, and the author records base failures under Node/Bun with deterministic Gateway regressions; this read-only review executed no target code.

Is this the best way to solve the issue?

The final patch repairs fact-publication ordering and background scope ownership without weakening session authorization, adding another state owner or retaining the unnecessary startup-path expansion.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 732f00f adds src/agents/prepared-model-runtime.owner.ts:410 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 732f00f110bf; files: src/agents/prepared-model-runtime.owner.ts)
  • Ayaan Zaidi: Raw commit 65c9f24 adds src/agents/prepared-model-runtime.refresh-scope.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 65c9f24448a6; files: src/agents/prepared-model-runtime.refresh-scope.ts)
  • Vincent Koc: Raw commit 625945b adds src/agents/prepared-model-runtime.refresh-scope.ts:44 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 625945b7ae01; files: src/agents/prepared-model-runtime.refresh-scope.ts)

PR surface

Source +37, Tests +701, Other +4. Total +742 across 20 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 4 49 12 +37
Tests 14 717 16 +701
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 6 2 +4
Total 20 772 30 +742

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +49/−12; tests +717/−16 The production growth carries awaited preparation and scope transfer; regression growth covers request interleaving, read-first custom-store startup, scope lifetime and affected fixture prerequisites.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: The reported interleavings refuse otherwise valid chats or prevent queued provider discovery from completing during startup.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-11-16T15:19:42.480Z sha 842fe0b :: blocked before merge. :: [P1] Keep native creation out of read-only startup publication
  • reviewed 2026-11-16T20:44:20.186Z sha 553b943 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-16T23:46:08.931Z sha 3475abf :: needs changes before merge. :: [P2] [P2] Cover the final test growth in the allocation record
  • reviewed 2026-11-17T01:04:41.389Z sha 13c7f81 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-17T02:19:01.414Z sha 60ae9e5 :: needs maintainer review before merge. :: none

Reviewed November 17, 2026, 12:48 AM ET / 05:48 UTC (Revision 6).

Keep cold catalog preparation inside writable admission. During deferred
read-first startup, prepare missing configured canonical auth storage in
the existing writable open phase, including custom session-store owners.

Prove real custom-store startup with preserved session history and settings,
model-backed chat, and independent session authority. Prepare consumer auth
reads before the unchanged first-owner replay deadline, use isolated storage
and complete loggers, and preserve real exports in fixture mocks.
@steipete

steipete commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Update for the remaining catalog-projection fixture correction at 60ae9e57974636fbc6918fbaff1a440b24c134c2.

The final review of 13c7f813 had zero open items. Its CI subsequently failed one original catalog-projection case. That same case already failed in the preceding run and was omitted from the earlier multi-shard census: 17 original failed cases in eight files, with the prior seven-file repair covering 16. The remaining fixture precondition persists the canonical store through the existing writer before configured publication. It changes no production guard, assertion, deadline or routing. The original case fails on actual merge 94a2e5e9 under Node and pinned Bun and passes on exact main parent 687dc6c9 under both. The correction passes on that actual merge under pinned Bun and on published-source 13c7f813 under both runtimes. All seven arms joined with exact source/runtime receipts; the failure belongs to this PR’s fixture cutover.

  1. Previously resolved allocation item. The actual cumulative test growth after the one-line fixture correction is 701, requiring 301 beyond the unchanged 400-line allowance. The existing allocation retains the distinct behavior/cost rationale. Fresh independent Codex review of all 21 files completed three passes with no actionable P0–P2 findings. It relied on supplied source/evidence, did not execute project code, and did not inspect unavailable surrounding/sensitive unchanged context. The cumulative ratchet passed in 1.768 s. The required two-file correction check passed 25 of 26 gates and exited 1 in 748.055 s solely on complete 14 production/108 full-tree export findings matching the qualified exact main-parent2435 sets and retained 113-symbol causal history. Typecheck, lint and format passed; this is local baseline qualification only. The earlier 700/300 ratchet passed on 13c7, and the prior eight-file check remains 25/26 with the exact qualified local export failure, not a future hosted waiver.

Earlier resolved items remain addressed:

Fresh final-candidate review is scoped-clean, and the actual final local outcomes are recorded above. Exact new-head hosted CI and zero-open Claw review remain required.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete steipete changed the title fix: prevent first-chat refusals during background model discovery fix: prevent startup refusals in chat and queued model discovery Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

Update for 44ae9fd79e9bae3f819dfea40cbf3d01454da8e5, incorporating exact main 282d5efe4b21f96339d915359dfef7978afd969e and simplifying the startup change.

The final review of hosted 60ae9e5 had zero findings and zero unchecked items. This update does not treat those resolved findings as currently open. A new final-head review is requested because source and baseline changed after the subsequent CI failure.

The selected baseline includes the landed repairs for the observed Goal and WebKit CI failures (#200391 and #200399). We first tested main itself: unchanged xAI passes Node/fails pinned Bun with SESSION_MUTATION_AUTHORIZATION_CHANGED; the deterministic catalog-save case fails on both runtimes. The real queued custom-store catalog case fails Node with SQLITE_READONLY_WORKER_SCOPE_CLOSED and passes Bun. The integrated fix passes both cases on both runtimes. A subtraction control then restores only the startup owner to exact main, preserving the admission guard and background scope fix; the complete Node Gateway case still passes, including actual persistence, independent session witness, stored data and model-backed chat. The entire extra startup-path preparation has therefore been removed. Production growth falls 51→37 lines; tests remain 701 with allocation 301.

Previously resolved findings remain addressed by the smaller source:

Final 20-file source/context review: fresh independent LOCAL Codex review of all 20 changed files and 63 context files, three complete passes with zero actionable P0–P2 findings; reviewed staged tree equals the signed checkpoint tree. Affected proof and required checks: the smaller source passes the real catalog case under pinned Bun, eight selected ownership/auth/scope cases under each runtime, and all 15 Node prompt-prefix cases. The Node catalog subtraction control already uses the exact final inputs. Prior xAI Node/Bun results are reused through the documented default-layout call-path equivalence, not presented as reruns. The external prefix receipt initially expected 14 cases and was corrected after all 15 actual cases passed; no test was repeated. Cumulative pnpm check:changed --base 282d5efe4b21f96339d915359dfef7978afd969e --staged --timed passed 35/36 gates and exited 1 in 694.735 s; only the dead-export scan failed with 7 production/3 full-tree symbols. The exact 282 baseline scan reproduced the complete same sets in 100.792 s with identical 254 install inputs; all type/lint/format and remaining guards passed. This qualifies the local baseline failure only, not hosted CI or an inherited landing exception. All 20 source/63 review-context hashes and the whole final tree match the signed checkpoint; the current changed check passed its line-growth and mock ratchets. The allocation remains 701 / (400 + 301). The PR body retains historical failed aggregate outcomes and measurement/upgrade limits. The prior heartbeat timeout remains unexplained after passing parent/merge replays; no inherited-failure exception or claimed repair follows from them.

Exact new-head CI and zero unchecked Claw items remain required before landing.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling ci:full Keep ordinary native-locale CI selection on the next PR run. gateway Gateway runtime P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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