chore: make journeys the qa contract for prs - #743
Draft
ovitrif wants to merge 5 commits into
Draft
Conversation
1 task
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.
Closes #742
Description
This PR:
scripts/journeys_index.pyand the generatedjourneys/index.json, which lists per journey the identifiers its actions name, the source files that declare them, and the screens its actions name.--checkand fails on a stale index or on an identifier that no source file declares.### QA Notesopening with#### Journeysto the PR template, and has the/prcommand list the journeys a branch adds or updates and limit#### Manual Teststo what a journey cannot express.AGENTS.mdandjourneys/README.mdwith the rule: a PR that changes user-visible behaviour adds or updates the journeys that prove it, and updates any journey whose route it changes.The
/prcommand now regenerates the index, lists the journeys the branch adds or updates, and stops when a user-visible change has no journey or when a journey whosesourcesthe branch changes no longer matches the diff.A source file declares an identifier when it contains it as a string literal, or as a string template whose text before the first interpolation begins the identifier while the rest has no capital letters (
"Tab-\(…)"declaresTab-generalbut notTab-General). The script uses only the Python standard library and runs on Python 3.9 and later.Open PRs that add or change journeys regenerate the index after this merges. On their current heads, #721 and #727 resolve every identifier; #722 and #724 fail only on
PaymentRequestPay-<payment-request-id>, whichmasterdeclares since #719.Linked Issues/Tasks
Design
N/A — no UI changes.
Preview
N/A — no user-visible changes.
QA Notes
Journeys
N/A — no user-visible behaviour change.
Manual Tests
/pr --dry: the saved description lists that journey under#### Journeys— agent tooling, not an app flow.Automated Checks
python3 scripts/journeys_index.py --checkpasses on Python 3.9 and 3.12: 31 journeys, 126 identifiers, all declared.Tab-General.actionlintpasses onjourneys.yml.Check journeys indexpassed on this PR's head.Check journeys indexonmasterpushes (after merge).