Skip to content

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

Closed

Description

@rubenvdlinde

Summary

gate-61 listener-work-placement is structurally incapable of reporting a result on any --full / workflow_dispatch run. It reports NOT APPLICABLE, which does not count against coverage, so it is invisible in the COVERAGE: line as well. On openregister this hides 3 real findings.

This is the falsely-NOT-APPLICABLE dead-gate shape: the exemption reason names a scope condition that does not hold on the run that printed it.

Observed

openregister full-scope run 31488412842, Hydra Gates job 93770857036, gate package b8c7eade (@main). The same log contains both of these lines:

[hydra-gates] Base ref: n/a — --full requested, scanning the entire tree.
...
[gate-61] listener-work-placement: NOT APPLICABLE — the diff against 'origin/development'
put every post-event registration out of scope, so NONE were inspected.

There was no diff. The gate excluded itself by naming one.

Root cause (read in the source, not inferred)

  1. bin/hydra-gates — on --full (SCOPE_DIFF=0) it builds the runner argv as set -- "${APP_DIR}" and only prepends --scope-to-diff --base "${BASE_REF}" when SCOPE_DIFF=1. The runner never receives --base.
  2. scripts/run-hydra-gates.sh:204 — BASE_REF therefore keeps its hardcoded default "origin/development".
  3. scripts/run-hydra-gates.sh:7854 — gate-61 calls check_listener_placement.py . --base "${BASE_REF}" unconditionally. The in-file comment says this is deliberate ("this gate is always diff-scoped in both modes … Switching an unscoped run to --all was tried and reverted here: the builder runs unscoped, so it would have surfaced the whole backlog as blocking findings on every build").
  4. On a full-repo run of development, origin/development...HEAD is empty → every registration falls out of scope → the checker exits 3 (EXIT_EMPTY_SCOPE) → the runner calls _skip 61 … na.

The revert referenced in (3) was correct for the case it addressed. The defect is that it treats two different unscoped modes as one: the builder's implicit unscoped run, and an explicit whole-tree audit that a human asked for by pressing "Run workflow".

Positive control — the gate is blind, not clean

Same tree, same checker, same commit (openregister@fdb0d6ca8); only the scope flag differs:

$ python3 scripts/lib/check_listener_placement.py . --all
FAIL  lib/Listener/SourceRecordChangeListener.php (ObjectCreatedEvent): ...
FAIL  lib/Listener/SourceRecordChangeListener.php (ObjectUpdatedEvent): ...
FAIL  lib/Listener/SourceRecordChangeListener.php (ObjectDeletedEvent): ...

checked 45 post-event registration(s) [all], 0 out of scope: 3 failure(s)

45 registrations exist. 0 were inspected on the run that reported NOT APPLICABLE.

Proposed fix (narrow — does not re-break the reverted case)

Distinguish unscoped by default from explicitly asked for a whole-tree audit:

  • bin/hydra-gates: when --full is passed, forward a new flag (e.g. --full-scan) to the runner.
  • run-hydra-gates.sh: parse it into FULL_SCAN=1, and in the gate-61 block call the checker with --all instead of --base "${BASE_REF}" when FULL_SCAN=1.

The builder invokes run-hydra-gates.sh directly and would not pass the flag, so its unscoped run stays diff-scoped exactly as today. Only an explicit --full audit changes behaviour — which is the run type whose entire purpose is inherited debt.

Expect this to make full-scope runs redder across the fleet. That is the honest answer and it is what someone pressing "Run workflow" is asking for. Please land the false-positive fix in the companion issue first, or land both together, so the first fleet-wide gate-61 report is not ~1/3 noise.

Why this is filed rather than merged

I have merge authority on .github this session, but this change turns a permanently-green gate red in every repo at once, while other agents are mid-flight driving their repos to green, and it carries a known false-positive class. Coordinating that is worth more than landing it unilaterally.

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