Repository navigation
Conversation
Report the admission owner's refusal on database-readiness traces, including same-version canonical schema changes. Preserve full integrity checks and clean-close reuse; cover prior-schema seals and read-only CPU/heap diagnostics.
|
🦞👀 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 Summary: ✅ CompletedThis 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 changesThis PR adds the existing clean-close seal refusal reason to shared-state startup diagnostics. Example: A clean schema-39 database predates the bootstrap_deferred column.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the diagnostic improvement is useful, the earlier subprocess defect is resolved, and no actionable patch or security defect remains. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSQLite admission records seal refusals; shared-state inspection returns those facts through preflight metrics to immediate CLI output and buffered Gateway startup traces. flowchart LR
A[SQLite database and seal] --> B[Admission owner]
B --> C[State inspection worker]
C --> D[Database preflight metrics]
D --> E[CLI startup output]
E --> F[Gateway trace replay]
Technical reviewBest possible solution: Carry the admission owner's existing refusal through the existing metric transport while preserving all integrity and sealing decisions. Do we have a high-confidence way to reproduce the issue? Current-main source exposes scan counts without the recorded refusal; the supplied prior-schema regression targets that omission, but no target code was executed during this review. Is this the best way to solve the issue? The patch uses the existing refusal getter and trace owners with no parallel policy or state; its two new flags control only the synthetic benchmark. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ea1a0dd431ab. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +15, Tests +88, Docs +12, Other +42. Total +157 across 15 files. Added test files: 0. View PR surface stats
Preflight sourceSource 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
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 HistoryReview history (1 earlier review cycle)
Reviewed November 10, 2026, 11:17 PM ET / November 11, 2026, 04:17 UTC (Revision 2). |
|
Addressed the review's one open item on
The CI module-resolution failure was reproduced locally under Node with compiled workers before the repair. All nine native cases pass afterward under both Node and Bun with compiled workers. Fresh Codex autoreview found no actionable P0/P1 issue; changed-file checks pass all 29 test typecheck groups, formatting, guards and lint. Only the identical exact-parent dead-export regression remains locally. Replacement Node 24 CI is pending. The PR body retains the separate transport/native-boundary proof and full-Gateway/full-scale measurement gaps. It also records the UI timeout's exact-parent reproduction and introducing commit, #196457; a single missing advertised capability fixes that parent fixture. No unrelated UI repair is included. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash auto-merge.
|
…law#197008) * fix(state): explain startup integrity checks after clean close Report the admission owner's refusal on database-readiness traces, including same-version canonical schema changes. Preserve full integrity checks and clean-close reuse; cover prior-schema seals and read-only CPU/heap diagnostics. * test: account for formatted startup diagnostic fixture * test: seed diagnostic seals before compiled captures
What Problem This Solves
A clean shared-state database can require a full startup integrity check after an additive schema update, but the database-readiness log reports only the cost and gives no reason.
User Impact
Startup now includes
stateIntegrityReason=schema-mismatch(or the admission owner's other refusal) alongsidestateIntegrityCheckCountandstateIntegrityMs. Integrity checks, schema versions, sealing, and data remain unchanged.Why This Change Was Made
Clean-close proof includes the database family's canonical SQL fingerprint, not just its numeric schema version. Adding the first-use
workspace_setup_state.bootstrap_deferredcolumn in #196392 therefore invalidates prior state seals at version 39. A successful current-runtime open and clean close restores compatible proof for later restarts; repeating read-only preflight alone does not reseal.The seal loader already records the refusal. This change carries that fact through the existing preflight result and startup trace, retaining numeric accumulation while preserving text diagnostics. It does not remove the required scan or add a new cache, configuration option, schema, or admission policy. Production growth is 15 lines for the requested diagnostic and its typed transport.
Evidence
schema-mismatchreason is missing; the scan count is one both before and after. Current-schema seals retain zero scans, and corruption retains foreign-key rejection.maintenance.schema-mismatch, and four fresh readers after a real current-runtime clean close scanned zero times. Timing equivalence is inconclusive under shared-host cache pressure (A/A: 17,459/1,594 ms); no speedup is claimed. Median sampled V8 allocation was 42,465,208 → 42,349,504 bytes (−0.27%, within 2.07% A/A spread). Native SQLite allocation is not measured.pnpm check:changedcompleted: 36/38 categories passed initially. Formatting was corrected by the commit formatter and its full changed-file replay passes. The remaining dead-export failure reproduces identically on the untouched main parent (56 production / 30 full-tree findings); it is a main regression, not ignored noise. The remaining five provider aliases were attributed with an isolated inverse-patch probe: restoring only the broad import removed by refactor(plugins): forward auth and catalog to their owners #190205 removes exactly all 11 provider-facade findings (56 → 45), with no new findings; the other 45 remain unchanged. This is a current-parent causal reachability probe, not a historical full-gate run. Codex autoreview is scoped-clean through P1 against the local candidate on c9caa4c; no accepted/actionable findings. The CI diagnostics fixture repair also passed a fresh scoped Codex autoreview through P1. The review is static and makes no production-scale performance claim.The full requested large-database Linux fixture is unavailable on the current host; the configured private remote runner could not allocate without its organization setting. Smaller local measurements do not establish production latency or btrfs performance. No production data was used or deployment performed.
Test-line allocation covers the prior-schema diagnostic regression, read-only profiling safety, and text-metric transport. Existing fixture coverage is extended rather than adding new production test seams.
Synthetic owner measurements and reproduction
macOS/APFS, Node 26.12.1; 8,613,965,824-byte state database with 8,192 synthetic blob rows. Five counterbalanced timing pairs and five separate allocation pairs, plus A/A controls and CPU profiles. Filesystem caches were not reset; host load ranged 27.4–87.3. These are mixed-cache measurements, so differences below are not attributable to this diagnostic change.
After a real current-runtime close, the existing seal fast path took 5.188/5.861 ms owner time and 5.83/6.31 ms CPU; allocation controls were 465,264/464,000 bytes. This demonstrates the existing one-time invalidation/reseal behavior, not a new optimization.
Remaining proof and main regression
The exact-parent dead-export replay used c9caa4c and produced identical 56 production / 30 full-tree finding sets. Source attribution covers #196767, #192552, #196207, #196252, #196380, #191326, #190205, #190544 and 2c4e34a. A targeted inverse patch restores the provider-runtime.runtime.ts blob from #190205's parent and removes exactly all 11 provider-facade findings while preserving the other 45; the relevant exports all existed before #190205. No unrelated export fixes, ignores, or gate exceptions are included. This is a main regression to repair.
CI on d7aca05 found a PR-caused fixture defect: the native diagnostics subprocess mixed compiled diagnostic entrypoints with raw state TypeScript. Under Node it failed module resolution before the seal assertions; Bun had accepted it locally. The same Node/compiled-worker failure reproduced locally. The repaired fixture creates and cleanly closes real state in the normal test runtime, then retains the cold native capture child and fresh inspection worker. All nine native cases pass under both Node and Bun with compiled workers.
CI also exposed an inherited UI fixture regression: screen-requester-routing.e2e.test.ts:201 waits for tools.github.status after navigation, but the mock does not advertise any capability that enables the Tools panel. The same focused test fails on untouched c9caa4c (same assertion; local 10s versus CI 30s timeout). #196457 / 086d257 introduced the Tools capability gate. Adding only the missing config.get capability to that parent's fixture makes the complete flow pass (1/1, 33.09s; baseline 1/1 failed, 91.41s). This was a main regression, not flaky noise. It was independently repaired on main by #197001 (the same config.get advertisement), with additional settings capabilities in #197016; final-head UI CI passed. No unrelated UI edits are included here.
Full-scale Linux benchmark proof remains unavailable. ClawSweeper reviewed the final head with zero open items; the numbered response records the fixture repair. Final-head CI passed on 6fc4e7c: 51 successful jobs and 27 skipped, including all three PostgreSQL conformance shards. Native pinned auto-merge landed as f700899 without an admin exception or CI rerun. Native completion verified the receipt and cleanup.