Skip to content

docs(rfc): rfc 0023 — bounded template memory (rfc 0001 amendment) - #352

Merged
jensholdgaard merged 2 commits into
mainfrom
rfc0023-bounded-template-memory
Jul 4, 2026
Merged

docs(rfc): rfc 0023 — bounded template memory (rfc 0001 amendment)#352
jensholdgaard merged 2 commits into
mainfrom
rfc0023-bounded-template-memory

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Drafts RFC 0023 in response to the 2026-07-04 scale-run finding (recorded alongside as docs/benchmarks.md §9.10): the miner mints templates without bound — ≥56k templates by the 1.8 GiB mark of LogHub HDFS_v2's Hadoop daemon logs, ~linear memory at ≈2× corpus bytes, OOM-killed at 31.5 GiB RSS mining the 16 GiB corpus on the hardware baseline. The production ingester shares the path, so a single tenant's log shape can OOM a pod (hazards #1/#2).

Design: three MinerConfig bounds — max_node_children (100, Drain3's mechanism), max_templates (20k per tenant), max_line_tokens (512) — with a single overflow rule everywhere: parse-failure with body retained, never force-merge (§3.1 held load-bearing). Drain3's LRU eviction is explicitly rejected for v1 (evicting ids already written to Parquet breaks the RFC 0017 registry); telemetry rides the existing parse_failures counter with a reason attribute per the error.type convention.

§5 pins seven scenarios; RFC0023.7 is the falsifier — this exact HDFS_v2 run completing under 8 GiB peak RSS, or the design reopens.

Docs-only (mdbook build verified). Status drafted — flipping to specified is the maintainer's §5-criteria sign-off; per §5.3 implementation holds for explicit go.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a new RFC entry outlining limits for template growth, with updated acceptance criteria and telemetry details.
    • Expanded benchmark notes with a new results section covering a large corpus run, including observed failure conditions, partial diagnostic results, and follow-up steps.

…§9.10 scale-run record

The 2026-07-04 scale-run finding: the miner mints templates without
bound (≥56k on 1.8 GiB of HDFS_v2; 31.5 GiB RSS OOM at 16 GiB).
Three MinerConfig bounds (max_node_children, max_templates,
max_line_tokens) with one overflow rule: parse-failure with body
retained, never force-merge (§3.1). benchmarks.md §9.10 records the
attempted authoritative run and the partial diagnostics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jensholdgaard
jensholdgaard requested a review from Copilot July 4, 2026 12:57
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 52 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: 18127743-601e-49cb-8340-b483cd831006

📥 Commits

Reviewing files that changed from the base of the PR and between 8530937 and 2043c22.

📒 Files selected for processing (1)
  • docs/rfcs/0023-bounded-template-memory.md
📝 Walkthrough

Walkthrough

Adds RFC 0023 proposing bounded per-tenant template memory limits (max_node_children, max_templates, max_line_tokens) with parse-failure-based overflow handling and telemetry updates, links it in the docs TOC, and documents a benchmark run that hit an OOM motivating the proposal.

Changes

Documentation Additions

Layer / File(s) Summary
Benchmark evidence
docs/benchmarks.md
Adds a section on a 16 GiB baseline run where the B2 store build OOM-killed due to unbounded template growth, referencing RFC 0023 as the fix path.
RFC summary and motivation
docs/rfcs/0023-bounded-template-memory.md
Adds metadata, heading, and summary/motivation sections describing the OOM hazard and the "fail-honest, no-silent-merge" requirement.
Design: bounds and overflow routing
docs/rfcs/0023-bounded-template-memory.md
Specifies the three new MinerConfig bounds, a decision flowchart, rejected alternatives, and no-change guarantees for healthy corpora.
Telemetry and configuration
docs/rfcs/0023-bounded-template-memory.md
Documents telemetry attribute extensions, configuration surface plan, and alternatives considered.
Acceptance criteria and testing
docs/rfcs/0023-bounded-template-memory.md
Lists RFC0023.1–.7 acceptance scenarios, testing strategy, open questions, and references.
RFC index link
docs/SUMMARY.md
Adds a TOC entry linking to the new RFC document.

Estimated code review effort: 2 (Simple) | ~10 minutes

Related PRs: None mentioned.

Suggested labels: documentation, rfc

Suggested reviewers: None specified.

Poem

A rabbit hops through docs anew,
With RFC 0023 in full view,
Bounded templates, no more OOM,
No silent merges, no more doom,
Just parse-failure, honest and true. 🐇📄

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is substantive, but it does not follow the required Summary/Related/Checklist template or include the requested links. Rewrite it using the template headings, add a Related section with RFC/# links, and fill out the checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the RFC 0023 bounded template memory amendment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0023-bounded-template-memory

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

This PR adds a new documentation RFC (RFC 0023) proposing bounded memory behavior for the template miner, motivated by an OOM observed during a 16 GiB LogHub HDFS_v2 scale run, and records the benchmark finding that led to the RFC.

Changes:

  • Adds RFC 0023 describing three MinerConfig bounds (max_node_children, max_templates, max_line_tokens) with a “fail-honest, never force-merge” overflow rule.
  • Links RFC 0023 into the mdbook navigation.
  • Documents the 2026-07-04 scale-run result as docs/benchmarks.md §9.10 and ties it to RFC0023.7.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/SUMMARY.md Adds RFC 0023 to the mdbook TOC.
docs/rfcs/0023-bounded-template-memory.md New RFC draft defining bounded template memory design + acceptance criteria/testing strategy.
docs/benchmarks.md Adds §9.10 describing the blocked 16 GiB run and the miner OOM finding motivating RFC 0023.

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

Comment thread docs/rfcs/0023-bounded-template-memory.md
…markdown)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

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

@jensholdgaard
jensholdgaard merged commit 77851ed into main Jul 4, 2026
21 checks passed
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