Operant Studio
OPER-145

Portico check-ticket-trailer.yml: add KNUCK-A032 failure-path self-test

Suggested
Justin Cooke

Body

feature_id: FEAT-studio-dependency-map-policy
priority: 3

## Context

Portico's `check-ticket-trailer.yml` was ported from Studio in OPER-120 as `selftest: no` -- it currently trusts that its own regex is correct without proving it, which is exactly the shared-substrate-detector-fallacy that KNUCK-A032 exists to catch. This ticket adds the missing failure-path self-test so the workflow can be flipped from `selftest: no` -> `selftest: yes` in `docs/knuckles-guard-inventory.md` and the `KNUCK-A032 gap` marker can be removed.

Sister tickets (same class, filed 2026.09.09): OPER-139, OPER-140, OPER-141, OPER-142.

## Acceptance Criteria

- New self-test job or step in `.github/workflows/check-ticket-trailer.yml` that runs BEFORE the real gate.
- Self-test constructs synthetic PR events / env with (a) no trailer + no label + no no-ticket -> must fail, (b) valid `Closes POR-1` trailer -> must pass, (c) `ticket/POR-1` label -> must pass, (d) `no-ticket` label -> must pass, (e) trailer with prefix NOT in `scripts/ticket-trailer-prefixes.json` (e.g. `Closes XYZ-1`) -> must fail.
- Self-test job or step name matches EXACTLY the name added to `docs/knuckles-guard-inventory.md`.
- Row in `docs/knuckles-guard-inventory.md` flipped to `selftest: yes` with the job/step name populated; `KNUCK-A032 gap` marker removed from Ledger column.
- CI passes (guard-inventory checker + tripwire).

Attachments

Loading attachments…

Comments

Loading comments…