fix(journal): close run-journal hardening gaps - #633
Conversation
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Grader review: APPROVE-WITH-CHANGES. All four #632 items are correctly implemented and the closeout map checks out (receipt Required before merge:
Ride-along follow-ups (no merge block): idempotent-cleanup journal churn in Re-request review after the two changes with a fresh full-suite receipt. |
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
|
Implemented the two required changes from the grader review.
Verification:
No fixture, golden, event-canonicalization, projector, |
|
Grader final pass: both required changes verified. The localio fix resolves the parent before the no-follow open (one line, correct minimal blast radius), the journal-side strict helper is untouched and now has a pinning test, and the overlapping-anchor regression proves the first redaction anchor survives a second redaction whose range contains it, with matching record_sha256 and parent link. Receipts verified on disk: focused 2ca7c7 (3 passed) and full 67a837 (5,556 passed, 3 skipped, 82.99% coverage) at head 54bce3d with a clean tree. CI fully green. APPROVE - merging. |
Fixes #632.
This follow-up closes four hardening gaps found while grading #568. It keeps existing event canonicalization, envelope fields, and projector output unchanged for existing event types. No existing golden fixture was regenerated.
Fix and regression map
record_run_startnow reports lifecycle or authority enrollment. Later status writes inspectrun.jsonwithout following symlinks and raiserefusing to overwrite unknown durable enrollment statefor missing, unreadable, non-object, or non-regular receipts.test_record_run_start_treats_lifecycle_only_enrollment_as_durabletest_run_payload_fails_closed_when_enrolled_run_json_becomes_corruptrun.redaction.recordedevents with the five reference-only fields from #632. Anchors hash the exactrecord.jsonbytes, survive later overlapping rewrites, bind child records to the parent anchor observed in the child's quarantined input journal, and are checked against the record inventory after rewrite and cleanup. Structural-only ranges now fail before mutation.test_overlapping_redactions_preserve_both_chained_operation_anchorstest_replaced_redaction_record_set_fails_chained_anchor_validationtest_redaction_after_cleaned_parent_uses_active_anchor_referencetest_redaction_inventory_rejects_tampered_parent_record_anchor_referencetest_redaction_rejects_preserved_structural_only_range_without_mutationlocalio.write_text_atomicfsyncs the parent directory afteros.replaceon supported platforms, opens it with directory and no-follow flags, and preserves the primary fsync error if close also fails.test_write_text_atomic_fsyncs_parent_after_replacetest_write_text_atomic_opens_parent_without_following_symlinkstest_write_text_atomic_reports_directory_fsync_failure_after_replacetest_write_text_atomic_skips_parent_fsync_when_platform_has_no_supportrecover_partial_tailnow owns the same append lock and SIGTERM deferral critical section asappend_event.test_recover_partial_tail_reentrancy_matches_append_eventVerification
The follow-up independent review found no remaining Critical or Important findings. Its two Minor findings, structural-only no-op redactions and duplicate resume verification, were fixed before the full gate above.