Skip to content

gate-44 and gate-52 print PASS over an unopened scope (#361's shape), inflating the COVERAGE line #374

Description

@rubenvdlinde

gate-44 and gate-52 print PASS over an unopened scope — #361's shape in two more gates

Found while proving gates 44–64 can fail, using repo-shaped git fixtures driven through the real bin/hydra-gates, with every plant committed and a prediction written before each arm.

gate-44 (autocomplete-attr)run-hydra-gates.sh:5945 falls through to _pass 44 on an empty file set. Same tree, only the scope input changed:

scope gate-44
unscoped FAIL — 1
diff-scoped, empty diff PASS

Its immediate neighbour gate-45 reads the same enumerator and correctly reports na on the same input — so the correct behaviour is already implemented one gate away.

gate-52 (custom-widget-ratchet) has the same fall-through, and additionally reproduces #352 exactly: base=0 head=3 delta=+3 when the merge base predates the app's own registry script.

Why this is worse than a hidden number

This is the distinction drawn in #361: a NOT APPLICABLE is excluded from the verdict, but a PASS counts toward "N of N applicable gates ran". It does not hide a finding — it falsifies the coverage line, which is the one line this programme relies on to tell an honest green from a vacuous one. Every COVERAGE: N of 64 quoted while these two gates were in scope is overstated by up to two.

The fix that shipped for gate-16 in #364 applies unchanged: always run the checker; evaluate WIRING before SCOPE. A crash must never be reported as an empty scope, and an empty scope must never be reported as a pass.

Crash behaviour, measured separately

The package's own crash suite passes but reaches only gates 56–64. Running the missing half with a python3 shim exiting 1: gates 44, 45, 46, 49, 50, 51, 52, 54, 55 all reported SKIPPED (wiring) — none PASS, none FAIL. So the wiring half is sound in both gates; it is specifically the empty-scope path that is wrong.

Related, from the same sweep

  • gate-60's entire Tier B half is unreachable code. All 10 values in CONCEPT_LABELS are Tier A keys, while semantic-icons.json ships 137 Tier B concepts, so the warns.append(… Tier B — SHOULD) branch can never execute. A green gate-60 says nothing about 137 of 147 concepts.
  • gate-49 is silenced by a file-header @throws \Throwable. METHOD_RE's optional non-greedy docblock group binds the file header, so the first method in the file is exempted. Positive-controlled: plain plant FAIL; header @throws added ⇒ PASS; a second unhandled method still FAIL. Same "tag position decides" family as gate-19: a file-level @e2e tag is counted as live coverage without checking any test — _ref_is_live returns True when no declaration owns it #343.
  • gates 60 and 62 disagree about whether a type:"caption" menu node is a menu entry — 60 exempts it, 62 fails it twice. Undeclared divergence.
  • Exemption lists are now the load-bearing defect three times over: gate-60 (CONCEPT_LABELS), gate-57 (WRITE_VERB_PREFIXES — 1 of 4 orphaned write methods seen), gate-50 (accepted app-id shapes — PASS over two unguarded reads of the exact opencatalogi#86 defect, written with a variable app id).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions