Skip to content

fix(gate-61): an empty scope has two causes and only one of them is a diff (.github#347) - #371

Merged
rubenvdlinde merged 1 commit into
mainfrom
fix/gate-61-full-scope-honest-reason
Aug 11, 2026
Merged

fix(gate-61): an empty scope has two causes and only one of them is a diff (.github#347)#371
rubenvdlinde merged 1 commit into
mainfrom
fix/gate-61-full-scope-honest-reason

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Closes #347.

bin/hydra-gates forwards --base only on a diff-scoped run, so on --full the
runner keeps its own origin/development default and hands it over anyway. On
development itself that diffs the branch against itself, the checker returns 3,
and gate-61 printed

[gate-61] listener-work-placement: NOT APPLICABLE — the diff against
'origin/development' put every post-event registration out of scope

two lines after the run's own preamble said Base ref: n/a — --full requested.
There was no diff. Sibling of #361: check_listener_placement.py:555 carries
the same non-empty argparse default.

The verdict does not change, and that is deliberate

Sweeping the tree on an unscoped run was tried here before and reverted — the
runner's own invocation comment records it. The builder runs unscoped, so
--all surfaces the fleet's whole registration backlog as blocking findings on
every build. na with an honest reason is the third answer: it cannot go
false-RED, and it stops the run claiming an exclusion nothing performed.

Blast radius: zero. No verdict changes in any repo, at any scope.

What was actually missing was the number

0 of 1 inspected and 0 of 45 inspected printed identically. An advisory
whole-tree sweep now supplies it — informational, exit status discarded, and quoted
only when the helper printed its own terminal summary, so a sweep that finds
inherited debt cannot become this run's verdict and a sweep that crashes cannot
either.

Measured on openregister @ development: --all reaches 45 post-event
registrations carrying 3 findings — exactly the number SHARED-LESSONS records as
hidden by this defect. It is now on the verdict line.

⚠️ The advisory summary is recomposed, not quoted

The helper's own line ends …, 0 out of scope: 3 failure(s). Pasting it in put the
phrase out of scope straight back into a reason on a run that computed no
scope — the exact sentence this fix removes, smuggled in as a quotation. The suite's
gate-agnostic property (a NOT APPLICABLE may not blame a diff on a --full
run
) caught it, listing gate-61 among the blamers again after the "fix". Worth
recording: the generic invariant caught a regression the gate-specific assertions
would have passed.

Fixture — red before, green after

Same tree, only the scope flag changed:

result
before 3 assertions RED"#347 is LIVE: gate-61 still claims 'the diff … put every post-event registration out of scope'"; the reason does not state the run computed no diff; the backlog size is not stated
after 13 passed / 0 failed, and gate-61 drops off the "gates blaming a diff on a --full run" list, which now reads 6 7 8 9

The _known_defect entry for #347 is replaced by positive assertions, as its own
text demanded ("flip this assertion and delete the entry"). The gates 6/7/8/9
wording defect is a separate, still-unfiled entry and is untouched.

ShellCheck clean.

… diff (.github#347)

`bin/hydra-gates` forwards `--base` only on a diff-scoped run, so on `--full`
the runner keeps its own `origin/development` default and hands it over anyway.
On `development` itself that diffs the branch against itself, the checker
returns 3, and gate-61 printed

  NOT APPLICABLE — the diff against 'origin/development' put every post-event
  registration out of scope

two lines after the run's own preamble said `Base ref: n/a — --full requested`.
THERE WAS NO DIFF. Sibling of #361: check_listener_placement.py:555 carries the
same non-empty argparse default.

THE VERDICT DOES NOT CHANGE, AND THAT IS DELIBERATE. Sweeping the tree on an
unscoped run was tried here before and reverted -- the BUILDER runs unscoped, so
`--all` surfaces the fleet's whole registration backlog as blocking findings on
every build. `na` with an HONEST reason is the third answer: it cannot go
false-RED, and it stops the run claiming an exclusion nothing performed.

BLAST RADIUS: ZERO. No verdict changes in any repo, at any scope. What changes
is the sentence, and the fact that the size of what went unread is now stated.

WHAT WAS ACTUALLY MISSING was that number. `0 of 1 inspected` and
`0 of 45 inspected` printed identically. An advisory whole-tree sweep now
supplies it -- informational, exit status discarded, and quoted only when the
helper printed its own terminal summary, so a sweep that finds inherited debt
cannot become this run's verdict and a sweep that CRASHES cannot either.

Measured on openregister @ development: `--all` reaches 45 post-event
registrations carrying 3 findings. That is exactly the number SHARED-LESSONS
records as hidden by this defect, and it is now on the verdict line.

⚠️ THE ADVISORY SUMMARY IS RECOMPOSED, NOT QUOTED. The helper's own line ends
"…, 0 out of scope: 3 failure(s)", and pasting it in put the phrase `out of
scope` straight back into a reason on a run that computed no scope -- the exact
sentence this fix removes, smuggled in as a quotation. The suite's
gate-agnostic property (a NOT APPLICABLE may not blame a diff on a --full run)
caught it, listing gate-61 among the blamers again after the "fix".

FIXTURE, observed red then green, same tree, only the scope flag changed:

  before  3 assertions RED -- "#347 is LIVE: gate-61 still claims 'the diff …
          put every post-event registration out of scope'", reason does not
          state the run computed no diff, backlog size not stated
  after   13 passed / 0 failed, and gate-61 drops off the "gates blaming a diff
          on a --full run" list, which now reads `6 7 8 9`

The known-defect entry for #347 in test_gate_scope_matrix.sh is replaced by the
positive assertions, as its own text demanded ("flip this assertion"). The
gates 6/7/8/9 wording defect is a separate, still-unfiled entry and is
untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gate-61 listener-work-placement is structurally dead on every --full / workflow_dispatch run (hides 3 real findings in openregister)

1 participant