Name
groundhog-recovery: verification depth, crash recovery, and operator response.
Principles
Groundhog opens a data directory only when it can identify one authoritative durable history. It refuses ambiguous or contradictory state. Read-only commands do not repair data. A writer open can finish recognized interrupted writes before it accepts new mutations. Verification is always read-only.Ordinary open analysis
Every open checks these stored facts:- a compatible storage format
- one coherent committed history frontier
- strictly ordered event ranges
- consistent durable
(source, batch_id)commitments. - consistent source-retirement commitments.
Structural verification
groundhog verify checks stored history:
- the SHA-256 digest of each authoritative segment
- the Parquet row count and exact event-ID range
- strict row order in each segment
- exact segment partitioning by recorded batch
- batch digests recomputed from event commitments
- matching pending and tail facts in the captured inventory.
Chain verification
groundhog verify --chain also recomputes these values for each event:
content_hashfrom canonical payload JSON.event_hashfrom the canonical fixed envelope.- The ordered logical chain from the fixed genesis head.
- Source-retirement and successor-lineage state from ordered events.
Reports and exit status
Exit code 0 means the requested checks passed. Exit code 3 means a stable failure code identifies the first conclusive violation. Both results include one JSON report on standard output. Exit code 1 identifies an operational error without a conclusive verification result. Exit code 2 identifies invalid arguments or configuration. Exit code 4 identifies an unsupported compatibility, security, or anchor requirement. These results require different operator actions. Do not treat them as one corrupt-log result.Orphans and remnants
Verification classifies an orphan as non-authoritative storage. Examples include an unreferenced segment or private temporary file. A remnant is incomplete final state that compatible writer recovery can exclude or repair. Verification can succeed with either list populated. The classification does not authorize deletion.verify --clean is not available.
Writer poisoning
The active writer stops mutation after a write failure with an uncertain outcome.- The triggering request fails or loses a definitive result.
- Later mutation requests return 503.
- The active writer accepts no more appends.
- The service must close and reopen the directory through normal recovery.
Operator procedure: verification failure
Whenverify returns exit code 3:
- Stop mutations.
- Preserve the JSON report and standard-error diagnostics.
- Stop the live writer cleanly.
- Preserve a filesystem copy before experimentation.
- Record the binary identity and configuration.
- Do not edit storage files or delete reported files.
- Classify the stable failure code.
- Compare the result with a known coherent backup.
- Restore or investigate on an isolated copy.
Operator procedure: crash or poisoned writer
After a crash or HTTP 503 response:- Stop the old process.
- Confirm that it no longer owns the socket or writer.
- Restart
servewith the same configuration. - Probe
GET /v1/streamsor a known replay request. - Retry ambiguous ingest with identical source, batch ID, and content.
- Run
verify. - Run
verify --chainwhen the incident needs deeper evidence.
.lock.
Let Groundhog reopen the directory through its recovery path.
Old warehouse files
Groundhog 0.2 ignores old warehouse files. Their presence does not identify a log failure. Do not delete them as part of log recovery. Remove them only after the 0.2 upgrade passes verification, backup, and application checks.Restore validation
File presence does not prove a valid restore. Use an isolated directory:See also
verify,
storage,
deployment operations