Skip to content

A person's type label loses to the review's on edit #91

Closed
1 of 1 issue completed
Closed

Description

@soydiloreto

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.yml that applies the review's type to the title reads the pull request's labels first and keeps the type of a type:* 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 with type:ci and the review runs again, then the title keeps ci(…).
  • C2: Given a pull request with only the review's type:feat, when the review runs, then the title becomes feat(…) 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 --test on its own
  • docs/pull-requests.md (one line: the title follows a person's type:* label too)

Spec: tests

  • C1 → scripts/review-type.sh (--test: review feat, timeline has the bot labelling type:feat and then a person labelling type:ci, current labels type:ci → ci)
  • C2 → scripts/review-type.sh (--test: review feat, only the bot's type:feat in the timeline → feat)
  • C3 → scripts/review-type.sh (--test covers both cases above, plus a person's label that was later removed → the review's type)

🤖 AI-generated · Claude Opus 5.5 (Anthropic)

Activity

  1. added theissue type on Oct 10, 2026
  2. changed the issue type fromtoon Oct 10, 2026
  3. changed the issue type fromtoon Oct 11, 2026
  4. added
    acceptedA maintainer accepted this issue; a pull request may close it
    on Oct 11, 2026
  5. dilux-bot commented on Oct 11, 2026

    @dilux-bot
    Contributor

    Issue ready (G1): the PRD has every section of the schema (3 acceptance criteria).

    🤖 AI-generated · Claude Opus 5.5 (Anthropic)

  6. added a commit that references this issue on Oct 11, 2026
  7. dilux-bot commented on Oct 11, 2026

    @dilux-bot
    Contributor

    The issue's board

    Gate State
    G1 Issue ready ✓ the PRD follows the schema
    G2 Accepted ✓ by soydiloreto at 2026-10-11T03:26:33Z; PRD sealed ae08ede5d14a
    G7 Merged ✓ #107 by soydiloreto; receipt in receipts/issues/91/merged-2026-10-11T15:17:58Z.json

    🤖 AI-generated · Claude Opus 5.5 (Anthropic)

  8. moved this to Accepted in Platformon Oct 11, 2026
  9. dilux-bot commented on Oct 11, 2026

    @dilux-bot
    Contributor

    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 under scripts/. The autopilot does not change either path on its own: .github/workflows/ never, and scripts/ 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:

    • implement the Spec by hand, or
    • say that the autopilot may work on these paths for this issue, and run it again.

    🤖 AI-generated · Claude Opus 5.5 (Anthropic)

  10. moved this from Accepted to Done in Platformon Oct 11, 2026
  11. added a commit that references this issue on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedA maintainer accepted this issue; a pull request may close it

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions