grit://cooking/dogfood← what’s cooking
Thursday, November 5, 2026 · Windows 11 (10.0.26200)

Dogfood on win-x64: Output contracts

5 repos · 32 commands · 7 broken · 2 slow · 5 filed

Ran every grit CLI command (about 45, including the grithub serve/checkout/checkin/integrate flow) in human, --json and --markdown on scratch repos, Hello-World, rust-lang/cargo (23.6k commits) and git/git (82.7k commits) on Windows. JSON is valid and complete at scale (all outputs parsed, paging order matches git rev-list, unicode/latin-1/control-char data stays valid JSON), and human/JSON/markdown agree on facts. The problems are in the margins of the contract: inconsistent log totals, unescaped markdown code spans, missing error kinds, --filter result shape, Windows path spellings, and an unbounded log cursor store that I could not file because the 5-report cap was already used.

os
Windows 11 (10.0.26200) · x86_64
machine
win-x64 self-hosted worker, Intel i5-12400 (4 cores listed by WMI), 16 GB RAM
versions
grit none on PATH; built from source reports 0.5.29 · main 4462c823 · git version 2.55.0.windows.5
repositories5
repofilescommits.gitnotes
octocat/Hello-World130 MB3 remote branches; clone 0.8 s
rust-lang/cargo3,07823,633218.7 MBcloned with grit in 22.1 s (78 MB received); 138 MB of the .git size is .git/grit/log-walk cursor files from my paging test, pack is 79.6 MB
git/git4,86482,712323.8 MBcloned with grit in 83.3 s (325 MB received)
scratch/repo1 (merge, tags, notes, renames, unicode names)590.01 MBused for per-command human/json/markdown comparison, plus conf-repo (conflicts), st (all status states), enc (latin-1/ctrl chars), uni (emoji/CJK names), mdinj, edge, empty-repo, bare remote + two clones for fetch/pull/push/rebase
scratch/srvroot (grit serve, bob read then write)590.01 MBgrit serve on 127.0.0.1:18777; clone, checkout, slice, checkin, integrate over HTTP
commandsgrit vs. system git, wall time
commandrepogritgitgrit/gitresultnotes
grit status (+--json/--markdown)scratch/repo1 (all states)———okmatches git status --porcelain for MM, staged/unstaged deletes, rename+modify, intent-to-add, collapsed untracked dirs. Markdown drops the old path of renames that human/JSON show (not filed)
grit log / log -n / --stat / -p / --name-only / --name-status / --numstat / --group-by author / --graph (json, markdown)scratch/repo1———wrongfiled #2539: totals 0/0 with -p/--name-status/--name-only, merge files[] differs by mode; --graph with --json is a clear incompatible_flags error
grit log --json (paged via next cursor, 600 pages)rust-lang/cargo———wrong12,000 unique commits in git rev-list order, but every page writes a growing file in .git/grit/log-walk: 604 files, 137.9 MB, never cleaned by gc/fsck. NOT FILED (report cap reached); details under problems
grit log -n 1000 (human)rust-lang/cargo75 ms61 ms1.2×ok
grit log -n 1000 --jsonrust-lang/cargo46 ms——ok937 KB, valid JSON
grit log -n 1000 --markdownrust-lang/cargo69 ms——ok
grit statusrust-lang/cargo156 ms277 ms0.6×ok
grit revs HEAD --countrust-lang/cargo529 ms183 ms2.9×slowgit rev-list --count HEAD; 2.9x, +346 ms; no commit-graph on a grit-made clone. Related to open #2462/#2467 (describe/count walks on git/git)
grit describe --jsonrust-lang/cargo532 ms93 ms5.7×slow5.7x, +439 ms, same answer 0.95.0-2058-g9511315a7. Duplicate of open #2462 / #2467 (same one-walk-per-tag cost, here on cargo)
grit revs HEAD --jsonrust-lang/cargo689 ms249 ms2.8×ok19 MB JSON for 23,633 commits vs 969 KB of oids from git rev-list; order identical to git
grit fsck --jsonrust-lang/cargo3.21 s6.01 s0.5×okfaster than git; ~200 MB RSS (git figure not comparable)
grit blame src/workspace/workspace.rs --jsonrust-lang/cargo280 ms219 ms1.3×ok
grit log --group-by authorrust-lang/cargo154 ms203 ms0.8×okgit shortlog -sne HEAD
grit diff HEAD~500 HEAD --jsonrust-lang/cargo253 ms——ok9.7 MB, valid JSON
grit clone --jsonrust-lang/cargo22.09 s——okJSON has phases; credentials are stripped from url
grit clone --jsongit/git83.31 s——ok423,309 objects, 325 MB
grit clone (human/json/markdown)octocat/Hello-World839 ms——ok
grit statusgit/git110 ms93 ms1.2×ok
grit blame builtin/log.cgit/git743 ms616 ms1.2×okgit.exe measured from mingw64\bin to avoid the cmd wrapper
grit log --all -n 20000 --jsongit/git724 ms278 ms2.6×ok23.5 MB JSON vs 2 MB git text; fine
grit diff HEAD~200 HEAD --jsongit/git154 ms289 ms0.5×ok
grit tag --jsongit/git39 ms30 ms1.3×ok1,012 tags
grit show / blame / diff / cat / resolve (json, markdown)scratch/repo1———wrongunescaped backtick in markdown code spans for names/specs: filed #2540. Binary blobs base64 in JSON, binary diffs summarized; latin-1 content flagged encoding_lossy; ctrl chars valid JSON
grit diff/stash --json outside a reposcratch/notrepo———wrongmissing kind not_a_repository: filed #2541
grit log --json --filter '.commits[].oid'scratch/repo1———wrongshape depends on result count: filed #2542
grit worktree add / list, branch, config --json on Windowsscratch/repo1———wrongmixed / and \ path spellings: filed #2543
grit commit / add / restore / rm / mv / clean / stash / reset / tag / branch / switch / notes / bundle / repack / gc / reflog expire / hooks / ignore check / patch-id / config (json, markdown)scratch/repo1———okeach mutating command run in a fresh copy per mode; outcomes agree across modes; patch-id equals git patch-id --stable; --dry-run available on the ones that matter
grit merge / pick / revert / rebase / history reword,squash,drop (+ --check, --continue, --abort, --skip)scratch/conf-repo———okconflict outcome consistent in all modes with next_steps/alternatives; merge --check JSON `oid` is the merged tree (human says tree), pick --skip prints 'Dropped 1 empty commit(s)' for a conflicted commit (not filed, minor)
grit fetch / pull / pull --ff-only / push -u / push --dry-run / merge --check / shortlog --behindscratch/wc (local bare remote)———okpull --ff-only exits 128 as documented
grit serve --setup/users/add-user/token/grant, serve, clone over HTTP, checkout, slice list/new, checkin, integratescratch/srvroot———okread-only user gets HTTP 403 from checkin classified remote_unreadable (exit 128), less clear than slice new's 'read-only access' message (not filed)
grit bundle create/verify/list, worktree list/add, notes add/list/show, reflog, fsck, hooks, gc --dry-runscratch/repo1———ok
grit init (human/json/markdown) on an existing reposcratch/repo1———wrong--markdown says 'Initialized empty repository' where human says 'Reinitialized existing repository' and JSON has reinitialized:true (not filed, minor)
worked7
  • ›Every --json output I produced parsed as valid JSON (python json.load) including 19 MB revs, 23 MB log, 9.7 MB diff, non-UTF-8 content, control characters, emoji/CJK filenames.
  • ›Errors in --json mode go to stdout as {error,kind,hint,...} with the documented exit codes (1/2/128); human errors go to stderr; 38 of 41 commands report not_a_repository with kind.
  • ›Human, JSON and markdown agree on facts for status, branch, tag, stash, reset, merge/pick/rebase conflicts, fetch/pull/push, history rewrites, clone/checkout stats.
  • ›grit status matches git status --porcelain for MM/RM/AD/intent-to-add/untracked-dir cases; patch-id matches git patch-id --stable; log paging order is identical to git rev-list.
  • ›Large-repo output is fast: log -n 1000 --json 46 ms, status on git/git 110 ms vs git 93 ms, diff --json of 200 commits 154 ms vs git 289 ms, fsck on cargo 3.2 s vs git 6.0 s.
  • ›Encoding handled: i18n.commitEncoding latin-1 commit messages come out as UTF-8 in JSON, latin-1 file content flagged encoding_lossy, binary blobs base64.
  • ›Local grit serve with token auth, clone, checkout, checkin and integrate all worked end to end and emitted consistent JSON/markdown.
