Repository navigation
Description
Problem
The verdict score of #5968 (PR #5975, release 0.165.0) has gaps that a review after the merge found:
- A renamed pull request gets the wrong kind.
pull_kind()(src/devops_cli/roadmap/pr_verdict.py, about line 160) reads the title at the time of the report. The implement job renames a Staged plan draft to the delivery title (implement/implement_run.py, about line 1649), and people rename plan pull requests too. In the last 7 days, 4 of 113 bot pull requests were renamed this way (fix(ci): Accept copilot branches in the branch-name hook #5407, fix(github): Fix check-readiness base and monitor merged state #4980, fix(telemetry): read repository traffic as the GitHub App #4932, refactor: delete the src symbols that only tests call #4849); fix(telemetry): read repository traffic as the GitHub App #4932 went fromdocs(openspec): plan #4757 ...tofix(telemetry): ..., and three of them carryverdict/fix-planevents. So stage loses these verdicts, implement shows them as unscored, and averdict/mergeableput on a plan before the rename counts as an implement success. - Label events after the first 100 are dropped with no warning: the query asks for
first: 100timeline items (about line 115) and does not readpageInfo.hasNextPage. - A GitHub read error stops all of
devops roadmap eval grades(job_grade_report.py, about line 589), also the Loki rows, while the design says that the Loki part does not change. - The string
verdict/fix-planis typed inpr_verdict.py(about line 77) andphase.py(about line 274) instead of the constantFIX_PLAN_LABEL(stage_verify.py, about line 108), and no test ties the constant to the plan entry ofVERDICT_LABELS. - ADR 0021 (about lines 60 and 215) still names
plan/needs-fixfor the current Service, and the knowledge-base page on GitHub project management lists onlyverdict/fix-planof the six verdict labels.
Expected behavior
- The kind of a pull request comes from its first title: the query also reads
RENAMED_TITLE_EVENTin the sametimelineItemscall, and the kind uses thepreviousTitleof the first rename. A label event before the rename scores stage; an event after it scores implement. A test covers a renamed pull request. - A pull request with more than one page of label events raises an error, as the 1000-result guard does.
- A GitHub read error prints "verdicts not read: " and the report keeps its Loki rows.
- Each reader and writer uses
FIX_PLAN_LABEL; a test checks it againstVERDICT_LABELS. - ADR 0021 and the knowledge-base page name the six verdict labels.
Related
- feat(roadmap): the PR review gate scores each bot PR #5968, feat(roadmap): a review job gives each bot PR its verdict #5969 (review job), feat(roadmap): track the Service step jobs #5014.
Alternatives check of 2026-11-24: none.
Tool: none found.
Reason: Searches found no library that covers this internal fix: rename-aware scoring, a timeline overflow guard, grade-report error isolation and one label constant all live in the project's own GraphQL read; PyGithub, the only candidate, was already considered and rejected.
Lacks:
- Kind from the first title, not the report-time title
- Error on a timeline with more than one page
- Grade report keeps Loki rows on a GitHub read error
- One FIX_PLAN_LABEL constant tied to VERDICT_LABELS
Proposed design
Problem statement
The verdict score of bot pull requests uses the title at report time, drops timeline events after 100 with no warning, stops the whole grade report on a GitHub read error, and leaves the fix-plan label and its documents inconsistent. The change scores a pull request by the kind at its first verdict label, raises on timeline overflow, isolates the GitHub read error, and uses one label constant and one list of six labels.
Acceptance criteria
Requirement: Rename query
The verdict search SHALL request RENAMED_TITLE_EVENT with previousTitle in the same timelineItems call as LABELED_EVENT.
Scenario: GraphQL query holds both event types
- WHEN A test reads the GraphQL query string of the verdict search.
- THEN The timelineItems selection holds LABELED_EVENT, RENAMED_TITLE_EVENT and previousTitle.
Requirement: Plan verdict before rename
The verdict read SHALL score the first verdict label with the pull request kind at the time of that label event.
Scenario: Plan verdict before rename
- WHEN A bot pull request opens with a plan title, gets verdict/mergeable, and later renames to a delivery title.
- THEN read_bot_pulls returns PullKind.PLAN with Verdict.MERGEABLE, and the grade counts it for stage.
Requirement: Delivery verdict after rename
The verdict read SHALL score a verdict label after the first rename with the delivery kind.
Scenario: Plan verdict after rename
- WHEN A bot pull request opens with a plan title, renames to a delivery title, and gets verdict/fix-plan.
- THEN read_bot_pulls returns PullKind.DELIVERY with Verdict.NEEDS_FIX, and the grade counts it for implement.
Requirement: Timeline page overflow
The verdict read MUST raise GitHubUnreadError when a pull request timeline has more than one page of events.
Scenario: More than 100 timeline events
- WHEN The GraphQL answer reports timelineItems.pageInfo.hasNextPage as true.
- THEN read_bot_pulls raises GitHubUnreadError with the pull request number and the timeline page reason.
Requirement: Grade report keeps Loki rows
The grade report SHALL print verdicts not read: <reason> and keep its Loki rows when the GitHub verdict read fails.
Scenario: GitHub verdict read fails
- WHEN
devops roadmap eval gradesgets a GitHubUnreadError from the verdict read and has Loki rows. - THEN The command prints
verdicts not read: <reason>and still prints the Loki grade rows.
Requirement: One fix-plan label constant
Each reader and writer of verdict/fix-plan SHALL use FIX_PLAN_LABEL, and a test MUST tie it to the plan entry of VERDICT_LABELS.
Scenario: Label constant matches the plan entry
- WHEN A test reads FIX_PLAN_LABEL and VERDICT_LABELS[PullKind.PLAN].
- THEN FIX_PLAN_LABEL is the key whose verdict is Verdict.NEEDS_FIX, and a source scan of
src/devops_cli/roadmapfinds no literalverdict/fix-planoutside stage_verify.py.
Requirement: Six verdict labels in docs
ADR 0021 and the knowledge-base page on GitHub project management SHALL name all six verdict labels.
Scenario: Documents list the six labels
- WHEN A test reads the six labels from VERDICT_LABELS.
- THEN Each label appears in ADR 0021 and in the knowledge-base page, and the current Service section of ADR 0021 has no
plan/needs-fix.
Existing Tool Considered
PyGithub/PyGithub, rejected by ADR 0006. The alternatives check in the issue body gives what it covers and lacks. The proposal keeps the project GraphQL read and adds the title-at-label scoring, the timeline page guard, the grade-report error split and the FIX_PLAN_LABEL check.
Key questions
- Which title gives the kind of a renamed bot pull request?: Order the timeline events. The first RENAMED_TITLE_EVENT gives previousTitle and the current title. A label event before the first rename uses previousTitle; a label event after it uses the current title. The first verdict label scores that kind. (best practice) [sources: src/devops_cli/roadmap/pr_verdict.py:115, src/devops_cli/roadmap/stores/github_store.py:505]
- Rejected: Current title at report time. It misclassifies a plan that a person or implement renamed, and it loses stage verdicts.
- Rejected: Original title for every event. It scores a label after the rename as stage, but that label belongs to implement.
- Chosen: Title at the label event from the first rename. It keeps a pre-rename stage verdict and gives a post-rename label to implement.
- How should the verdict read handle more than one page of timeline events?: Add pageInfo.hasNextPage to the timelineItems selection and raise GitHubUnreadError when it is true. This matches the existing 1000-result guard in _search_page. (best practice) [sources: src/devops_cli/roadmap/pr_verdict.py]
- Rejected: Ignore hasNextPage. It drops events after the first 100 with no warning.
- Rejected: Paginate the nested timelineItems. The issue asks for an error, and a nested page loop adds cost for a rare case.
- Chosen: Raise GitHubUnreadError. It gives the same typed failure as the 1000-result guard.
- How should the grade report handle a GitHub verdict read error?: Catch GitHubUnreadError around the verdict read, print
verdicts not read: <reason>, and keep the Loki rows. (best practice) [sources: src/devops_cli/roadmap/job_grade_report.py]- Rejected: Let the error stop the command. It also drops the Loki rows, which do not depend on GitHub.
- Rejected: Omit verdicts with no message. The operator cannot tell a read failure from no verdicts.
- Chosen: Print the reason and keep Loki rows. It isolates the GitHub failure and keeps the report useful.
- Which constant is the source of the
verdict/fix-planlabel?: FIX_PLAN_LABEL insrc/devops_cli/roadmap/stage/stage_verify.py:109. Each reader and writer imports it. A test asserts it is the Verdict.NEEDS_FIX key of VERDICT_LABELS[PullKind.PLAN]. [sources: src/devops_cli/roadmap/stage/stage_verify.py:109, src/devops_cli/roadmap/pr_verdict.py:74] - Which six verdict labels must ADR 0021 and the knowledge-base page name?:
verdict/mergeable,verdict/fix-plan,verdict/discard-plan,verdict/issue-changed,verdict/fix-implementationandverdict/discard-implementation. [sources: src/devops_cli/roadmap/pr_verdict.py:74, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 16, 2026
Both work on the PR verdict scoring system; #5968 built it and the candidate fixes its renamed-PR kind, pagination, and error-handling gaps.devops-cli-service commentedon Nov 17, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (6)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at c49fd02 (see proposed design in issue body).
devops-cli-service commentedon Nov 24, 2026
The result in the alternatives block of the issue body changed. Before this check:
rejected, tool https://github.com/PyGithub/PyGithub. A person decides what the new result means for the item.Searches (9)
Tools considered:
Searches run:
Sources:
docs(adr): update ADR 0021 verdict labels via Status History (#5984)
fix(roadmap): score renamed bot PR by first verdict kind (#5984)
docs(adr): update ADR 0021 verdict labels via Status History (#5984)
chore(main): release 0.219.0 (#7177)
devops-cli-service commentedon Nov 25, 2026
Released in v0.219.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.219.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 17:09 UTC