Scale changed-path ledger for large repositories#2
Merged
Conversation
Implement layered multi-ecosystem lane environments, adapter SDK and runtime lifecycle support, including opaque service secrets and macOS/Linux copy-on-write verification. Add native agent hook and ACP capture with durable evidence, provenance, CLI, HTTP, MCP, and OpenAPI surfaces.
BREAKING CHANGE: human output now uses the unified terminal renderer.\nUse --color never instead of --no-color, and use JSON or NDJSON\nfor automation.
forhappy
marked this pull request as ready for review
July 16, 2026 21:33
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.
Summary
Why
Large repositories such as the Linux kernel can contain 100,000 or more files. Recording and applying lane changes previously risked repeated full-tree traversal, stale daemon ownership, and WAL/checkpoint visibility races. Those costs made small changes scale with repository size instead of changed-path count.
This change makes candidate discovery proportional to actual changes, binds observer data to authenticated durable publication, and performs an automatic full reconciliation when continuity cannot be proven.
Impact
Status, diff, record, and structured patch workflows remain fast for sparse changes in large workspaces. Materialized and transparent COW lanes use the same changed-path authority, while stale or incompatible workspaces are rejected with instructions to reinitialize.
Strict 100,000-file runs passed on native Linux and macOS. On the Linux run, sparse materialized records completed in approximately 0.18-0.57 seconds and patches in approximately 0.21-1.21 seconds. The macOS run passed the same candidate-count and no-full-scan assertions.
Validation
cargo fmt --all -- --checkcargo check -p trail --all-targetsbash -n scripts/cli-scale-bench.shBranch ancestry
The local repository already contained an unpublished integration stack. Consequently, this head is 147 commits ahead of GitHub's current
main; this PR includes that inherited ancestry as well as commit9e10f7c. Land the ancestor stack first or rebase/retarget this branch before merging if the PR must contain only the changed-path-ledger delta.Follow-up
This is intentionally a draft. A later hardening pass can complete the full release matrix and refine the materialized-lane REST/daemon lifecycle edge case before final release promotion.