Summary
validate_mutation_boundary (.map/scripts/map_step_runner.py) can silently miss brand-new files a subtask creates, when those files land inside a directory that was ALREADY untracked (present but never git added) before the subtask started. The check reports status: "clean"-adjacent results that omit the new file entirely from both expected-satisfaction and unexpected — i.e. a false negative, not just a false positive.
Observed
Repo: azalio/lida-teamleada, branch default, subtask ST-027.
docs/ existed untracked before ST-027 started (it already held docs/brd-resource-quotas.md from repo discovery, never committed).
- ST-027's Actor created
docs/decisions/hc8-contention.md — a file explicitly named in the subtask's affected_files and required by VC1.
git status --porcelain (without -uall, as invoked by the script) collapses an untracked directory to a single line ?? docs/ regardless of how many files are inside it or how recently they were added.
- The per-subtask baseline snapshot (taken at
validate_step('2.2')) had already recorded docs/ as pre-existing/dirty (because of the older brd-resource-quotas.md), so the subtraction step (actual_set - baseline_files) removes the docs/ entry entirely — even though its contents changed (a brand-new file was added inside it).
Result of python3 .map/scripts/map_step_runner.py validate_mutation_boundary default ST-027:
{
"status": "warning",
"expected": ["docs/decisions/hc8-contention.md", "internal/bench/hotrow_bench_test.go", "internal/quota/reserve_batch.go", "test/quota/reserve_batch_test.go"],
"actual": ["go.mod", "internal/bench/", "internal/quota/reserve_batch.go", "test/quota/reserve_batch_test.go"],
"unexpected": ["go.mod", "internal/bench/"]
}
docs/decisions/hc8-contention.md never appears in actual at all — not as satisfied-expected, not as unexpected. A reviewer relying on this tool's expected vs actual diff to confirm the doc deliverable was created would get no signal either way.
(Separately, internal/bench/ also collapses to the directory name rather than internal/bench/hotrow_bench_test.go for the same git-status-porcelain-without--uall reason — that one at least surfaces as unexpected so a human notices and can verify, but the untracked-dir-with-preexisting-baseline-file case above suppresses the signal completely.)
Expected
A file that is genuinely new (did not exist at the per-subtask baseline snapshot time) should be visible in actual/unexpected/expected-satisfied bookkeeping even when its parent directory was already untracked before the subtask started. Likely fix: use git status --porcelain -uall (or an equivalent that lists individual untracked files, not collapsed directories) when building actual_set, and diff the baseline at file granularity rather than directory-string equality.
Environment
- mapify_version: 3.22.0
- map-framework commit: 6f5902e
- Affected:
.map/scripts/map_step_runner.py, function validate_mutation_boundary (git status/diff assembly around line ~13260-13320)
Summary
validate_mutation_boundary(.map/scripts/map_step_runner.py) can silently miss brand-new files a subtask creates, when those files land inside a directory that was ALREADY untracked (present but nevergit added) before the subtask started. The check reportsstatus: "clean"-adjacent results that omit the new file entirely from bothexpected-satisfaction andunexpected— i.e. a false negative, not just a false positive.Observed
Repo:
azalio/lida-teamleada, branchdefault, subtaskST-027.docs/existed untracked before ST-027 started (it already helddocs/brd-resource-quotas.mdfrom repo discovery, never committed).docs/decisions/hc8-contention.md— a file explicitly named in the subtask'saffected_filesand required by VC1.git status --porcelain(without-uall, as invoked by the script) collapses an untracked directory to a single line?? docs/regardless of how many files are inside it or how recently they were added.validate_step('2.2')) had already recordeddocs/as pre-existing/dirty (because of the olderbrd-resource-quotas.md), so the subtraction step (actual_set - baseline_files) removes thedocs/entry entirely — even though its contents changed (a brand-new file was added inside it).Result of
python3 .map/scripts/map_step_runner.py validate_mutation_boundary default ST-027:{ "status": "warning", "expected": ["docs/decisions/hc8-contention.md", "internal/bench/hotrow_bench_test.go", "internal/quota/reserve_batch.go", "test/quota/reserve_batch_test.go"], "actual": ["go.mod", "internal/bench/", "internal/quota/reserve_batch.go", "test/quota/reserve_batch_test.go"], "unexpected": ["go.mod", "internal/bench/"] }docs/decisions/hc8-contention.mdnever appears inactualat all — not as satisfied-expected, not as unexpected. A reviewer relying on this tool'sexpectedvsactualdiff to confirm the doc deliverable was created would get no signal either way.(Separately,
internal/bench/also collapses to the directory name rather thaninternal/bench/hotrow_bench_test.gofor the same git-status-porcelain-without--uall reason — that one at least surfaces asunexpectedso a human notices and can verify, but the untracked-dir-with-preexisting-baseline-file case above suppresses the signal completely.)Expected
A file that is genuinely new (did not exist at the per-subtask baseline snapshot time) should be visible in
actual/unexpected/expected-satisfied bookkeeping even when its parent directory was already untracked before the subtask started. Likely fix: usegit status --porcelain -uall(or an equivalent that lists individual untracked files, not collapsed directories) when buildingactual_set, and diff the baseline at file granularity rather than directory-string equality.Environment
.map/scripts/map_step_runner.py, functionvalidate_mutation_boundary(git status/diff assembly around line ~13260-13320)