docs(rfc-0001): define the §6.6 reader-render contract + lossy warning marker - #162
Conversation
…g marker H7.3 referenced "the §6.6 warning marker" that §6.6 never defined. Add a Reader render contract subsection defining the marker as a structured, out-of-band per-row Reconstruction signal (Faithful | RetainedVerbatim) — not a body-byte mutation — and pinning the lossy short-circuit (return body verbatim, do not call reconstruct). Reject a body-byte annotation as the marker (it would break the verbatim guarantee). The clean-path read-time template registry is explicitly deferred to RFC 0007. Update H7.3 and the §8 reader-behaviour test to resolve to the defined signal. RFC stays specified; no schema or algorithm change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@coderabbitai review |
|
Warning Review limit reached
More reviews will be available in 25 minutes and 37 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRFC 0001's reader specification is updated to formalize lossy-row handling through an explicit out-of-band reconstruction signal. H7.3 now references a per-row ChangesReader render contract specification for template miner RFC
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Pull request overview
This PR amends RFC 0001 (§6.6) to explicitly define the reader-side render contract and to clarify what the previously-referenced “§6.6 warning marker” is for lossy rows, without changing schema or mining behavior.
Changes:
- Updates Scenario H7.3 to specify byte-for-byte body rendering plus an out-of-band reconstruction signal (
Reconstruction::RetainedVerbatim) and to reiterate thatreconstruct()is not called. - Adds a dated amendment note and a new “Reader render contract” subsection to §6.6 defining
(bytes, reconstruction)and rejecting in-band body markers. - Updates the §8 “Reader behaviour test” description to align with the new render contract and marker definition.
💡 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/0001-template-miner.md`:
- Around line 1503-1508: The fenced code block showing the Reconstruction enum
lacks a language identifier; update the Markdown fence to include a language tag
(e.g., "rust") so the enum declaration for Reconstruction (variants Faithful and
RetainedVerbatim) is syntax-highlighted and rendered correctly.
🪄 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: eeac2991-faaf-4c1a-b2db-fda2d3f41a92
📒 Files selected for processing (1)
docs/rfcs/0001-template-miner.md
…r structured A body_kind=Structured row renders its canonical body, but its Faithful-vs-not classification turns on the deferred OTLP-canonical-JSON decision (RFC0001.9). Scope the §6.6 Reconstruction marker + lossy/clean split to the implemented String path; structured-body rendering lands with RFC0001.9. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e marker wording Addresses review: language-tag the enum code fence; reword the RetainedVerbatim consumer guidance to "rendered from the retained body bytes, not reconstructed" (accurate for the lossy + overflow String paths). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Avoid contradicting §6.1 (the canonical-encoding rule is specified) and the RFC0001.9 scenario: the §6.6 reader-render amendment scopes the Reconstruction marker to String bodies; structured-body render classification is out of scope here, specified with RFC0001.9. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ignal RFC0001.9 covers structured-body rendering (the short-circuit) but does not define this amendment new Reconstruction marker. Reword: structured render is exercised by RFC0001.9; mapping a structured render to a Reconstruction signal is left open here, settled when structured render is wired. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The (bytes, reconstruction) intro read as a universal contract; scope it to body_kind=String up front so structured rows (out of scope here) aren't implied to carry a Reconstruction value. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What & why
H7.3 (§5) says a
lossy_flag = truerow renders to thebodycolumn verbatim "with the §6.6 warning marker," and thatreconstruct()is NOT called. But §6.6 defined no such marker — itsreconstruct()just returnsbodydefensively for lossy rows (no marker, and it is reconstruct). This DOC-ONLY amendment closes that gap (maintainer decision 2026-06-08).The marker design
A new Reader render contract subsection in §6.6 defines the render result as
(bytes, reconstruction). The marker is a structured, out-of-band per-row signal attached to the rendered row:This
Reconstructionsignal is the "§6.6 warning marker." It lives beside the body bytes, never inside them — the consumer (DSL output / UI) rendersRetainedVerbatimas a "reconstruction not faithful — original line retained verbatim" warning. A body-byte annotation (sentinel prefix / wrapper char) is explicitly rejected as the marker: it would break the §3.3 verbatim guarantee that "show me what was actually logged" returns the ingested bytes unchanged.Lossy vs. clean path
lossy_flag = true(and the other non-reconstructable cases §6.6/§6.5/§6.1 already list —OVERFLOWparams,body_kind = Structured) the reader returnsbodyverbatim withReconstruction::RetainedVerbatimand does NOT invokereconstruct(no template lookup, no token walk).reconstruct()'s own lossy/overflow early returns stay as a defensive guard, not the primary mechanism.reconstruct(record)and attachesReconstruction::Faithful.Explicitly deferred
The clean path needs a read-time template registry (
(template_id, template_version) → tokens). That lookup mechanism is a separate concern, out of scope of this amendment — todayreconstruct()is exercised only where the template is in hand (write-side H7.1 / H7.4). It is deferred to the querier's reader-materialisation story (RFC 0007). This amendment pins the contract + the lossy path only; it does not invent a template-registry design.Consistency
lossy_flagsemantics (tokenizer failure / explicit rejection; the §6.3 low-confidence zone stays faithful-reconstructable, not flagged) are preserved.specified; §6.6 carries a dated amendment note. No on-disk schema or mining-algorithm change.Verification
DOC-ONLY (no cargo).
mdbook buildsucceeds; only the benign mdbook-mermaid version warning. §6.6 + H7.3 re-read for internal consistency.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation