Commit fd57d47
committed
test(integration): document mapping[0]=DR55 dependency on dest_host helper
Follow-up to 38fa352 (QA finding: scope-narrative-inaccuracy).
The 38fa352 commit message claimed lookups/rule_csv_map.csv was
"reduced from 9 mappings to 1" — that was wrong. Per commit 301dcd5
("trim demo CSVs from 19 to 3"), the file actually contains 3
mappings:
DR55_brute_force_login -> DR55_brute_force_users.csv (mapping[0])
DR55_brute_force_login -> DR55_brute_force_src.csv (mapping[1])
DR130_privilege_escalation -> DR130_priv_escalation.csv (mapping[2])
The fix in 38fa352 still works because mapping[0] (file-order-wise)
is the DR55 users CSV, which has `dest_host` but lacks plain `host`.
But the reasoning chain in the original commit message implied only
one mapping survived — that was wrong, and a future maintainer reading
the commit could be misled into thinking the test would be safe for
any mapping[0].
This commit adds an inline docstring to the _submit_column_removal
helper documenting:
(a) the dependency on mapping[0] being DR55 users
(b) why "dest_host" was chosen (lives in that CSV's schema)
(c) the other two mappings have INCOMPATIBLE schemas — if file
reorder changes mapping[0], this helper will break
A stronger fix would parameterize the column choice from the actual
CSV header instead of hardcoding. Deferred — current state is
deterministic and tests pass; the docstring is sufficient guard
against silent breakage.
Lesson logged in ~/.claude/state/qa-findings.jsonl as
"scope-narrative-inaccuracy": don't infer file contents from
`head -2 *.csv | head -20` output — the outer head limit truncates;
verify SOT with `cat`.1 parent 8ef91f9 commit fd57d47
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
460 | 475 | | |
461 | 476 | | |
462 | 477 | | |
| |||
0 commit comments