Repository navigation
A person's type label loses to the review's on edit #91
Description
Problem
On #88 the review set type:feat and retitled the pull request feat(…). The maintainer's account then removed type:feat, added type:ci and retitled it ci(…) (2026-10-10 23:23:22); 28 seconds later dilux-bot retitled it feat(…) again (23:23:50), from the review's last verdict, in .github/workflows/claude-review.yml (the step that runs gh pr edit … --title "$retitled"). docs/pull-requests.md says a person's own type:* label wins over the review's. Because the title decides which issue Type the gate accepts (a feat must close a Feature), the pull request stayed blocked although its issue was accepted.
Scope
- The step of
claude-review.ymlthat applies the review's type to the title reads the pull request's labels first and keeps the type of atype:*label added by a person (not by a bot), retitling from that one instead. - A test of that decision (whose type wins), in a script with its
--test, run by the scripts job.
Out of scope
- How the review decides the type from the diff.
- Any other workflow.
Acceptance criteria
- C1: Given a pull request whose review set
type:feat, when a person replaces it withtype:ciand the review runs again, then the title keepsci(…). - C2: Given a pull request with only the review's
type:feat, when the review runs, then the title becomesfeat(…)as today. - C3: Given the decision as a script, when its self-test runs, then it covers a person's label winning and the review's label applying.
Criticality
Normal
Spec: approach
Move the "whose type wins" decision out of claude-review.yml into a script, scripts/review-type.sh. It takes the review's type, the bot's login, the pull request's issue timeline (JSON) and its current type:* labels. It prints the type of the last type:* label a person (not a bot) added, if that label is still on the pull request, and the review's type otherwise. The workflow calls it in two places: the verdict step (which already has this logic inline, at the human= line) and the "Correct the title's type" step. The second call reads the labels again just before gh pr edit --title, so a verdict that was reused, or a label a person changed after the verdict was read, can no longer put feat(…) back over a person's type:ci. The script has a --test with fixture timelines, and the scripts job runs it.
Spec: files
scripts/review-type.sh(new: the decision and its--test).github/workflows/claude-review.yml(the verdict step and the "Correct the title's type" step call the script)- the scripts job's list of self-tests, if it does not pick up
scripts/*.sh --teston its own docs/pull-requests.md(one line: the title follows a person'stype:*label too)
Spec: tests
- C1 → scripts/review-type.sh (
--test: reviewfeat, timeline has the bot labellingtype:featand then a person labellingtype:ci, current labelstype:ci→ci) - C2 → scripts/review-type.sh (
--test: reviewfeat, only the bot'stype:featin the timeline →feat) - C3 → scripts/review-type.sh (
--testcovers both cases above, plus a person's label that was later removed → the review's type)
🤖 AI-generated · Claude Opus 5.5 (Anthropic)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(issues): one schema for PRD and Spec, checked at acceptance (#98)
dilux-bot commentedon Oct 11, 2026
Issue ready (G1): the PRD has every section of the schema (3 acceptance criteria).
🤖 AI-generated · Claude Opus 5.5 (Anthropic)
Seal #91's PRD
dilux-bot commentedon Oct 11, 2026
The issue's board
ae08ede5d14areceipts/issues/91/merged-2026-10-11T15:17:58Z.json🤖 AI-generated · Claude Opus 5.5 (Anthropic)
dilux-bot commentedon Oct 11, 2026
The autopilot is stopping after the Spec. This change has to touch
.github/workflows/claude-review.yml(the step that retitles the pull request) and add a script underscripts/. The autopilot does not change either path on its own:.github/workflows/never, andscripts/only with a maintainer's go-ahead. The Spec above says what would change and how each criterion is tested.To go on, a maintainer can do one of these:
🤖 AI-generated · Claude Opus 5.5 (Anthropic)
ci(scripts): the review's type decision, as a script with its test (#104
Receipt for #91