Task 4 of MIL-009 (Accepted on main): tests for the "Git excludes" step that #71 added to create-project.sh. Tests only; no code under src/ changes. The commit carries Task: MIL-009#4.
New tests in tests/test-local.sh:
Full run: .claude, .agents and AGENTS.md (and a skill file under each folder) are ignored and absent from git status; framework, .gitmodules and docs/artifact-registry.md stay visible; no .gitignore is written and nothing is committed; the project .env keeps its own entry, once, with its comment unchanged; the summary line is checked.
Second run: each entry and the comment are written once, and an existing build/ line in a file without a final newline stays on its own line.
Already ignored through a .gitignore: nothing is written and the step says reused.
Tracked paths: a committed AGENTS.md and .agents/keep stay tracked and unchanged, the step names them, and .claude is still ignored.
Extended existing tests: without SSH the step is skipped and writes nothing; the dry-run plan lists the step; the no-SSH plan does not.
tests/test-credentials.sh: the existing .env exclusion test also checks its comment line.
These cover Go/No-Go criteria 1 to 8 of MIL-009. Criterion 9 (documents agree), 10 (US-001.03) and 11 (the version) are not covered by this PR; the version bump is #69.
Checks run: shellcheck and shfmt are clean, and every new test passes when run by name. To show they can fail, I broke the implementation in two ways (dropping /AGENTS.md from the entries, and ignoring the skipped-framework case): the new tests failed each time, and the source was restored. The full suite had not finished when this was written.
No issue closed: #68 stays open until the full test suite has passed.
Task 4 of MIL-009 (`Accepted` on `main`): tests for the "Git excludes" step that #71 added to `create-project.sh`. Tests only; no code under `src/` changes. The commit carries `Task: MIL-009#4`.
New tests in `tests/test-local.sh`:
- **Full run**: `.claude`, `.agents` and `AGENTS.md` (and a skill file under each folder) are ignored and absent from `git status`; `framework`, `.gitmodules` and `docs/artifact-registry.md` stay visible; no `.gitignore` is written and nothing is committed; the project `.env` keeps its own entry, once, with its comment unchanged; the summary line is checked.
- **Second run**: each entry and the comment are written once, and an existing `build/` line in a file without a final newline stays on its own line.
- **Already ignored** through a `.gitignore`: nothing is written and the step says `reused`.
- **Tracked paths**: a committed `AGENTS.md` and `.agents/keep` stay tracked and unchanged, the step names them, and `.claude` is still ignored.
- **Extended existing tests**: without SSH the step is `skipped` and writes nothing; the dry-run plan lists the step; the no-SSH plan does not.
- `tests/test-credentials.sh`: the existing `.env` exclusion test also checks its comment line.
These cover Go/No-Go criteria 1 to 8 of MIL-009. Criterion 9 (documents agree), 10 (US-001.03) and 11 (the version) are not covered by this PR; the version bump is #69.
Checks run: shellcheck and shfmt are clean, and every new test passes when run by name. To show they can fail, I broke the implementation in two ways (dropping `/AGENTS.md` from the entries, and ignoring the skipped-framework case): the new tests failed each time, and the source was restored. The full suite had not finished when this was written.
No issue closed: #68 stays open until the full test suite has passed.
Refs #68
Add tests for the step that excludes .claude, .agents and AGENTS.md from git
in the new project: the three paths are ignored and absent from git status
after a run, while framework, .gitmodules and docs/artifact-registry.md stay
visible; no .gitignore is written and nothing is committed; a second run
writes each entry and the comment once and keeps the existing lines, also
when the file has no final newline; nothing is written for a path git
already ignores; a tracked path stays tracked and is named; the step is
skipped without the framework; the dry-run plan lists it.
The existing .env exclusion test also checks its comment line.
Refs #68
Task: MIL-009#4
Tirsvad
merged commit 642ea775d1 into main2026-10-08 08:30:53 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Task 4 of MIL-009 (
Acceptedonmain): tests for the "Git excludes" step that #71 added tocreate-project.sh. Tests only; no code undersrc/changes. The commit carriesTask: MIL-009#4.New tests in
tests/test-local.sh:.claude,.agentsandAGENTS.md(and a skill file under each folder) are ignored and absent fromgit status;framework,.gitmodulesanddocs/artifact-registry.mdstay visible; no.gitignoreis written and nothing is committed; the project.envkeeps its own entry, once, with its comment unchanged; the summary line is checked.build/line in a file without a final newline stays on its own line..gitignore: nothing is written and the step saysreused.AGENTS.mdand.agents/keepstay tracked and unchanged, the step names them, and.claudeis still ignored.skippedand writes nothing; the dry-run plan lists the step; the no-SSH plan does not.tests/test-credentials.sh: the existing.envexclusion test also checks its comment line.These cover Go/No-Go criteria 1 to 8 of MIL-009. Criterion 9 (documents agree), 10 (US-001.03) and 11 (the version) are not covered by this PR; the version bump is #69.
Checks run: shellcheck and shfmt are clean, and every new test passes when run by name. To show they can fail, I broke the implementation in two ways (dropping
/AGENTS.mdfrom the entries, and ignoring the skipped-framework case): the new tests failed each time, and the source was restored. The full suite had not finished when this was written.No issue closed: #68 stays open until the full test suite has passed.
Refs #68