Repository navigation
fix: preserve schema worker causes in update reports - #164169
Conversation
Promote only recognized diagnostic summaries before private source context. Keep native error causes for cleanup ownership, preserve worker stdout and its final error line, and redact complete quoted path suffixes.
|
🦞👀 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: needs maintainer review before merge. Reviewed October 3, 2026, 5:03 AM ET / 09:03 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR preserves recognized schema-worker errors in update reports while redacting private path suffixes, and adds regression coverage and documentation. Merge readiness✅ Ready for maintainer review The PR remains useful, and no introduced correctness or security defect was found. Both earlier review requests are addressed; no additional required action remains. Likely related people: steipete, supported by prior merged work on update diagnostics. Priority: P2 Review scores
Verification
How this fits togetherThe updater runs database inspection in a subprocess and converts its diagnostics into saved failure reports. Shared support redaction keeps recognized error facts while removing private paths and arbitrary diagnostic text. flowchart TD
A[Update request] --> B[Database inspection worker]
B --> C[Worker errors and progress]
C --> D[Diagnostic envelope]
D --> E[Public error allowlist and redaction]
E --> F[Saved update failure report]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +14, Tests +209, Docs +4. Total +227 across 7 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep recognized worker facts ahead of private source context using the shared redaction owner, while preserving process-cleanup causes and the existing worker protocol. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the failure path: a private source path precedes the worker error, and saved diagnostic redaction discards that suffix. The composed regressions cover this path; no local runtime reproduction was executed. Is this the best way to solve the issue? Yes, promoting only recognized public facts through the existing redactor is a focused repair that preserves worker output and cleanup ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dd66b6780734. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
|
Merged via squash.
|
Promote only recognized diagnostic summaries before private source context. Keep native error causes for cleanup ownership, preserve worker stdout and its final error line, and redact complete quoted path suffixes.
What Problem This Solves
Fixes update failure reports losing recognized schema-worker errors when private source paths or earlier warning lines appear first.
User Impact
Operators retain useful permission, module-load, SQLite, and numeric GLIBC diagnostics while private paths, quoted filename suffixes, and arbitrary worker prose remain hidden behind the existing source boundary. This repairs reporting; it does not fix or identify the underlying worker exit.
Why This Change Was Made
The worker emits an allowlisted error code before its full diagnostic, preserving the existing final error line and stdout JSON. The diagnostic envelope promotes only the canonical public summary before source context. Quoted paths now receive the same conservative suffix redaction as unquoted paths because filenames can contain quotes. Existing SQLite public codes move into the shared allowlist rather than introducing a second policy.
Native error causes remain intact because they carry cleanup and process-outcome ownership. Follow-up: define a closed public projection for structured update error causes while preserving their operational graphs; their existing first-line prose policy is unchanged here.
Evidence
Regressions reproduced the original source-path loss, embedded-quote leakage, nested and plain module-error loss, multiline and SQLite-warning loss, and private-prose exposure in the initial draft. The repaired composed tests and shared redactor suite pass. Existing real-worker cleanup, Gateway reporting, and numeric GLIBC report cases also pass.
All planned changed-file checks completed: production and all 27 core-test type graphs, export scans, lint, schema, import-cycle, and remaining guards passed. The full wrapper stopped at two unnecessary escapes in a test literal; after that behavior-preserving cleanup, exact lint and the remaining planned guards passed. Earlier passing checks were reused. Five existing cleanup-custody cases also pass.
No production update or service restart is part of this change.
The exact-head CI run passed. Its published-driver update cell upgraded published
[email protected]to candidate sourcefab30eb40032834a6d9b16712265a13f26e45bba(the tested merge of base01f838a2b4215and this PR head789b6b63b6d0). The canonical harness relabeled candidate version metadata from2026.9.7to2026.9.8; the source commit and build ID remained unchanged. The downloaded candidate input checksum matcheded64855f815c8ab79f53e6adc5f65b2d1629ae093ff272d7531346923e244d87. The update finished successfully, replaced the managed service, and returned/readyzHTTP 200; the observed serving build ID matched the candidate (2026.9.7-fab30eb40032-2026-10-03T08-33-31.140Z). Update command: 566.845 s; cell step: 633 s; job: 655 s. This upgrade result complements the focused diagnostic-failure regressions.One-worker costs use
pnpm test <file> --maxWorkers=1on macOS, Nodev26.10.0, with the task-owned warm transform cache. CI times are the corresponding per-file shard wrapper durations in the linked run.src/infra/update-candidate-state.diagnostics.test.tssrc/logging/diagnostic-support-redaction.test.ts