GeezerVison is showing github.com — fix(id): refuse a complete journal line this binary cannot read by dezren39 · Pull Request #244 · developing-today/code
Conversation
dezren39
commented
Oct 17, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
FileJournal::open treated any unparsable final line as a torn append and truncated it. That is right for an unterminated line, which is a crash before the entry was acknowledged. A newline-terminated line was fully written, though, and dropping it silently loses an acknowledged entry.
This matters for rollback. A binary that cannot read a newer entry, such as a CapsCeiling or a schedule entry, would drop that entry if it were the last line. The earlier records said such a binary refuses the journal. That was only true for entries that are not last.
This change makes a newline-terminated line that does not parse an error, wherever it sits. Only an unterminated last line is still treated as torn.
Scope and limits
- Future binaries only. Binaries built before this change still truncate. Roll back to a pre-change binary only from a journal backup taken before the upgrade.
- Crash recovery is unchanged for unterminated lines. The append path writes each entry as one line with its newline, then syncs, so a terminated line was fully written.
Validation
cargo test --lib --no-default-features --features sandbox,world world_store: 23 passed, including the new a_terminated_entry_this_binary_cannot_read_is_refused_not_dropped. The existing torn-tail and mid-file tests still pass.
cargo test --lib (default features): 1331 passed, 4 ignored.
cargo fmt --check: clean.
Stacked on #234.
Summary by CodeRabbit
- Bug Fixes
- Journal files with a complete but unreadable final entry are now reported as corrupt and left intact. Only an incomplete, unterminated final entry is truncated.
- Chores
- Validation continues through remaining checks after an individual check fails.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 17, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2f557c8d-eeea-48f7-a6e5-1e376c1975f6
📥 Commits
-
Reviewing files that changed from the base of the PR and between 228019a and 7159357.
📒 Files selected for processing: 2
-
.github/workflows/id-check.yml
pkgs/id/src/world_store.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
📝 Walkthrough
-
The PR changes how FileJournal::open handles unparsable journal lines and adds --keep-going to the Nix flake check command.
Changes: Journal Corruption Handling
| Layer / File(s) |
Summary |
Journal parsing and regression coverage pkgs/id/src/world_store.rs |
FileJournal::open rejects newline-terminated journal entries that fail to parse. It still truncates an unterminated final line with no remaining bytes. A regression test checks that a rejected journal remains intact. |
CI Flake Check
| Layer / File(s) |
Summary |
Nix flake check command .github/workflows/id-check.yml |
The nix flake check command now includes --keep-going. |
Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Merge Risk: ⚪ Minimal · up to cb04c
-
Merge Risk: ⚪ Minimal · up to cb04c
Unreadable complete journal entries are preserved instead of silently discarded, while torn-write recovery remains unchanged. CI now reports more check failures in one run and still fails when any check fails; no actionable merge risk remains.
Security architecture risk: 🔵 Low · up to 71593
-
The new behavior fails closed instead of silently deleting a fully written, unreadable record. No expanded access or weaker control was identified. Remaining caveats concern older binaries and an unchanged storage-failure path that can leave revocation effective only until restart.
Retained concerns
No architecture-level concerns identified.
Security review details
-
Security Blast Radius
- inferred — The changed failure condition concerns an existing durable journal supplied to the opener. The comparison introduces no new caller, network entrypoint, credential, or write authority. The affected journal is refused; any wider availability impact depends on its hosting caller.
Trust Boundaries and Controls
- observed — The inspected caller chain propagates journal corruption instead of interpreting it as an absent world or installing a restored actor. This preserves the refusal boundary between unreadable persisted state and active runtime state.
Resilience and Maintainability Implications
- inferred — An existing failure-containment limitation remains: revocation takes effect in memory and replies after discarding a persistence error. If the revocation record never becomes durable, restart can restore the prior authority. Persistence failure makes the world read-only, but does not itself make that revocation durable. The caller and its exposure are unchanged by this PR.
Pre-merge checks: 5
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title clearly and concisely describes the main change: refusing complete journal lines that the binary cannot read. |
| Docstring Coverage |
 |
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 … |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 17, 2026
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 28, 2026
This was referenced Nov 13, 2026
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|