2026-05-09: Fix release script fails due to src-tauri/ in root .gitignore
Fix: release script fails due to src-tauri/ in root .gitignore
Section titled “Fix: release script fails due to src-tauri/ in root .gitignore”Problem
Section titled “Problem”npm run release -- 1.0.0 fails at the git add step:
The following paths are ignored by one of your .gitignore files:src-taurihint: Use -f if you really want to add them.
Error: Command failed: git add package.json backend/package.json front/package.json docs/package.json src-tauri/Cargo.toml src-tauri/tauri.conf.jsonRoot cause
Section titled “Root cause”The root .gitignore contained src-tauri/ (the entire directory). This caused git add src-tauri/Cargo.toml src-tauri/tauri.conf.json to fail — git refuses to stage files in an ignored path without -f.
However, src-tauri/ source files (61 files: Rust code, configs, icons) are tracked in git. The 5.3 GB on disk is Rust build artifacts under src-tauri/target/, which were already correctly excluded by src-tauri/.gitignore:
# Generated by Cargo/target//gen/schemasThe root .gitignore entry src-tauri/ was incorrectly excluding the entire directory instead of only build artifacts.
Replaced in root .gitignore:
# Before (wrong — excludes all source files)# Taurisrc-tauri/# After (correct — excludes only build artifacts)# Tauri build artifacts (source files are tracked; artifacts excluded by src-tauri/.gitignore)src-tauri/target/src-tauri/gen/AGENTS.md checklist
Section titled “AGENTS.md checklist”| # | Convention | Status |
|---|---|---|
| 1 | Documentation update | ✅ Plan doc created; no user-facing docs reference this gitignore rule |
| 2 | All 4 test gates | ✅ N/A — gitignore fix, no logic change |
| 3 | Self-review | ✅ Done |
| 4 | Endpoint coverage | ✅ N/A |
| 5 | Bug-to-Test | ✅ N/A — release script; shell test out of scope |
| 6 | Seed isolation | ✅ N/A |
| 7 | Transaction invariants | ✅ N/A |
| 8 | Plan history | ✅ This file |
| 9 | Infra test gate | ✅ Verified with dry-run |
| 10 | Environment compat | ✅ N/A |
| 11 | Do-no-harm baseline | ✅ 61 tracked files unaffected; gitignore rules don’t retroactively untrack |
| 12 | Plan execution summary | See below |
| 13 | Doc grep | ✅ All src-tauri/ refs in docs point to source files, not gitignore rules |
Execution Summary
Section titled “Execution Summary”Commit: (see release commit chore: release v1.0.0)
Actual changes
Section titled “Actual changes”.gitignore: replacedsrc-tauri/withsrc-tauri/target/+src-tauri/gen/docs/src/content/docs/plans/2026-05-fix-release-gitignore.md: this file- 6 version files bumped to
1.0.0:package.json,backend/package.json,front/package.json,docs/package.json,src-tauri/Cargo.toml,src-tauri/tauri.conf.json
Deviations from plan
Section titled “Deviations from plan”None. Plan followed exactly.
Test results
Section titled “Test results”| Gate | Result |
|---|---|
| Backend unit | ⏭ skipped (not affected) |
| Backend e2e | ⏭ skipped (not affected) |
| Frontend unit | ⏭ skipped (not affected) |
| Frontend e2e | ⏭ skipped (not affected) |
| Release dry-run | ✅ passed |
Key discoveries
Section titled “Key discoveries”- The root
.gitignorehadsrc-tauri/as a single line under# Tauricomment, likely added by someone intending to exclude only build artifacts. Thesrc-tauri/.gitignorealready handled that correctly. - 61 source files were tracked before the wrong ignore rule was added (or were force-added). Gitignore rules don’t retroactively untrack files, which is why
git ls-files src-tauri/showed 61 entries even with the bad rule in place. - The version files (
Cargo.toml,tauri.conf.json) were already bumped by the failed release run, so after fixing.gitignore, only agit add+git commitwas needed to complete the release.