Repository navigation
feat: push-time history index for the last-commit column and exact commit counts - #146
Merged
Merged
Conversation
|
Warning Review limit reachedNext included review available in 51 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (35)
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 |
PastaPastaPasta
force-pushed
the
feat/last-change-index
branch
from
September 29, 2026 16:38
3ad379d to
2d37b92
Compare
Push-time last-change index and exact commit count per tip; core computation matches a brute-force tree walk. Service, helper, web and backfill still to come. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Applies the simplifier's findings, prices a repository's first history index with its measured first-of-kind fee, keeps 'Search older history' from being offered while a walk runs, and lets readers skip tagged extension sections so a v2 needs no flag day. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…settle Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Publish only after the refs converge with the default branch at the index tip (H1); skip on an unreadable default branch and honour forge-import's hint only when it spawned the push (H2); a delta covers only over a live full base, and extends the newest one on the chain (M1, M2); forge-import backfills from its mirror (M3) and budgets the index in a fallback (M4); real object graph, no shallow clones (M5); stream git log (L1); bound inflation and varints (L2, L4); first-of-kind fee only for a first index (L6); the refs-only path publishes too (L7). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A history index that will not load falls back to the walk and the count walks on (H3); a delta covers only over a live full base, and of two indexes of one tip the newer stands (M1, L5); inflation is capped for the history index and the flatIndex (L2); paths must be strictly sorted and unique (L3); varints stay within safe integers (L4). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
forge-import skips its backfill when the push published the index (N1); a push that stores no pack prices and publishes the index to the same places, asks once for refs and index together, and says historySkipped when the guard declines the index (N2, N3); a grafts file is refused and none is read (N4); a fast-forward with no new objects publishes the index, priced (N5); the inflate cap is a parameter (N6). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ssions The Windows check compiles forge-core's tests: std::os::unix is not there. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
PastaPastaPasta
force-pushed
the
feat/last-change-index
branch
from
September 29, 2026 17:11
2d37b92 to
e4c909e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A push-time history index fills the file list's last-commit column and gives the ref bar an exact commit count. The web no longer walks history in the browser to get them. Design note: docs/design/history-index.md.
Before this change, the column walked 400 first-parent commits in the browser. dashpay/dash's
developis almost all merges, so 13 of 28 rows on its home said "older than 400 commits", and the walk was half of the cold home's DAPI requests. The ref bar said100+ commits.How it works
packManifestwithkind = 3. It is stored, replicated, sealed for a private repository, and read the same way as the objectLocator.kindis a plain0..=255integer in forge-core, including the registeredforge-core.v1.json.packRef.tipsis[tip]for a full index, or[tip, baseTip]for a delta.mode:oidat that path differs from its first parent's. These are the same semantics as the web walk. It also storesgit rev-list --count, the first-parent count, and the root and tip author times.git log --first-parent --diff-merges=first-parent --no-renames --root -t --raw -z. git is stopped as soon as every path is settled.platformevent (historyBytes), and a push that reuses a recorded pack publishes it too.dg repo reindexpublishes the index for the tip from a local clone (--git-dir, or the current directory), and quotes the price first. forge-import checks after its code push and backfills from its mirror, within--max-spend.N+if one of those was a merge.Cold home DAPI requests: master vs this branch
Both builds were local, against moutai, in fresh contexts, using
page-budget.spec.ts's method (1280×900, networkidle + 2.5 s + networkidle). Master is 758df8b (after #142). EachgetDocumentsrequest was decoded by document type (evidence/impl/feat-last-change-index/budget.tsv).100+ commits)33,553 commits)100+)6,391 commits)100+)2,287 commits)On every repo, the branch makes the same number of requests as master or fewer. An indexed repo reads the index with one chunk request, and no history walk remains.
Sizes and fees
From
forge-core's own code on the showcase mirrors (costs.md § History index):A delta on dash is 202 B one commit later and 6.5 KB fifty commits later, one chunk either way (about 0.0026–0.0043 DASH). With your own storage only the manifest is on chain (~0.0016 DASH quoted).
Live proof (devnet moutai, beta.6;
moutai-disk78–80 % before each write)Backfills with
dg repo reindex, run as each mirror's owner:forge-web/e2e/history-index.spec.tspasses live on dash:evidence/impl/feat-last-change-index/):budget-master-dash/: master's home, 13 rows "older than 400 commits",100+ commits;budget-branch-dash/: this branch, every row with a real commit and date,33,553 commits;older-preact/: "not changed since …" and Search older history on an unindexed repo, filling every row.Tests
pack/historytests.rs,repo.rs):forge-contracts/fixtures/history-index.hex).mainis rejected, diverged or gone;36-history-index:dg repo reindexbackfills a repository pushed without one.Review
historySkipped.A CLI e2e step (36, "2b") covers the fast-forward case.
🤖 Generated with Claude Code