Repository navigation
feat(ci): Journey Impact declaration, enforced at merge (#2350) - #2408
Merged
Merged
Conversation
Gate G1 of the journey-coverage deck. Every epic and user-facing feature
declares what it does to the promise list:
Journey Impact: new: J11
Journey Impact: extends: J03
Journey Impact: none: <why this touches no promise>
The declaration is cheap; the GATE is the load-bearing part. Ownership alone
collapses into "PM nags, Eng defers", and an intake field on its own is worse
than nothing — everything is `none:` inside a month and the field reads as
compliance. So the burden sits on the `new:` path: declaring a new promise
obliges the same PR to carry a skeleton for it. That is what stops `none:`
being the cheap escape — choosing it becomes a visible claim, in writing,
next to a diff a reviewer can check it against.
What fails: a malformed declaration (a bare `none` included, AC 4), and a
`new:` declaration — on the PR or on an epic it references — with no matching
skeleton in the diff. A `strict=True` xfail satisfies it (AC 3); `strict` is
what makes it a claim rather than a shrug, since it fails the build the day
the behaviour starts working.
Two design points worth stating, because both are the difference between a
gate and gate-shaped theatre:
- The skeleton is bound to the DECLARED id. Without that, `new: J11` is
satisfied by any edit anywhere in the journey tier, including an unrelated
tweak to an existing journey. The id must appear in the skeleton's path or
body. The match deliberately does not use `\b`: ids are routinely embedded
underscore-delimited (`test_j07_journey.py`) and `_` is a word character, so
`\bJ07\b` never matches the very filename the convention produces. It
delimits on letters and digits instead, so J07 still rejects J071 and XJ07.
- The decision is a pure function in scripts/ci/journey_impact.py, not a
workflow shell body. A rule that only runs in CI is a rule nobody can test;
26 unit tests cover it, and dropping the id binding fails three of them.
An absent declaration PASSES with a loud note. That is deliberate: adopting
the field must not red-X every in-flight PR and dependabot bump on day one.
Tightening it is a follow-up once the templates have been in use.
The PR body is attacker-authored, so it reaches the checker through `env:`
and never through `${{ }}` inside a `run:` — pinned by a test that greps the
workflow's run bodies.
Residual, matching #2336: turning this into a *required* status check needs
repo-admin settings and cannot be done from a PR.
Related to #2350
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
5 tasks
…pair (#2350) CodeQL py/bad-tag-filter, high: `<!--.*?-->` cannot match a comment spanning newlines. Not exploitable here — `_DECL_RE` is line-bounded, so `raw` is always one line — but the pair form was also wrong on this input in a way the fix removes: an UNCLOSED comment was left in the text, so Journey Impact: none: fine <!-- todo read as the reason "fine <!-- todo". Everything from `<!--` on a single line is comment, so truncating there is both more correct and not a tag filter at all. Related to #2350 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
obasilakis
approved these changes
Aug 26, 2026
obasilakis
left a comment
Contributor
There was a problem hiding this comment.
Approving.
CI is fully green (22 checks) and the one thread — CodeQL py/bad-tag-filter on the pair-matching regex — is genuinely fixed in a6b1a7da: raw.split("<!--", 1)[0].strip() also closes the unclosed-<!-- case the alert documented.
One non-blocking note for the merge: the body says "Related to #2350" with no closing keyword, so #2350 won't auto-close.
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Gate G1 of the journey-coverage deck. Every epic and user-facing feature declares what it does to the promise list, and the declaration is enforced at merge:
The declaration is cheap; the gate is the load-bearing part. Ownership alone collapses into "PM nags, Eng defers", and an intake field on its own is worse than nothing — everything is
none:inside a month and the field reads as compliance. So the burden sits on thenew:path: declaring a new promise obliges the same PR to carry a skeleton for it. That is what stopsnone:being the cheap escape — choosing it becomes a visible claim, in writing, next to a diff a reviewer can check it against.Related Issue
Related to #2350
Journey Impact
Journey Impact: none: CI/process gate, no user-facing promise
What fails, what passes
none(bare)new: J11with no skeleton naming J11new: J11, PR carries nothingnew: J11+strict=Truexfail naming J11 undertests/journeys/extends: J03none: <reason>That last row is deliberate: adopting the field must not red-X every in-flight PR and dependabot bump on day one. Tightening it is a follow-up once the templates have been in use.
Two design points
The skeleton is bound to the declared id. Without that,
new: J11is satisfied by any edit anywhere in the journey tier — including an unrelated tweak to an existing journey — which hands the obligation straight back to the theatre the gate exists to prevent. The id must appear in the skeleton's path or body.The match deliberately does not use
\b. Ids are routinely embedded underscore-delimited (test_j07_journey.py) and_is a word character, so\bJ07\bnever matches the very filename the naming convention produces — it would have rejected correctly-named skeletons. It delimits on letters and digits instead, soJ07still rejectsJ071andXJ07.The decision is a pure function, in
scripts/ci/journey_impact.py, not a workflow shell body — a rule that only runs in CI is a rule nobody can test. 26 unit tests cover the parser and the decision; removing the id binding fails three of them (mutation-checked).Security
A PR body is attacker-authored text, so it reaches the checker through
env:and never through${{ }}inside arun:— pinned by a test that greps everyrun:body in the workflow.Acceptance criteria
new:cannot merge without a journey skeleton presentstrict=Truexfail asserting the journey's invariants satisfies the gatenone: <reason>requires a reason string — a barenonefailsVerification
End-to-end against a real diff (the commit that added the journey tier):
and the rejection path:
Notes for the reviewer
tests/journeys/lands with feat(tests,ci): journey tier + per-PR journey-smoke gate (#2335, #2336) #2403 (R1). The gate is correct either way — no PR declaresnew:today, and anew:before the tier exists would simply create the first file there.Type of Change
🤖 Generated with Claude Code