Repository navigation
test: replace gitignore source assertion with behavioral coverage - #1304
Merged
Merged
Conversation
…al coverage The second assertion in fm-gitignore-config.test.sh (added by #1261) greps .gitignore for a specific spelling of the config/ ignore pattern. It fails on a semantically equivalent pattern like config/** and does not prove Git actually ignores anything, per the completed source-content-test audit. Replace it with a real git check-ignore control test on a generated unrelated path, and strengthen the existing directory-coverage test with generated unpredictable direct and nested config/ paths.
quinnbot-ai
pushed a commit
to quinnbot-ai/firstmate
that referenced
this pull request
Jul 30, 2026
…al coverage (kunchenguid#1304) The second assertion in fm-gitignore-config.test.sh (added by kunchenguid#1261) greps .gitignore for a specific spelling of the config/ ignore pattern. It fails on a semantically equivalent pattern like config/** and does not prove Git actually ignores anything, per the completed source-content-test audit. Replace it with a real git check-ignore control test on a generated unrelated path, and strengthen the existing directory-coverage test with generated unpredictable direct and nested config/ paths.
Intent
Ship the captain-authorized bounded Firstmate test correction identified by the completed source-content-test audit at
/Users/kunchen/github/kunchenguid/firstmate/data/nm-source-content-tests-audit-r1/report.md.Remove only the brittle source-content assertion added by Firstmate PR 1261 from
tests/fm-gitignore-config.test.sh. The test must never inspect.gitignoresource bytes, line spelling, regex matches, parser proxies, snapshots, or other implementation-source text. Retain and strengthen real behavior coverage by invoking Git's publiccheck-ignoreconsumer against generated unpredictable direct and nested paths underconfig/, plus a generated unrelated-path control that must remain visible. The coverage must accept semantically equivalent ignore patterns such asconfig/andconfig/**, preserve shell portability and existing test style, and include regression counterfactual evidence that it fails when arbitrary config paths become visible while passing with equivalent semantic patterns.Keep the change limited to
tests/fm-gitignore-config.test.sh. Do not edit.gitignore, AGENTS.md, documentation, product code, generated files, unrelated tests, or conduct broader source-content-test cleanup. Followfirstmate-coding-guidelines, run the focused test and relevant repository lint/test checks, and require a clean no-mistakes review, PR, and green CI. Never merge the PR from the worker.What Changed
.gitignoresource-text assertion with behavioral checks through Git'scheck-ignoreinterface.config/, plus an unrelated-path control that must remain visible.Risk Assessment
✅ Low: The change is tightly scoped to the requested test, replaces source-text inspection with Git behavior checks, covers generated direct and nested config paths plus an unrelated-path control, and remains compatible with semantically equivalent ignore patterns.
Testing
The focused test passed under Bash 3.2 and the current Bash, while isolated end-to-end Git fixtures proved canonical and equivalent ignore patterns accept generated direct and nested config paths, the generated unrelated control remains visible, and visible arbitrary config paths trigger the expected regression failure.
Evidence: Git ignore semantic matrix
config/andconfig/**both passed. With no config ignore rule, the test failed on a generatedconfig/unlisted-key-*path as expected.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
Inspectedgit diff e595611291247368b982eb729097c54f2b45aa78..93dc5355be26bfb8be260293bd6217f991e34e18 -- tests/fm-gitignore-config.test.shbash tests/fm-gitignore-config.test.sh/bin/bash tests/fm-gitignore-config.test.shusing macOS-compatible GNU Bash 3.2.57Ran the committed test unchanged in isolated Git repositories usingconfig/, equivalentconfig/**, and an unrelated-only ignore rule✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.