docs(rfc-0008): specified — formal §5 acceptance criteria (PR-M1.1) - #65
Conversation
Moves RFC 0008 from `drafted → specified` per the maturity
model. The §5 stub is replaced with nine formal Given/When/Then
scenarios (RFC0008.1–.9), each pinning the testable contract:
- 0008.1 WAL-before-ack with append + sync fault arms
- 0008.2 Crash recovery with the kernel-post-mortem-flush
caveat (the test asserts "no fsync'd lost AND any
unsynced handled safely," not "exactly the fsync'd")
- 0008.3 O(N) recovery with a `criterion` fixture
- 0008.4 Newest-segment torn-tail clean-truncation with the
§6.6 step 4 `ftruncate` heal explicit
- 0008.5 All five corruption sub-cases (CRC, kind, pad,
oversize, older-segment torn) → all-segments-stop
+ audit event
- 0008.6 Rotation size-cap + time-cap arms, no
drop/duplicate, rotation-fsync-failure surface
- 0008.7 Checkpoint truncation + the durable-sidecar
crash-between-checkpoint arm + the surviving-
segments / no-global-counter arm
- 0008.8 Batched-fsync knob exercised at 10 / 100 / 1000 ms
- 0008.9 `wal_unflushed_bytes` bound + the §6.9 lower-bound
tunable validation that makes the bound achievable
The "How to read this document" preamble loses the stub-
warning sentence ("§5 is a stub at this `drafted` stage…")
now that §5 is filled. Frontmatter `status: drafted` →
`status: specified`.
The §6 design + §8 test matrix already match these scenarios
1:1 (the §5 enumeration was the source of truth for §8 from
the drafted round); this PR finishes the formality.
Per the README lifecycle, `specified` is the gate for
implementation — PR-M2 (the `ourios-wal` crate red-gate
stubs) can land next.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRFC 0008 is promoted to specified, replacing acceptance criteria with nine concrete Given/When/Then scenarios, expanding corruption test cases to five explicit arms, and clarifying that AuditEvent payload encoding is deferred while the frame layout and WAL ordering are pinned. ChangesWAL Specification and Acceptance Criteria
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR advances RFC 0008 for the WAL from drafted to specified by replacing the §5 acceptance-criteria stub with formal Given/When/Then scenarios.
Changes:
- Updates RFC status and introductory guidance for §5.
- Adds nine formal RFC0008 acceptance scenarios covering WAL-before-ack, crash recovery, corruption handling, rotation, checkpointing, batching, and metrics bounds.
- Pins additional testable edge cases such as sync/append faults, torn tails, durable checkpoints, and invalid config handling.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/rfcs/0008-wal.md`:
- Around line 300-301: Update RFC0008.5 so its stated sub-case count matches the
§8 test mapping (make the "five corruption sub-cases" wording and any related
list agree with the three arms documented in §8), and revise the §5 examples to
use the suggested "> **Scenario ...**" block style for each sub-case; ensure the
sentence referencing the test file corruption.rs and any bullet/list headers
reflect the reconciled count so the spec is greppable to the tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: eb7e09dc-1c47-4bd9-bfe0-23736ee53032
📒 Files selected for processing (1)
docs/rfcs/0008-wal.md
…M1.1) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/rfcs/0008-wal.md`:
- Around line 230-240: Section §5 (RFC0008.5) correctly treats a complete frame
with a CRC32-C mismatch as corruption, but §8 currently treats CRC-invalid
newest-segment data as torn-tail truncation; make the behavior consistent by
changing §8 to classify CRC-mismatched complete frames as RFC0008.5 corruption
(not torn-tail truncate). Update the wording in the §8 description and any
related test assertions or examples (references: RFC0008.5, "torn-tail
truncate", "newest-segment") so both sections state the same rule: CRC mismatch
= corruption, not truncation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b37beb99-c2fe-4d84-9d35-8f818a5db28c
📒 Files selected for processing (1)
docs/rfcs/0008-wal.md
…M1.1) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…M1.1) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #65 moved RFC 0008 `drafted → specified` (formal §5 G/W/T). PR #66 landed the `ourios-wal` crate scaffold + 26 `#[ignore]`'d test stubs across 9 RFC0008.X test files. Per the README §6.2 maturity model — *"Red — test stubs exist and fail. Implementation may begin."* — RFC 0008 is now in the red state. Implementation lands incrementally: each `#[ignore]` flips to a live test as the matching §6.X implementation slice ships, same `red → green` arc the bench used. The H3 crash-recovery test (RFC0008.2) is the per-PR CI gate per `docs/hazards.md` H3, and gates the eventual `red → green` flip. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Moves RFC 0008 (WAL) from
drafted → specifiedper the maturity model. Replaces the §5 stub with nine formal Given/When/Then scenarios (RFC0008.1–.9), each pinning the testable contract.The §6 design + §8 test matrix already mention each
RFC0008.Xby id (the enumeration was the source of truth for §8 from the drafted round); this PR is the §5 formality that unblocks thespecifiedgate.Scenario coverage
appendandsyncfault arms both suppress the ackcriterionfixture; no per-record fsync; no audit-event stormftruncateheal explicit; older-segment torn-tail is corruption (the central newest-vs-older pin)kind, non-zero_pad, oversizelen, older-segment torn) → all-segments-stop + audit eventwal_unflushed_bytes ≤ 2 × wal_segment_size_bytes+ the §6.9 lower-bound tunable validation that makes the bound achievableTest plan
mdbook buildclean.What this unlocks
specifiedis the gate for implementation. PR-M2 can now land:ourios-walcrate red-gate stubs (one#[ignore]'d failing test perRFC0008.X), samered → greenpattern PR-H2 → PR-J4 used for the bench. Then green, then RFC 0003 (OTLP receiver) movesdrafted → specified → implementation, then the livetelemetrygen → ourios-receiverpath becomes real.🤖 Generated with Claude Code
Summary by CodeRabbit