Skip to content

storage(doctor): preserve journal mode during diagnosis - #60

Merged
TusanHomichi merged 1 commit into
mainfrom
codex/56-read-only-doctor
Sep 4, 2026
Merged

storage(doctor): preserve journal mode during diagnosis#60
TusanHomichi merged 1 commit into
mainfrom
codex/56-read-only-doctor

Conversation

@TusanHomichi

@TusanHomichi TusanHomichi commented Sep 4, 2026

Copy link
Copy Markdown
Member

doctor previously set WAL through the writable backup options before checking journal mode. A DELETE-mode installation now stays byte-identical and reports expected wal, got delete.

  • Add an explicitly read-only diagnostic connection with creation disabled and no journal-mode setter; preserve writable startup and backup options.
  • Share invariant verification on one acquired connection and label connection-local PRAGMAs honestly.
  • Add seven integration tests covering missing databases, rejected writes, DELETE-mode preservation, stopped WAL, live WAL-only commits, and separate-process Unix permission cases.
  • Record ADR 0016: SQLite may create WAL sidecars or update shared-memory coordination. Read-only storage without usable sidecars fails diagnosis; no immutable or unlocked fallback. Update operator documentation, retaining the warning for older deployed preview binaries.

Validation at 94fd4f3: web install/check/build, Rust fmt/Clippy, all 125 Rust tests, explicit debug binary build, all eight browser tests (npm run e2e -- --trace on), and the original #56 CLI reproduction pass. npm audit --json still exits 1 for the three low-severity entries already tracked in #54.

The first browser run overlapped the Rust suite and finished 7/8: the draft workflow exhausted its overall 60-second timeout at drafts.spec.ts:394 during login. After inspecting the timeout and pending-login snapshot, the browser suite ran separately in the documented sequence with tracing: all eight passed in 41.9 seconds, including the draft workflow in 38.9 seconds. Other workflows also improved from 13–22 seconds to 11–12 seconds, supporting resource contention as the cause. No test timeout or application behavior changed.

The filesystem tests use Unix permissions with an unprivileged runner; they are not a mounted read-only filesystem or crash-recovery drill. The preview has not been deployed.

Closes #56.

@TusanHomichi
TusanHomichi marked this pull request as ready for review September 4, 2026 23:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T23:53:03.897836Z 94fd4f3 Draft marked ready
ℹ️ 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.

@TusanHomichi
TusanHomichi merged commit 6903293 into main Sep 4, 2026
1 check passed
@TusanHomichi
TusanHomichi deleted the codex/56-read-only-doctor branch September 4, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

storage(doctor): diagnose without changing persisted journal mode

1 participant