problems16
  • ›FILED #2539: log --json -p/--name-status/--name-only report totals insertions/deletions 0; merge commit gets files[] under some formats and not under -p.
  • ›FILED #2540: --markdown renderers for diff/log --name-only/--name-status, blame, cat, show, resolve do not escape backticks in code spans (status, clean, add, rm, mv, stat tables do).
  • ›FILED #2541: diff --json and bare `stash --json` outside a repo omit kind not_a_repository (related to closed #2413, #2304).
  • ›FILED #2542: --filter output shape depends on cardinality: 1 result is a scalar, 0 results is null, 2+ is an array.
  • ›FILED #2543: Windows JSON/human path spelling is mixed ('/' in init/worktree list/repack/gc/errors, '\' in branch/config/worktree add) and serve banner prints a \\?\ verbatim path.
  • ›NOT FILED (cap of 5 reached; highest priority for the next session): `grit log --json` paging writes one cursor file per page under .git/grit/log-walk and never removes them. Repro: clone rust-lang/cargo, follow `next` via `grit log --json --cursor <next>` for 600 pages (20 commits each), then `ls .git/grit/log-walk | wc -l` = 604 files, 137.9 MB (63% of the 218.7 MB .git; pack is 79.6 MB). File size grows with walk depth (page 1 ~1 KB, p100 78 KB, p300 238 KB, p600 478 KB) so total disk is roughly quadratic. On git/git, 400 pages = 62.5 MB, last page 316 KB. Even a single `grit log --json` / `grit log` / `grit log --markdown` without -n adds a file. `grit gc` and `grit fsck` leave them. Expected: bounded/expiring cursor store (or the self-contained token), nothing written until the next page is requested. grit 0.5.29 main 4462c82, Windows x86_64.
  • ›Not filed, duplicate: grit describe on cargo 532 ms vs git 93 ms (5.7x) and revs --count 529 ms vs 183 ms; same cause as open #2462/#2467.
  • ›Not filed, minor: `init --markdown` on an existing repo says 'Initialized empty repository' (human/JSON say reinitialized).
  • ›Not filed, minor: `status --markdown` drops the old path of staged renames (human and JSON keep it); `tag --markdown` prints the oid twice ('at `09ad92e` `09ad92e`'); `tag -d --json` omits the deleted oid that `branch -d` returns.
  • ›Not filed, minor: `merge --check --json` field `oid` is the merged tree id (human says 'tree'), but for a real merge `oid` is a commit id; `merge --abort --json` returns branch "" instead of null.
  • ›Not filed, minor: `pick --skip` reports 'Dropped 1 empty commit(s)' for a skipped conflicted commit; human/markdown rebase status lists only --abort while JSON also lists --skip.
  • ›Not filed, minor: `log --stat --markdown` and `-p --markdown` use '### <oid>' followed by '## Changes' (heading levels inverted); `show --markdown` omits parents/committer; `reflog -n 2` JSON says truncated:true but human/markdown give no hint; `restore --dry-run` requires --hunks/--lines (agent rule says every mutation has --dry-run).
  • ›Not filed, minor: date format differs between commands: log/commit use local offsets (-08:00), branch/blame 'Not Committed Yet' use Z; markdown hunk header '@@ -1,1 +0,0 @@' is non-standard.
  • ›Not filed, observation: `grit remote --json/--markdown` and `config --json` print the full remote URL including an embedded token, while clone/checkout JSON strip credentials from url; same as git but worth redacting for agent output.
  • ›Not filed, observation: `grit skill` embeds CRLF line endings when built from a checkout with core.autocrlf=true (include_str! of the working copy), so the output depends on the builder's autocrlf.
  • ›Not filed, observation: bundle verify human text ('The bundle uses this hash algorithm', 'The bundle contains N refs') mirrors Git's own wording; check against the no-copied-strings rule.
bugs filed5
#2539 #2540 #2541 #2542 #2543already reported: #2462 #2467 #2413 #2304 #2303 #973
next time
  • ›File the .git/grit/log-walk growth issue first (kind bug/memory, medium) and check whether `-n` or `--cursor` on revs/shortlog/reflog also persist state.
  • ›Re-measure describe/revs --count with a commit-graph written by git vs by grit gc to see whether the cargo-sized gap goes away.
  • ›Run the same output-contract sweep on Linux/macOS to separate Windows-only path/format issues from shared ones, and diff each command's JSON keys against /schemas/*.json.
  • ›Test --json/--markdown on commands that need credentials (auth, push to a real HTTPS remote), update, and manager (Windows credential helper).
  • ›Fuzz markdown output with newlines, '|', fenced ``` and '#' in commit subjects, branch/tag names and file contents across show/log/branch/tag/blame (only backticks and pipes in names were covered).
  • ›Try partial clone (--blobs none), shallow clone (--depth), --bare, submodules and LFS repos against each output mode.
  • ›Concurrent runs: two grit processes paging log while one gc/commit runs, to check cursor and lock behavior.