Skip to content

The type decision of the review, as a script with its test #103

Closed

Description

@soydiloreto

Problem

The fix for #91 moves the decision "whose type wins" into a script that claude-review.yml calls from the central checkout. While the script is not on main, the review of the pull request that starts calling it cannot find it and fails. This is the first half of #91, split so that each pull request's review passes: the review of a pull request to this repository reads its scripts from main, so the script has to be there before the workflow calls it.

Scope

Out of scope

Acceptance criteria

  • C1: Given the script on main, when the scripts job runs, then its self-test covers a person's label winning, the review's label applying and a person's label later removed.
  • C2: Given this change, when it merges, then no workflow behaves differently.

Criticality

Normal

Spec: approach

Add scripts/review-type.sh, the "whose type wins" decision as the Spec of #91 describes it, without any caller yet. It takes the review's type, the bot's login, the pull request's issue timeline (JSON) and its current type:* labels, and 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. Its --test runs fixture timelines through it. The scripts job in pull-request.yml lists its self-tests one by one, so one line, bash scripts/review-type.sh --test, is added there. No workflow calls the script, so nothing behaves differently (C2).

Spec: files

  • scripts/review-type.sh (new: the decision and its --test)
  • .github/workflows/pull-request.yml (one line in the scripts job: bash scripts/review-type.sh --test)

Spec: tests

  • C1 → scripts/review-type.sh (--test: review feat, bot's type:feat then a person's type:ci still on the PR → ci; only the bot's type:feat → feat; a person's type:ci later removed → feat)
  • C2 → scripts/review-type.sh (--test runs without any workflow calling the script; the only workflow line added is the self-test in the scripts job)

🤖 AI-generated · Claude Opus 5.5 (Anthropic)

Activity

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

    @dilux-bot
    Contributor

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

    🤖 AI-generated · Claude Opus 5.5 (Anthropic)

  4. added a commit that references this issue on Oct 11, 2026
  5. 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:58:56Z; PRD sealed 5cbd510ff2df
    G7 Merged ✓ #104 by soydiloreto; receipt in receipts/issues/103/merged-2026-10-11T04:08:05Z.json

    🤖 AI-generated · Claude Opus 5.5 (Anthropic)

  6. dilux-bot commented on Oct 11, 2026

    @dilux-bot
    Contributor

    The Spec is written above. I am stopping here, before I create a branch, because this change touches paths the autopilot may not change on its own:

    • scripts/review-type.sh (new). The PRD asks for it, but it sits under scripts/.
    • .github/workflows/pull-request.yml, one line in the scripts job (bash scripts/review-type.sh --test). That job lists every self-test by hand and does not pick up scripts/*.sh --test by itself, so C1 ("the scripts job runs its self-test") needs this line. The autopilot must never change .github/workflows.

    To go on, a maintainer can either write the change by hand from the Spec, or tell the autopilot explicitly that it may touch these two paths for this issue.

    🤖 AI-generated · Claude Opus 5.5 (Anthropic)

  7. added a commit that references this issue on Oct 11, 2026
    0564096
  8. 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