Skip to content

Commit 25af0f6

Browse files
committed
fix(scripts): render an unread clause-② carrier as NOT MEASURED, not as absent
`declarationFromPullRequest` rendered every non-matching label list the same way — ``carrier: `needs:contract-review` is not on this PR (N label(s) read)`` — including N = 0. A zero-label read is not an absence: the event payload is a snapshot taken when the run fired, so an empty list is equally consistent with "this PR carries no labels" and "nothing had been labelled yet", and nothing inside the payload separates them. This file already owns the right word for that state and uses it verbatim in its own payload block ("the `opened` run at 21:40Z would have read NOT MEASURED"); it just did not spell it here. The string was not the damage. `renderLevel`'s `enforce` message printed the unread carrier beside the `Clause-②:` line under "The two declarations disagree", and then offered remedy 2 — "correct it at the producer: the carrier is the review seat's to place and to clear". Pointed at a carrier the run never read, that is an instruction to strip a review requirement in order to clear a red whose real cause was remedy 1. This file's own text says the two remedies are not interchangeable. So the reader now returns a three-valued `carrier` axis (`present` / `absent` / `not-measured`) beside `value` and `arm`, `judgeLevel` carries it through, and `renderLevel` softens the header and remedy 2 only on a positive `not-measured`. A measured absence keeps the original verdict, the original routing and the original bytes; every verdict keeps its exit code. ⛔ The payload boundary is untouched: no API call, no token, no live label read. The `labeled`/`unlabeled` triggers remain the mitigation. A new self-test battery pins both directions from one harness, plus the fixture control the card asks for (a PR carrying the carrier must report it PRESENT). Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude <noreply@anthropic.com>
1 parent 340b6dc commit 25af0f6

1 file changed

Lines changed: 197 additions & 22 deletions

File tree

0 commit comments

Comments
 (0)