Skip to content

docs(code-index): design a smaller decoded generation - #4560

Merged
ScriptedAlchemy merged 2 commits into
masterfrom
fix/cold-generation-admission
Oct 27, 2026
Merged

ScriptedAlchemy merged 2 commits into
masterfrom
fix/cold-generation-admission

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Refs #4506

Problem

Issue #4506 reported a cold build that held a 3.24 GB decoded generation that admission did not charge. That build peaked at a 4.11 GB footprint on this repository.

What master already fixes

#4510 removed that hold. Cold construction now writes segments to the store preparation and charges what it retains as code_index.construction.v1. A refused build parks until its demand fits. publish_atomically and CodeIndexSealedPublicationV1::encode no longer exist. Those two functions are the frames the live beta.92 daemon is stuck in.

I measured the release daemon at bbfcad7c03 in an isolated profile with a fresh clone. Each journey ran once.

Journey Footprint peak
Cold pass, this repository (issue: 4.11 GB) 1.58 GB
Cold pass, t3code (29k files) 2.45 GB
One-file successor publication, this repository 1.64 GB

During construction, the reservations stayed above occupancy. The remaining peak comes after publication, from the interactive catalog warm, which takes no reservation. That gap is now #4559.

This PR

This PR adds a design doc and changes no code. The doc is docs/plans/CODE-GENERATION-RESIDENT-SIZE-DESIGN.md, and it covers the sealed-codec candidates from the issue. The sealed codec already writes per-chunk revisions, projection rows, and clone token streams compactly. The 3.24 GB comes from expanding them during decode. The doc orders four decoded-form changes and keeps format revision 21. It explains why a later byte change rebuilds from source instead of migrating, and it gives the measurement method.

🤖 Generated with Claude Code


Devin Review

The sealed codec already writes per-chunk revisions, the projection
request, and clone token streams compactly. The decoded generation
expands them, so the 3.24 GB that issue #4506 measured is a decoded
representation cost, and no sealed-format revision is needed.

The design orders four decoded-form changes, keeps format revision 21,
explains why a later byte change rebuilds from source instead of
migrating, and records how to measure each change. It also records
the current cold-pass peaks: 1.58 GB on this repository and 2.45 GB
on t3code, with the peak now in the uncharged interactive catalog warm.

Refs #4506

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3b051a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot 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.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Corrected the documentation findings in 3b051a5. The maintained measurement procedure uses the supplied checkout and an isolated temporary profile, not a project-data copy. Decode admission now distinguishes retained bytes from measured peak demand and explicitly leaves the first-unmeasured-decode gap open. Document roster order follows the existing file rows, and the incorrect serde feature statement is removed. An independent final source review passed the exact committed document blob 8337279c8ca6abd6fa0057a3e934618463daf63a. This is documentation-only; no application build or new benchmark claim is made. New CI remains pending.

@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) October 27, 2026 02:50
@ScriptedAlchemy
ScriptedAlchemy merged commit a35ef62 into master Oct 27, 2026
15 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.

1 participant