grit://cooking/changelog← what’s cooking
Monday, November 9, 2026 · release v0.5.33

33 changes landed on main

17 roadmap steps across 2 items · 4 issue fixes · 12 other changes

grit v0.5.33 fixes four bugs (truncated serve clones, bundle prerequisites, Windows backslash names, upload-pack memory) and restructures grit-cli into separate command, dispatch and render layers ahead of 0.6.

  • ›grit serve: fix truncated git-upload-pack responses that broke clone with early EOF (#2568)
  • ›upload-pack deduplicates repeated want/have lines, so duplicate-heavy requests no longer grow memory linearly (#2390)
  • ›bundle verify/unbundle accept unreferenced prerequisites when their history is readable (#2569)
  • ›Windows checkout rejects tree entries with a literal backslash in the name (#2563)
  • ›grit-cli split into per-command args, dispatch and render layers with one error renderer; JSON output shapes unchanged
  • ›grit-lib: deprecated shims removed, API audit and semver checks added for 0.6.x, plus 0.6 overview and migration docs
$ git log d8dab25e..v0.5.3390 commits on GitHub ↗300+ files +7,575 −10,330
Highlightsmeasured by the reviewers, before → after
Split main.rs into per-command args, per-command dispatch and a small dispatcher
main.rs lines20× better████████████████████████ 6,004 lines █ 297 lines
Three layers for checkin, integrate, sync, share, slice, update, auth, serve
Largest share command module3.4× better████████████████████████ 2,090 lines ███████ 619 lines
Three layers for gc, repack, fsck, config, hooks, ignore, init, skill
commands/gc.rs lines3.2× better████████████████████████ 1,719 lines ███████ 535 lines
upload-pack stores every duplicate `want`: 18.8M repeated wants = 620-680 MB RSS (git: 4.6 MB)
2M duplicate wants peak RSS (debug grit)2.6× better████████████████████████ 106,400 KiB █████████ 41,424 KiB
Three layers for diff and show, with a streaming diff renderer
600-file/400-line patch median, system git to branch2.1× better████████████████████████ 60.8 ms ████████████ 29.3 ms
roadmap · Output separate from logic in grit-cli11 steps
  • ›Rendering layer module with a purity lint and a layer ratchet0d69f51b

    This refactor creates a dedicated CLI rendering layer, moves generic human/Markdown/diff helpers into it, introduces a streaming-render contract, and leaves output.rs focused on emitting and JSON filtering. It also adds a source-layer line ratchet and documents the parse/outcome/render boundary.

    CLI other-layer source lines: 50,133 non-comment Rust lines → 49,196 non-comment Rust lines (2% better)
  • ›Split main.rs into per-command args, per-command dispatch and a small dispatcheref3572af

    This reorganizes the monolithic CLI into per-command Clap argument modules and per-command dispatch functions. `main.rs` now retains process setup and lifecycle handling, while a 79-line router sends each parsed argument value to its command module; contract tests and help snapshots preserve the CLI surface.

    main.rs lines: 6,004 lines → 297 lines (20× better)tiny status mean vs system Git 1.147 ms (500 runs): 2.1 ms → 2.1 ms (0% better)tiny status median vs system Git 1.139 ms (500 runs): 2.0 ms → 2.1 ms (1% worse)tiny status median peak RSS (500 runs): 10,209,280 bytes → 10,432,512 bytes (2% worse)
  • ›One error renderer for human, --json and --markdown3206fb9c

    This change creates a single CLI presentation module for failures and routes normal command errors, clap parse errors, hook output, and top-level fatal lines through it. Human output remains on stderr, while JSON and Markdown remain on stdout with the existing structured schema and hints.

  • ›Three layers for fetch, pull, push, clone, remote, bundle4daf676a

    This change separates fetch, pull, push, clone, remote, and bundle into parse, execution-outcome, dispatch, and render responsibilities. OutputMode decisions now happen in network dispatch, while stable CLI DTOs and human/Markdown renderers live under render/ without changing JSON field shapes.

    clone/local@synth-10k median wall: 823.2 ms → 823.6 ms (0% worse)clone/local@synth-10k peak RSS: 30,208,000 bytes → 30,085,120 bytes (0% better)fetch/incremental@git-git median wall: 55.4 ms → 56.4 ms (2% worse)fetch/incremental@git-git peak RSS: 46,129,152 bytes → 46,694,400 bytes (1% worse)
  • ›Three layers for branch, tag, switch, merge, pick, revert, rebase, history, shortlog9150a54f

    This change separates branch, tag, switch, merge, pick, revert, rebase, history, and shortlog presentation into dedicated render modules while keeping command modules focused on orchestration. It also exposes typed bounded ahead/behind commit outcomes for shortlog and now correctly snapshots that public API.

  • ›Three layers for status, add, commit, reset, restore, rm, mv, clean, stash, worktreeec136f9e

    This partial change locks seven new three-mode output snapshots and moves status dashboard derivation into a typed grit-lib summary, with a small CLI conflict-heading renderer. It preserves the sampled status/stash/worktree output, but its required package suite and API ratchet are red and existing tests are weakened, so it should not integrate yet.

  • ›Three layers for diff and show, with a streaming diff renderer3b5e3dd3

    This refactor separates diff request dispatch, library-owned presentation outcomes, CLI DTO conversion, and streaming output while preserving the v1 output contract. The round-2 patch restores the exact streamed JSON key set and removes a duplicate structured-diff computation from the large worktree patch path.

    600-file/400-line patch median, origin/main to branch (40 interleaved release runs): 29.1 ms → 29.3 ms (1% worse)600-file/400-line patch median, system git to branch: 60.8 ms → 29.3 ms (2.1× better)600-file/400-line patch median peak RSS, origin/main to branch (20 runs): 23.9 MiB → 24.2 MiB (1% worse)
  • ›Three layers for gc, repack, fsck, config, hooks, ignore, init, skill575ce04a

    Moves maintenance/config/fsck/hooks/ignore/init/skill presentation into dedicated CLI render modules while keeping the v1 JSON DTO contract CLI-owned. Adds typed GC phase and fsck grouping outcomes to grit-lib, then completes the round-3 size fix by relocating GC phase mapping so commands/gc.rs is 535 lines.

    commands/gc.rs lines: 1,719 lines → 535 lines (3.2× better)force-repack mean (two rounds combined): 506.3 ms → 506.2 ms (0% better)commit-graph mean (two rounds combined): 4.1 ms → 4.1 ms (0% worse)gc maximum observed peak RSS: 18,333,696 bytes → 18,534,400 bytes (1% worse)
  • ›Three layers for log, revs, cat, blame, reflog, describe, resolve, notes, patch-id, merge-base80e9aef0

    This change separates log-adjacent CLI commands into command, dispatch, and render layers while moving reusable presentation decisions for log, rev listing, and cat into typed grit-lib APIs. The round-two fix commits the generated public API contract and updates the ratchet so CI recognizes the intended surface.

    Committed public API snapshot lines: 32,055 lines (branch base to reviewed branch) → 32,259 lines (branch base to reviewed branch) (1% better)
  • ›Three layers for checkin, integrate, sync, share, slice, update, auth, serve50927a4b

    This separates CLI command execution from rendering for checkin, integrate, sync, share, slice, update, auth, and serve while preserving the existing human, JSON, and Markdown contracts. Domain classifications for sync, share filtering, and check-in refusal now come from typed grit-lib outcomes; the round-2 fixes specifically remove the remaining string-derived refusal decision and record the expanded public API.

    Largest share command module: 2,090 lines → 619 lines (3.4× better)
  • ›Enforce the three-layer shape and finish the shrink5e28d038

    This stack separates CLI argument/dispatch code, command execution, and rendering across the command surface, and adds architecture contracts intended to prevent output-mode branching and renderer implementations from returning to commands/. The round-3 fixes extend those contracts to directory-style commands and relocate the remaining cat/log/revs/share/status/show/diff rendering paths.

    CLI non-rendering lines: 42,599 lines → 40,483 lines (5% better)CLI render lines: 13,471 lines → 16,472 lines (22% better)
roadmap · Cut grit 0.6.0 with a stable library API6 steps
  • ›semver-check ready to block 0.6.xceabc3b2

    Automatically chooses the newest reachable stable v0.6+ tag as grit-lib’s semver baseline while preserving the pre-0.6 pin fallback. It also enforces additive-only 0.6.x evolution, removes the temporary pin during ratchet refresh, and wires the check into CI and the local gate.

  • ›Re-run the API audit with a generatordc987869

    Adds a deterministic generated API audit to API.md and enforces it in CI, with current ratchet summaries, module usage, Repository handles, and residual offenders. The round-two fix makes the handle table accurate by deduplicating public-api entries, filtering value/service getters, and rendering nested generic types correctly.

  • ›Remove the deprecated shims before they freezeef004a39

    Removes the remaining pre-0.6 deprecated grit-lib shims, leaving the supported Repository/focused-handle API as the sole public path. It also adds a rustdoc-JSON ratchet that holds public deprecations at zero and migrates affected callers and tests.

    Committed public API snapshot size: 32,202 lines → 32,156 lines (0% better)
  • ›Docs: the grit-lib 0.6 API overview3c157a3b

    Adds a single first-read page for grit-lib embedders covering repository entry points, focused handles, options/progress/error conventions, extension points, and the 0.6.x compatibility promise. The page embeds a real Rust example that initializes a temporary repository and exercises objects, refs, diff, and typed errors, with a regression test that runs it.

  • ›Docs: migrating from 0.5.x to 0.6a5071d61

    Adds a practical 0.5.x-to-0.6 library migration guide and an enforced generated table covering every removed public API path. The round-3 fix closes the validator gap for replacements written as a grit_lib path followed by a human annotation.

  • ›Pre-bump refresh after the grit-cli output item$(git -C

    This refresh consolidates the pre-0.6 public API snapshot and ratchets, removes obsolete migration shims and deprecated aliases, updates thin CLI call sites, and strengthens the API audit script. The round-2 fix restores the six affected full-test call sites through supported Repository APIs or the explicitly unstable test-support surface.

    Public API snapshot lines: 32,316 lines → 32,266 lines (0% better)
issues fixed4
  • ›grit serve truncates git-upload-pack responses with several objects (~>200 KB): git clone fails with early EOF#25688d43c7e5

    Keeps smart-HTTP upload-pack's cancellation guard alive inside the blocking producer until pack generation and its final buffered write finish. This prevents medium and large multi-object fetch responses from being cut off when the async handler hands the streaming body to Axum.

  • ›bundle verify/unbundle reject an incremental bundle whose prerequisite exists but is unreferenced#256913e3d536

    Bundle verification now accepts an unreferenced prerequisite only when its exclusive commit/tree/blob history is actually readable. The round-3 correction ensures a shallow boundary reached through a prerequisite's parent is validated before traversal stops, preventing incomplete graphs from being accepted.

  • ›Windows: clone/checkout accepts a tree entry named `back\slash.txt` and writes it as back/slash.txt (git rejects it)#25638d22f7f0

    This change prevents a Windows checkout from interpreting a literal backslash inside one Git tree-entry name as a directory separator. It returns a dedicated typed error while keeping legal backslash filenames available on non-Windows systems and when NTFS protection is disabled.

  • ›upload-pack stores every duplicate `want`: 18.8M repeated wants = 620-680 MB RSS (git: 4.6 MB)#2390fcbd0226

    Deduplicates repeated upload-pack `want` records while parsing protocol v0 and repeated `want`/`have` records while parsing protocol v2. First-seen order and first-want capabilities are preserved, so pack output is unchanged while duplicate-request memory no longer grows linearly.

    2M duplicate wants peak RSS (debug grit): 106,400 KiB → 41,424 KiB (2.6× better)2M duplicate wants elapsed (debug grit): 2.6 seconds → 2.8 seconds (8% worse)
other changes12
  • ›Fix the v0.5.32 release build5126d3d4

    This changes the private Unix byte-range lock helper to accept the same `c_short` type used by `libc::flock.l_type`. It removes the Apple aarch64 compile mismatch without changing locking behavior or public APIs.

  • ›Main keeper: make CI on main green (rustdoc)df584d45

    Updates public documentation for the VM cache-drop helper so rustdoc no longer resolves links to private constants. Runtime behavior, public API, repository formats, and protocol behavior are unchanged.

  • ›Main keeper: make CI on main green (rustdoc)df584d45

    The review branch contains no changes relative to current origin/main because the rustdoc correction has already landed as df584d455. That correction replaces two links to private constants with literal /proc paths, preserving documentation while satisfying strict rustdoc.

  • ›Follow-up: Rendering layer module with a purity lint and a layer ratchetf615c136

    This change creates a dedicated CLI rendering layer, migrates existing human/Markdown rendering into it, and adds a source-level purity test plus a line-count ratchet. Follow-up commits harden cfg(test) skipping for literals and nested block comments.

  • ›Follow-up: Three layers for status, add, commit, reset, restore, rm, mv, clean, stash, worktree575ce04a

    This branch moves status dashboard assembly behind the supported `repo.status()` handle and locks status, stash, and worktree rendering with snapshots. The follow-up rewrites all four commits so their messages meet factory hygiene without changing the reviewed implementation.

  • ›Main keeper: make CI on main green (rustdoc)575ce04a

    Fixes the two broken intra-doc links that made strict workspace rustdoc fail. One comment now describes the clap parse/build behavior without linking a trait-provided method that rustdoc cannot resolve on `Cli`; the other uses an absolute crate path for `full_cli_command`.

  • ›Main keeper: make CI on main green (public-api, fmt, clippy)dc987869

    Refreshes the committed grit-lib API snapshot to match the pinned generator, formats the two rustfmt-reported expressions, and removes obsolete CLI markdown renderers plus one unused re-export. The live render implementations and their tests remain in grit-cli/src/render/*.

  • ›Main keeper: make CI on main green (semver-check, clippy, public-api, scripts, fmt)92e7f537

    Repairs semver baseline selection by pinning the API ratchet to a commit that exists on main. It also prevents future missing 40-character pins from reaching cargo-semver-checks as invalid revisions, while preserving named-ref behavior and formatting the two files that failed rustfmt.

  • ›Main keeper: make CI on main green (scripts, public-api, semver-check)a5071d61

    Adds a Git-native fallback for API consumer file counting when ripgrep is unavailable, eliminating the scripts and public-api CI crashes. Refreshes the generated API audit snapshot and adds a regression test without changing product code or public API.

  • ›Follow-up: Enforce the three-layer shape and finish the shrinkd71fe02f

    Moves grit-cli command execution into an enforced three-layer command/dispatch/render structure, with private dispatch-selected emit types and architecture contract tests. It also adds the small grit-lib typed outcomes needed by the thin CLI and corrects the public API snapshot by removing a stale duplicate GcPhaseReport declaration.

    GcPhaseReport declarations in public API snapshot: 2 declarations → 1 declarations (2.0× better)public API snapshot line count: 32,337 lines → 32,316 lines (0% better)public API ratchet: 32,337 lines → 32,316 lines (0% better)fresh public-api check differing hunks: 2 hunks → 1 hunks (2.0× better)
  • ›Main keeper: make CI on main green (public-api, scripts, rustdoc)e3a8d9f4

    Synchronizes the committed grit-lib API snapshot and its generated 0.6 migration table with the pinned API tool, and repairs four stale intra-doc links introduced by the CLI layering change. This is a generated-data and documentation-only correction with no runtime or public API behavior change.

  • ›Main keeper: make CI on main green (public-api)165b9069

    There is no integration delta: the author dropped their redundant snapshot commit after the equivalent fix landed on main, so the reviewed branch now points exactly at origin/main. The landed snapshot normalization is locally valid, but a separate shallow-checkout problem still leaves GitHub’s public-api job red.

$ git log --oneline d8dab25e..v0.5.33compare on GitHub ↗
165b9069docs: regenerate API.md audit after rebase onto main
a50fab15docs: refresh 0.6 migration table after shim removal
7e415080test: fix full-tests after pub(crate) graft/shallow helpers
8579110fmaint: pin semver baseline to pre-bump refresh commit
95167562maint: pre-0.6 API refresh after CLI output separation
e3a8d9f4ci: sync public-api snapshot and 0.6 migration table
d71fe02fgrit-lib: drop duplicate GcPhaseReport block from public API snapshot
5ecac6bcgrit-cli: fix rustdoc links after log/revs stream split
d6cc765dMerge branch 'factory/migrating-to-0-6-docs'
a5071d61ci: align api_ratchet tests with slimmed ratchet script
6297c336docs: map prelude InitOptions::environment after main rebase
5e28d038cli: enforce three-layer architecture and contract tests (steps 7441–7444)
becf59b0fix: validate grit_lib path prefix in annotated replacements
b9481d17fix: validate migration replacements and extract deprecation notes
4c38b488docs: add 0.5.31→0.6 migration guide and api_migration generator
92e7f537fix: repair semver baseline pin and ignore missing object names
50927a4bcli: add three-layer render boundaries for server workflows
3c157a3bMerge branch 'factory/api-0-6-overview'
3fc8fcf6Merge branch 'factory/ci-green-7488'
2e10a862fmt: rev_parse test imports after main rebase
e2541982fmt: api_overview example and integration module order
5d1d15e3docs: add grit-lib 0.6 API overview page and example
dc987869chore: refresh public-api and audit after rebase onto main
9d4f06cdFix Repository accessor audit classification
5a85fd31Add generated API audit for grit-lib/API.md
ef004a39fix: restore rev_parse test imports and rustdoc deprecation ratchet
555669a5fmt: apply rustfmt to grit-cli diff dispatch
aa09cfe7lib: bump api-ratchet semver_baseline after shim removal
57aaebeclib: remove pre-0.6 deprecated public shims
3c7697a4ci: fix fmt, clippy, and public-api check on main
ceabc3b2Merge branch 'factory/semver-check-7480'
80e9aef0style: rustfmt after log render integration
c7f5633echore: refresh api-ratchet after rebase conflict resolution
b6b73b00chore: regenerate public-api and align presentation types with API conventions
fd2bf993style: cargo fmt after three-layer log refactor
914c6d1dcli: finish three-layer log revs cat render split
440d21c4cli: three-layer render for log-related commands (factory 7439 step 6)
c61a682ascripts: ignore prerelease tags in semver baseline resolution
6377bdc6scripts: auto semver baseline for 0.6.x and gate stage
fcbd0226Merge branch 'factory/upload-pack-dedup-wants'
924d0a12Fix upload-pack duplicate want memory blowup
8d22f7f0Fixes #2563: reject backslash in tree entry names on Windows
575ce04acli: maintenance three-layer render for gc, fsck, config, hooks, ignore, init, skill
3b5e3dd3Merge branch 'factory/diff-show-stream-7438'
5d50e729grit-lib: refresh public-api.txt for diff presentation helpers
a05226edgrit-cli: restore diff dispatch after rebase onto main
ec136f9eConsolidate StatusSummary API under grit_lib::status
c50bddf7Address review: status handle API, snapshots schema, tests
60d189aegrit-lib: add StatusSummary assembly and conflict classification
1c07c896grit-cli: restore render error/fetch/history modules after rebase
577a70ebgrit-cli: fix diff v1 JSON keys and avoid duplicate structured()
80cd850fcargo fmt
9621d554grit-cli: extract diff dispatch and refresh layer ratchet
989d660bgrit-cli: add status, stash, and worktree output snapshots
503da3d7grit diff: buffer JSON in memory when --filter is set
72df1e7dgrit-cli: update error_map allowances for diff command modules
2f36aa1egrit-cli: fix nested test import path for convert module
0286ca11cargo fmt
8ff433e4grit-cli: fix diff stream parity test import
4ec98413grit-cli: clippy fixes for diff command split
86122d35grit-lib: export line_stat_for_target_file for diff DTO mapping
694359b1cargo fmt
cf3ec017grit-cli: drop dead tree outcome helper and trim diff re-exports
e43e5760grit-cli: refresh diff JSON schemas after DiffTotalsJson doc
788cd9b0diff/show: streaming render layers and grit-lib presentation helpers
9150a54fgrit-cli: three-layer render for branch, tag, switch, merge, pick, revert, rebase, history, shortlog
05524bb7grit-lib: add BoundedCommitSide on TargetComparison for shortlog truncation
4daf676afix: export render fetch module after rebase merge
a44a3412fix: merge render mod with main error layer after rebase
8c782553chore: refresh remote JSON schema descriptions after render move
8cda5d18fix: rustdoc link in args argv parser
7fcff632fix: rustdoc links broken after network render split
1a885e1dcli: split network commands into outcome, dispatch and render layers
3206fb9cgrit-cli: centralize error rendering in render/error.rs
f615c136grit-cli: nest block-comment depth in purity scan
f5bb8f15grit-cli: track multiline block comments in purity scan
83336f93grit-cli: make render purity brace scan lexical
ef3572afcli: refresh layer-ratchet after per-command split
ba6ec46dcli: prune unused imports in args and command dispatch modules
e9026b7ccli: move nested action enums to args modules and fix help snapshots
66813b66cli: per-command args modules and thin dispatch router
1d468868cli: add help_output_snapshots and split main.rs into args, dispatch, contract tests
0d69f51bgrit-cli: harden render purity scanner
4e662168grit-cli: keep render layer free of std::env
88f2f0c3grit-cli: add render layer, purity lint, and CLI line ratchet
13e3d536Queue shallow parents for bundle prerequisite validation
8dc1e871Fix shallow bundle prerequisites: still validate commit tree
8ead7b34Fixes #2569: accept dangling bundle prerequisites with complete history
8d43c7e5Fixes #2568: keep upload-pack cancel guard alive while streaming
df584d45Fix rustdoc private intra-doc links in vm_hygiene