Skip to content

[finding] dispatch-gates.mjs has 28 self-test cases and no CI job runs any of them #8162

Description

@hotlong

Noticed while implementing #8117 (PR #8159). Observation class, tooling papercut — not a defect. Unassigned; grading is the triage seat's call.

The observation

scripts/pm/dispatch-gates.mjs carries a --self-test mode — 28 cases after #8159, covering workflow extraction, script resolution, watch-hint scanning, the runnable-invocation rendering and the new change-kind derivation. No CI job runs it. Measured on current main:

  • grep -rn "dispatch-gates" .github/workflows/*.yml — no hits;
  • package.json has no check:* script pointing at it (the two scripts/pm/ scripts that DO have gates are check:pm-skill-ratchet and check:pm-skill-id-lint).

So the self-test executes only when a human or agent types it. A change that breaks the extraction functions lands green, and the breakage surfaces as a dispatch prompt quietly naming the wrong gate families — which is the failure this tool exists to prevent, and the kind that reads as correct output.

Why it is not simply the same as #8110

#8110 (check:skill-frame-freshness --self-test runs nowhere) is the same class but has a different remedy, which is why this is filed beside it rather than as a comment on it:

  • check:skill-frame-freshness is a CI gate — its invocation exists and the fix is to extend it to --self-test && …, the conventional script shape used everywhere else in this repo;
  • dispatch-gates.mjs is advisory tooling with no CI job at all — there is no invocation to extend, so wiring it needs a deliberate decision about whether a PM-loop tool earns a gate slot, and if so where it hangs.

Both are worth deciding together; neither answer implies the other.

Directions (not a recommendation — grading is triage's)

  1. Give it the conventional gate shape — a check:pm-dispatch-gates script that is --self-test only (the live derivation reads the workflow tree and would be a slow, noisy gate), wired wherever the two existing scripts/pm/ gates run.
  2. Fold every scripts/pm/** self-test into one job — one step that runs each pm script's --self-test, which also covers whatever lands there next without a per-script decision.
  3. Do nothing. The tool is advisory; a wrong gate list costs the PM one dispatch round, and the PM reads real per-job conclusions afterwards anyway.

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions