Repository navigation
A start refuses a volume that holds a prices database and no primary (spec 086) - #415
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts: # docs/specs/README.md
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rimary (#375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…primary (#375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… the roadmap (#375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…pec 086 (v0.3.2) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e message and the README (#375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(spec 027 D4) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…375) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts: # docs/architecture/release-and-deploy.md # docs/specs/README.md
plainprogrammer
marked this pull request as ready for review
November 13, 2026 21:42
# Conflicts: # CLAUDE.md # docs/architecture/prices.md # docs/roadmap.md # docs/specs/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #375.
What
A server start (the image's default command, or any command that ends in
./bin/rails server) now refuses a volume that holds a prices database file, or one of its-wal,-shmor-journalfiles, and no primary database. It stops beforedb:preparecreates anything, exits 1, and its log says what it found, why it stops and what to do. A volume with neither file is a new instance, and one with a primary starts as before.The state is what
backup:restoreleaves when it is killed between placing the prices file and the primary (spec 081 decision 8). Before this, a start there created a blank primary and kept the stale prices, which the new catalog's printing ids would then attach to the wrong printings.bin/docker-entrypointrunsbin/rails start:checkbeforedb:prepare, in the sameif.Collector::StartCheck(lib/collector/start_check.rb) decides from file existence and size only, and opens no database. It reads the files' places throughCollector::Backup::Databases, so a start and a restore look in the same places.lib/tasks/start.rakehas no:environmentprerequisite, and nothing in the boot path names the check.bin/backup-smokegains a leg that restores a backup, removes the primary, and runs the image on that volume: it must exit 1 with the message and create no primary; then it removes the prices files and the start must be a blank instance.README.md,docs/backup-restore.md,docs/releasing.md, the release and deploy and prices area docs, the roadmap andCLAUDE.md.No
Dockerfile, workflow or deploy file changed.Maintainer's rulings (2026-11-13)
All three scope decisions as recommended: the check lives in the entrypoint, calling a task (not an initializer); the test is that a prices file or sidecar exists, not that it holds rows; development gets no check.
Evidence
verification.md(AC table, the image runs, the implementation review: SPEC-ALIGNED WITH FINDINGS, all fixed).spec/lib/collector/start_check_spec.rbandspec/start_check_spec.rb(the real entrypoint, a real SIGKILL of a restore between its placings, a production boot with no secret, the way out).bin/backup-smoke collector:s086OK including the new leg; with an image oforigin/mainas the restore image it fails at the new leg withspec 086 AC-4.1 ... (still running after 120 s).bin/ciran as the push's hook and passed; 4903 examples.Known limit (accepted in the spec)
A one-off command that connects to the primary through the application on an orphan volume writes WAL mode's first page, so the next start finds a primary and passes. The message tells the operator to run nothing else on the volume meanwhile.
🤖 Generated with Claude Code