chore(git): untrack bindings/python/target build artifacts - #26
Merged
Conversation
781 cargo build artifacts under `bindings/python/target/` were tracked in git: `.fingerprint/` entries, `dep-lib-*`, `invoked.timestamp`, `*.json` metadata. Tracking them made an ordinary maintenance operation destructive — a routine `cargo sweep` across the fleet deleted them, because every reasonable tool assumes everything under `target/` is regenerable. The root `.gitignore` had `/target/`, which is anchored to the repo root and so never covered `bindings/python/target/` (`bindings/python` is a nested cargo package with its own `Cargo.toml`, outside the workspace members). Making the pattern unanchored covers a `target/` at any package root. No file was deleted from disk: `git rm -r --cached` removes index entries only. No source change. `cargo build --workspace` and `cargo test --workspace` (3633 passed) confirm nothing depended on the tracked state. The artifacts were not in the published crate payload — `bindings/python` has its own `Cargo.toml`, so cargo omits the directory from `cargo package` (verified: 0 `target/` entries in `cargo package --list`). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 this is
Index hygiene only. 781 files removed from the git index, zero files removed from disk, no source change.
The diff will render as ~781 deletions. Nothing was deleted —
git rm -r --cacheddrops index entries and leaves the working tree untouched. The only content change in this PR is 4 lines in.gitignore.The defect
781 cargo build artifacts under
bindings/python/target/were tracked in git:.fingerprint/entries,dep-lib-*,invoked.timestamp,*.jsonmetadata.The root
.gitignorehad/target/— a leading slash anchors the pattern to the repo root, so it never coveredbindings/python/target/. (bindings/pythonis a nested cargo package with its ownCargo.toml, outside the workspacememberslist, so it gets its owntarget/.) The fix makes the pattern unanchored so it matches atarget/at any package root.Why it matters beyond bloat
Tracking these made an ordinary maintenance operation destructive: a routine
cargo sweepacross the fleet deleted them, because every reasonable tool assumes everything undertarget/is regenerable. They were restored withgit restore, but the next person running anytarget/-cleaning tool hits the same trap.Published crate payload
Not affected.
bindings/pythonhas its ownCargo.toml, so cargo omits the whole directory from the package —cargo package --list -p forensicnomiconreturns 191 files with 0 underbindings/. Consumers offorensicnomicon1.10.0 were not downloading build fingerprints.But that protection was incidental, and worth naming as a latent risk. The
[package] excludekey listsarchive/,scripts/,tests/,fuzz/— it does not listbindings/. The 781 files stayed out of the payload purely because cargo omits a subdirectory that contains its ownCargo.toml. Delete or renamebindings/python/Cargo.toml, or foldbindings/pythoninto the workspacemembers, and build fingerprints would have started shipping to crates.io with no warning at all. Untracking them removes the dependence on that side effect.Nothing depended on the tracked state
grep -rn 'bindings/python/target' .github scripts— no matches.cargo build --workspace— clean.cargo test --workspace— 3633 passed, 4 ignored, 26 suites.Verification
Note for reviewers with other open PRs
Branched from
origin/main. The diff is.gitignoreplus index removals underbindings/python/target/, so it should not collide with the source changes in #24 or #25.🤖 Generated with Claude Code