Same shape as gate-48 (#191): the checker greps for the pattern with no comment filter, so a comment warning against networkidle is reported as a use of it.
Measured
Full-tree run of run-hydra-gates.sh (hydra-gates main @ 756fe89) against ConductionNL/larpingapp@development c73df92d:
[gate-58] e2e-networkidle: FAIL — 1 networkidle wait(s) in changed e2e file(s)
The single log line is:
tests/e2e/spec-coverage/detail-forms-admin.spec.ts:187: // live `waitForLoadState('networkidle')` in the suite; every other mention
In context (lines 185-189):
// ADR-074 rule 4: `networkidle` never settles on Nextcloud — the
// notification poll keeps the network permanently busy. This was the LAST
// live `waitForLoadState('networkidle')` in the suite; every other mention
// is a comment warning against it.
The repo has zero live calls. Every one of the 10 occurrences under tests/ is a comment:
$ grep -rn "networkidle" tests/ src/ | grep -vE "^\S+:[0-9]+:\s*(//|\*|/\*|#)"
$ echo $?
1 # no matches
Cause
run-hydra-gates.sh around line 4515:
grep -nE "waitForLoadState\([[:space:]]*['\"]networkidle['\"]|waitUntil:[[:space:]]*['\"]networkidle['\"]" "$f" \
| grep -v "e2e-networkidle exclude" \
| while IFS= read -r hit; do ...
The only filter is the exclude marker. There is no comment stripping, so // … waitForLoadState('networkidle') … matches exactly like a call.
Note this is a doubly perverse failure mode: the more carefully a repo documents why it removed its networkidle waits, the more findings it accrues. larpingapp is the repo the gate was written against (its index-pages.spec.ts is cited in the gate header), so it has the most such comments in the fleet.
Suggested fix
Strip line comments before matching — drop lines whose match position sits after a //, *, or # on the same line. A minimal version that would fix this case without touching the pattern:
grep -nE "<pattern>" "$f" \
| grep -v "e2e-networkidle exclude" \
| grep -vE "^[0-9]+:[[:space:]]*(//|\*|/\*)" \
That still catches a real call with a trailing comment, and stops counting prose. A code-aware strip would be better but this closes the observed shape.
Impact
Any repo that documented the ADR-074 rule 4 removal in a comment now carries a permanent, unfixable gate-58 finding — unfixable because the only way to clear it is to delete the explanation of why the code is correct, or to add an exclude marker to a comment, which is comment-satisfaction.
Same shape as gate-48 (#191): the checker greps for the pattern with no comment filter, so a comment warning against
networkidleis reported as a use of it.Measured
Full-tree run of
run-hydra-gates.sh(hydra-gatesmain@756fe89) againstConductionNL/larpingapp@developmentc73df92d:The single log line is:
In context (lines 185-189):
The repo has zero live calls. Every one of the 10 occurrences under
tests/is a comment:Cause
run-hydra-gates.sharound line 4515:The only filter is the
excludemarker. There is no comment stripping, so// … waitForLoadState('networkidle') …matches exactly like a call.Note this is a doubly perverse failure mode: the more carefully a repo documents why it removed its
networkidlewaits, the more findings it accrues. larpingapp is the repo the gate was written against (itsindex-pages.spec.tsis cited in the gate header), so it has the most such comments in the fleet.Suggested fix
Strip line comments before matching — drop lines whose match position sits after a
//,*, or#on the same line. A minimal version that would fix this case without touching the pattern:That still catches a real call with a trailing comment, and stops counting prose. A code-aware strip would be better but this closes the observed shape.
Impact
Any repo that documented the ADR-074 rule 4 removal in a comment now carries a permanent, unfixable gate-58 finding — unfixable because the only way to clear it is to delete the explanation of why the code is correct, or to add an
excludemarker to a comment, which is comment-satisfaction.