Skip to content

docs(rfc): draft RFC 0044 — template-aware body equality - #667

Merged
jensholdgaard merged 1 commit into
mainfrom
rfc0044-body-equality
Jul 28, 2026
Merged

docs(rfc): draft RFC 0044 — template-aware body equality#667
jensholdgaard merged 1 commit into
mainfrom
rfc0044-body-equality

Conversation

@jensholdgaard

Copy link
Copy Markdown
Owner

Summary

RFC 0044, specified — the fix direction for #664. body == "literal" compiles to a two-arm predicate (the RFC 0042 §3.3 pattern): the physical body-column arm keeps covering retained/lossy bodies, and a new plan-time template arm resolves the literal against the tenant's template map — zero-parameter templates (the whole GenAI-event corpus) become a prunable template_id IN (…), parameterized templates become template_id == T AND param(i) == v via unification with the token structure. Soundness rests on the §3.3 bit-identical reconstruction invariant; RFC0044.9 drives that invariant through the predicate path as a property test.

Scope discipline: equality (==/!=) only; substring/ordering/regex on body are an explicit §7 follow-up, not smuggled in. Structured bodies (RFC 0037) are excluded-not-errored. The template arm traverses aliases/versions (RFC 0007/0010) so the fix survives deploys. Correct empties stay cheap (all row groups pruned — RFC0044.8).

Grounded in OTel guidance (consulted via the OTel MCP): body is a first-class addressable field across the ecosystem (OTTL log.body, stanza body-default paths), so rejecting body equality was ruled out; the idiomatic event filter is RFC 0043's event_name half.

Hazard #6 (DSL surface) addressed: behavior goes from silently-wrong to correct, no syntax changes.

mdbook build clean; docs-only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F

…esign #664)

Specified: body == compiles to the RFC 0042-style two-arm form — the
physical-column arm (retained/lossy bodies, unchanged) OR a plan-time
template arm resolving the literal against the tenant map: zero-param
templates as a prunable template_id IN-list, parameterized templates as
template_id + implied param equalities. Equality only; other body
operators are an explicit follow-up. Nine §5 criteria incl. the
property test driving the §3.3 reconstruction invariant through the
predicate path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F
Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a9b51d95-754e-424e-8540-a5615a1d4e4d

📥 Commits

Reviewing files that changed from the base of the PR and between 5dbf502 and 7753af6.

📒 Files selected for processing (2)
  • docs/SUMMARY.md
  • docs/rfcs/0044-template-aware-body-equality.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0044-body-equality

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds RFC 0044 (status: specified) describing a template-aware compilation strategy for body == / body != predicates so queries remain correct when high-confidence mined records store the physical body column as NULL, addressing the silent-empty behavior in #664.

Changes:

  • Add new specified RFC 0044 detailing a two-arm predicate compilation (physical body column arm OR plan-time template arm).
  • Link RFC 0044 into the mdBook table of contents.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/SUMMARY.md Adds RFC 0044 to the RFC index so it appears in the rendered book.
docs/rfcs/0044-template-aware-body-equality.md Introduces RFC 0044 text: motivation, proposed design, acceptance criteria, and testing strategy for template-aware body equality.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jensholdgaard
jensholdgaard merged commit 378eeb0 into main Jul 28, 2026
28 checks passed
@jensholdgaard
jensholdgaard deleted the rfc0044-body-equality branch July 28, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants