21 roadmap steps across 2 items · 35 issue fixes · 17 other changes
v0.5.29 mostly narrows grit-lib's public API toward 0.6, alongside many performance fixes, security fixes for URL credentials and serve hooks, and new push modes.
Adds a monotonic quality ratchet for grit-lib's public API, tracking ten API-shape smells from the committed public API snapshot and pinned-nightly rustdoc JSON. It wires checks into local gates and CI, records the current baseline, documents usage, and includes synthetic regression tests; round 2 fixes glob re-export traversal, exact free-function classification, and Result error aliases.
Adds the durable public-API conventions and 0.6 stability policy for grit-lib, links that policy from all required documentation entry points, and updates dependency examples to the current 0.5 release line. A new integration regression test ties those snippets and the crate-doc version sentence to CARGO_PKG_VERSION; a small stash stored-path fix restores compilation of the branch base.
Adds a complete, reproducible inventory of grit-lib’s public modules, root re-exports, and Repository handle accessors. Each row records current size and usage, API-hygiene ratchets, a keep/merge/private decision, roadmap ownership, and rationale.
This removes duplicate public routes to identity and pathspec APIs. Identity remains at grit_lib::ident, while pathspec remains at grit_lib::worktree::pathspec; workspace callers, documentation, and generated API baselines now agree with those canonical locations.
Adds a pinned cargo-semver-checks runner for grit-lib, a Make target, and a dedicated non-blocking CI job whose full report is written to the Actions summary. Documents the baseline and 0.6.x enforcement policy, while a separate repair commit restores the gate after concurrent main changes broke compilation and API-layout checks.
Makes the low-level date implementation private while retaining safe parsing, formatting, timezone, and TZ-refresh entry points at config::git_date. It regenerates the public API and hygiene artifacts so the supported surface contains no libc types or public unsafe functions, while moving existing helper coverage in-crate without dropping assertions.
This removes duplicate grit-lib crate-root access paths and moves consumers to their canonical domain modules. The round-two patch closes the only prior blocker by updating all six feature-gated integration modules that still imported removed root aliases.
Consolidates grit-lib's duplicated public routes so every supported item has one canonical domain path while retaining convenience exports through the prelude. The follow-up repairs every benchmark/full-test caller and turns the prelude check into a real compile-time/runtime guard rather than a vacuous import test.
This change removes hundreds of internal remote/fetch/push/transport/protocol helpers from grit-lib's supported API while preserving the embedder-facing transport and HTTP client abstractions. It narrows barrels and visibility, moves negotiator coverage in-crate, updates tests/docs/snapshots, and keeps grit-protocol and grit-http-server working.
Narrows the supported `grit-lib` surface across revwalk, diff, porcelain, commit, blame, and apply while preserving the models and outcomes consumed by the CLI and embedders. Canonical root re-exports replace implementation-module paths, workspace snapshots remain public and serializable, and the API ratchet now prevents public `_impl` helpers.
Narrows the supported `grit-lib` surface for objects, maintenance, and bundles by replacing broad re-exports with consumer-scoped exports and crate-private internals. It preserves the moved coverage as in-crate tests and regenerates the public API and ratchet snapshots.
This sweep removes 368 supported API lines from its branch base by making internal refs, config, worktree, index, and utility symbols crate-private while retaining supported backend traits and canonical handles. The round-2 fix removes every accidental API expansion, restores hidden treatment for fuzz/repo_relpath, and corrects the generated snapshot and audit metrics.
Adds an explicitly unstable test-support feature and a shrink-only ratchet that prevents test, fixture, probe, and benchmark concepts from leaking into grit-lib's supported public API. It also verifies default-feature builds separately and wires visible and hidden API checks into local and CI gates.
Moves deterministic synthetic repository generators and EWAH benchmark fixtures behind grit-lib’s unstable test-support feature, removes both former stable public paths, and updates all benchmark/test consumers. The generator implementation is source-preserving apart from the requested history_rewrite_spec rename, and the compatibility alias keeps unstable-bench-helpers working temporarily.
Moves worktree syscall, checkout spool, has_changes, and diff blob-read probes into the unstable `test_support::counters` surface and moves the status race hook into `test_support::status`. Default builds retain only cfg-elided no-op hook call sites, while public options and root exports lose test-only fields/items.
Adds an injectable ownership policy to repository discovery and clone safety, replacing test-only environment/options switches with a supported typed API. The default system implementation preserves normal UID/SUDO_UID behavior and the fast discovery path, while embedders can deliberately treat repositories as foreign so safe.directory is enforced.
This removes internal pack, pack-store, index-pack, and commit-graph testing controls from grit-lib's supported production API. Cross-crate tests use a feature-gated test_support surface, while hooks used only by library unit tests remain compiled only under cfg(test).
Moves refs, reftable, repository, and rebase instrumentation out of the supported library surface into the feature-gated `test_support::inject` area while retaining existing failure, pause, and patch-id regression coverage. Round-2 commits add narrowly justified hygiene exemptions for that test-only state and register the already-public module layout needed by the package gate.
This change replaces scattered init-time filesystem probe functions with one typed `FilesystemCapabilities` API while retaining single-capability detection for refs. It also renames the smart-HTTP best-effort client factory hook from “probe” to “preflight” across the library and implementors, with compatibility coverage and a smaller public-test-item allowlist.
This removes three obsolete Git test-harness controls from the captured repository environment and replaces reftable auto-compaction control with a typed repository option. It also threads explicit filesystem/ownership behavior through repository options, updates the public API snapshot and docs, and now keeps the canonical divergence module compliant with the module-doctest guard.
Moves fuzz-only and integration-test controls out of grit-lib’s supported default API, removes the deprecated benchmark-helper feature alias, and closes the public test-hook ratchet at zero exceptions. The round-2 follow-up documents the patch-id test counters and keeps StageOptions test fields crate-private in normal builds while preserving test-support access.
Pull now recognizes that an unborn branch has no commit state to stash. It fetches and adopts the remote tip directly, while still refusing a checkout that would overwrite a local path and without creating refs/stash.
Adds bounded header, request-body, and response-write idle timeouts to the smart HTTP server, plus a fail-fast cap on concurrent Git operations. Exposes configurable limits through the server API and grit serve, and includes stress tests proving stalled authenticated clients no longer starve repository traffic.
This change makes batched ref validation look up each distinct object only once, and routes packed-object checks through pack indexes before attempting nonexistent loose paths. The round-2 amendment preserves loose-object negative-cache speed while rechecking fanout metadata, so objects written externally remain visible.
Replaces per-candidate history counts in describe with a commit-graph-ranked backward walk that propagates candidate ancestry flags, stops once the best candidate cone covers the queue, and runs one exact range count only for the selected tag. It adds Git-compat merge coverage, bounded-work regressions, Criterion/grit-bench scenarios, and updates the revwalk guide.
Receive-pack hooks now observe request cancellation, run in an isolated process group/tree when invoked by the server, and are terminated when a client disconnects or the server's shutdown grace expires. HTTP request cancellation is wired through blocking receive-pack work so Tokio runtime shutdown is bounded instead of waiting for a sleeping hook.
Removes the round-2 shallow-fetch cleanup that raised peak RSS and retains stronger Git-compatible coverage for unshallowing a repacked, delta-heavy local remote. It also keeps the raw stored-path stash compile repair needed by this main snapshot; the final fetch production path is unchanged from origin/main.
This change prevents symbolic-ref target strings from injecting extra lines or unsafe paths into ref storage. It validates targets centrally in `RefTransaction::validate`, preserving Git's accepted one-level/non-`refs/` targets for non-HEAD symrefs while applying stricter storage-safe rules to `HEAD`.
Commit auto-staging now respects repositories that hide untracked files: it stages tracked modifications and deletions but leaves untracked files alone. This also protects merge continuation, while explicit `grit add` and path-scoped commits retain their ability to add named untracked files.
Human and Markdown output now C-quotes hostile path bytes across add, move, remove, restore, clean, merge/pick/revert/history conflicts, and pull conflicts. The round-two patch closes the remaining leaks in pull Markdown and add's nested-repository warning while preserving raw path data in JSON.
Replay sequences now retain one fork-to-onto analysis and use fast partial tree transplants for independent changes, while preserving the full merge fallback for complex or overlapping cases. The round-3 correction carries the sparse merge index through those optimized paths, restoring correct --no-commit staging.
Remote ref listing no longer silently limits unrestricted requests to branches and tags. It now discovers pull refs and custom namespaces, applies ls-remote patterns client-side, and handles HEAD consistently while retaining narrow requests for explicit heads/tags modes.
Bounds reservations derived from untrusted packed-object size headers to 16 MiB, then grows only as inflate produces real bytes. It also centralizes checked pack-size decoding and routes unpack/index-writing scans through bounded inflate or streaming skip paths, so corrupt packs return typed errors instead of aborting the embedding process.
Accepts a flush-only v0/v1 ref advertisement as a valid empty repository while continuing to reject immediate EOF, delimiter-only, and response-end-only peers. The completion state is propagated through SSH, git-daemon, local upload-pack, and stateless HTTP connections so clone, fetch, and ref listing work consistently.
Makes hook stdin delivery resilient when a receive hook exits before consuming a large update list. A private Unix helper turns the closed pipe into a normal write error without consuming a caller-owned pending SIGPIPE, while long-lived serving/plumbing commands ignore SIGPIPE for their process lifetime.
User-facing snapshot-checkout and resumable-transfer errors now remove embedded URL credentials while preserving the raw URL for authentication and requests. CLI checkout, checkin, slice, and progress rendering use the same safe library helper, and integrate conflict guidance now directs users to refresh with `grit pull`.
Status and diff now apply Git-compatible submodule ignore policy from repository config and `.gitmodules`, including logical submodule names and duplicate-key last-value semantics. Dirty-only submodules are represented distinctly, and stash no longer creates an empty entry when inner submodule dirt is the only change.
This change returns freed glibc allocator arena pages to the OS after smart-HTTP pack work becomes idle. It exposes one small library function and coordinates upload-pack, receive-pack, and info/refs blocking jobs so trimming occurs only when their shared in-flight count reaches zero.
This change removes repeated primary/alternate metadata work from shared-clone commit walks while preserving visibility of externally written loose objects. It routes packed alternate reads through a stable read context, retains commit subject bytes for walks, uses pack-neighbor abbreviation only when every alternate is proven pack-only, and retries the primary loose store once after a total miss.
Push planning now accepts wildcard CLI refspecs and exposes typed `all`, `mirror`, and `prune` request modes, with thin CLI flags and documentation. Pruning is constrained to the selected destination namespace and honors negative refspecs, preventing explicitly excluded remote branches from being deleted.
Routes alternate pack reads through their own cached catalog without replacing the primary pack-read context, and adds negative-cache shortcuts plus test-only metadata counters. The pack-side change works, but the loose-cache shortcut still stats each alternate-only object and leaves the principal log performance gap intact.
Clone output now strips URL userinfo before rendering success data, TTY banners, and bundle URI diagnostics. The configured remote URL remains unchanged so authenticated fetches continue to work.
Repository-controlled multiline text emitted by Markdown commands is now enclosed in a length-adaptive `text` fence. Commit messages containing backtick fences, headings, or tables can no longer escape into or impersonate Grit's own Markdown structure.
Abort now distinguishes grit multi-commit replay state from Git’s single-commit sentinel-only state. Git-started conflicting picks and reverts reset the index/worktree to current HEAD, while grit sequences still restore `sequencer/head`; stale ORIG_HEAD is ignored and AUTO_MERGE is cleaned.
Rebase skip-applied detection now hashes the small replay range first and avoids full stable patch-id computation for upstream commits that cannot touch replayed paths. The round-two correction safely distinguishes repository path bytes from pathspec syntax, preserving skip semantics for filenames such as `:(literal)foo`.
Hook stdin is now fed on a scoped writer thread while stdout and stderr are drained concurrently, preventing either pipe from blocking the other. Both repository and reference-context hook runners use the helper, and signing is wired to the same internal path when an explicit payload is supplied.
This change makes the v0.5.29 source tree compile again by converting raw stash entry path bytes to Grit's canonical stored string before passing them to worktree and smudge helpers. It also uses the existing stored path argument when comparing an untracked worktree file to its stash blob.
Successful push, fetch, clone, checkout/check-in, slice, and transfer-progress output now strips URL userinfo in human, JSON, Markdown, and dry-run presentation. Raw addresses remain unchanged for transport and configuration, and stored remotes still display verbatim through the remote command.
Detached HEAD can now be advanced by pick, revert, and explicit-upstream rebase without attaching or moving a branch. The review follow-up specifically repairs rebase conflict continue/skip by translating the Git-compatible persisted `detached HEAD` label to the actual `HEAD` pseudo-ref and using the live stopped tip for compare-and-swap.
Markdown output now chooses a code-span delimiter longer than any backtick run in displayed paths and revision specs. This keeps filenames such as `a`b.txt` intact in diff/log lists, blame and show headings, cat metadata, and resolve/tree tables.
Structured CLI failures now consistently attach `kind: not_a_repository` when diff variants or bare stash run outside a repository. The implementation reuses the established error mapper and extends the existing CI-oriented regression test.
Log patch JSON now derives insertion/deletion totals from its computed hunks, while name-only modes omit totals they did not calculate. Default log diff modes consistently suppress merge diffs, and generated schema documentation now comes from the Rust schema definition.
This change makes user-facing filesystem paths consistently use forward slashes and strips Windows verbatim prefixes across CLI JSON, Markdown, human output, and selected library errors. Round two removes the three lint violations from that rendering sweep without changing behavior.
Iterator-style JSON filters now have stable output cardinality: zero, one, or many generated values are always emitted as an array, while singular filters retain scalar/null behavior. The round-2 amendment also keeps `reduce` singular and restores compilation of the tightened daily verifier.
External callers in grit-cli and the add example now create StageOptions with Default and assign only supported public fields. This removes the Linux compile error without changing staging behavior or exposing the two internal test knobs.
Makes the POSIX ERE matcher compile on Android by letting Rust infer the native types of regmatch_t.rm_so and rm_eo instead of referring to libc::regoff_t, which Android’s libc bindings do not export. Android remains on the efficient REG_STARTEND path; runtime matching behavior and public APIs are unchanged.
Push now exposes the same useful transfer visibility as clone/fetch: local pushes report object enumeration/copying, wire pushes report pack construction/sending, and successful human output includes elapsed time, object count, and sent bytes. The library returns typed sent statistics in PushOutcome, while the CLI only combines and renders those records.
This change restores compilation after stash tree entries moved from UTF-8 strings to raw Git path bytes. It converts each raw entry path to Grit's reversible stored-string representation only where worktree and smudge helpers require that representation, and removes imports made obsolete by the migration.
Push reachability walks now read only packed commit headers when they need tree, parents, and committer time, and zlib inflation stops when the header terminator is found. The branch also carries the minimal stash crossover build repair needed for current main, plus measured baselines and performance documentation.
This change removes an accidental million-index-lookup cost from ordinary stash and restore pathspec validation while preserving mode-aware attribute pathspec behavior. It also repairs the stash merge breakage already present on main and records the necessary reflog-deletion cost of remote removal as settled.
Commit-graph writing now collects graph metadata during one reachability walk and fully validates each packed object through a reusable session reader. Bloom filters are generated in history order for cache locality while preserving object-id budget selection and byte-identical graph output; docs and measured baselines record the result.
This branch repairs five independent CI breakages with narrow mechanical updates: sync CLI wiring, canonical-module accounting, public-API metadata, and one rustdoc link. The round-2 amendment updates the API ratchet from 33,295 to the already-refreshed 33,317-line snapshot.
This replaces the general full-commit rev-count walk with an internal parent-only traversal, reuses commit-graph parent links when possible, and avoids invalidating a trusted pack listing on its first mapping. The round-2 fix preserves the speedup while fully inflating and checksum-validating each whole packed commit before trusting its parent headers.
This change restores deterministic CI validation for canonical module layout, rustdoc links, and hidden test/probe API names. It is a five-file CI-maintenance patch with no runtime or supported public-API behavior change.
This stack makes full object enumeration reuse exact tree-entry bytes from earlier versions of the same path. It skips already-visited prefix, suffix, and repeated entries without constructing object IDs, while preserving the existing parser as the malformed-input fallback.
This change removes redundant commit walks and substantially lowers per-object overhead in the pack-building path used by bundles, repack, upload-pack, and push. It adds deterministic local-only tree read-ahead and linearizes delta-chain/reuse planning without changing public APIs or pack/bundle bytes.
Restores pack-listing trust after the first cold object read so checkout no longer stats `objects/pack` for every object. It also computes auto abbreviation length from packed objects and batches pack/loose-prefix reads, preserving collision-aware short IDs while avoiding repeated directory scans.
Synchronizes the API quality baseline with the source tree and removes three obsolete `grit_lib::repo` failure-injector paths from both public test-item ratchets. It is metadata-only: no Rust implementation, test, API implementation, on-disk format, or wire-protocol behavior changes.
This change makes the canonical grit-lib import checker ignore Rust string and character literal contents without letting quotes inside comments affect lexer state. It adds focused regression coverage for strings, lifetimes/labels, line comments, and block comments so canonical-path CI can distinguish source imports from test data reliably.
Updates the API quality ratchet’s public-line count from 32,513 to 32,563. This makes the ratchet agree with the already-committed public API snapshot; no runtime code, public API declaration, test, on-disk format, or wire behavior changes.
Makes the public ownership-check example deterministic on machines whose system Git config trusts every directory. The example now supplies an explicit working directory and disables system config while testing the injected foreign-ownership path.
Repairs the release-mode grit-cli build without adding a new grit-lib API, and suppresses dead-code failures by keeping test probes behind test/test-support cfgs. It also removes a duplicate transport-path helper and points the fuzz target at the existing equivalent helper.
This change restores an enforceable green semver gate by comparing the evolving pre-0.6 API to the commit where the current supported surface was ratified. It also retains the earlier rustfmt and rustdoc-link repairs needed by the cited main CI run.