Skip to content

fleet-write dispatch: apply the PR-vs-issue state-label rule to labels_add / issue_create / pr_create, and match pm labels case-insensitively #31253

Closed

Description

@objectstack-fleet

domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7

This card carries the half of #31148 that PR #31250 leaves open. #31148 / PR #31250 enforce the rule at scripts/pm/label-write.mjs. This card covers the other doors and the case gap.

What is wrong

The rule: the six pm state labels (pm:queue, pm:dispatched, pm:blocked, pm:on-hold, pm:awaiting-maintainer, needs-user-decision) never go on a pull request, and pm:awaiting-merge only goes on a pull request. It is in .claude/skills/pm-dispatch/SKILL.md ≈L102/L107/L194. After PR #31250, label-write refuses both. But on main:

  1. scripts/pm/fleet-write/dispatch.mjs adds labels without going through label-write. It does this in a raw labels_add, and in pr_create / issue_create with a labels list. RETIRED_LANE_REWRITE_OPS (≈L920) already applies one label rule (retired lane aliases) to exactly these three ops, so this is the place for the PR-vs-issue rule too. The incident in label-write: refuse a state label (the six pm states incl. needs-user-decision) on a pull request, and pm:awaiting-merge on an issue #31148 (cloud PR Dataset order sorts a select/lookup dimension by its stored value, not the label the user reads #3680) was written by objectstack-fleet[bot], the account behind both doors, so the record does not show which door it went through.
  2. The match is case-sensitive, in both refuseTwoStates and the new fix(pm): label-write refuses a pm state on a pull request and pm:awaiting-merge on an issue #31250 refusal. GitHub label names match case-insensitively, so adding Needs-User-Decision applies the existing needs-user-decision label and gets past both checks.

Expected

  • dispatch.mjs refuses, before any write and with the rule quoted: a state label in labels_add on a pull request (or in pr_create's labels), and pm:awaiting-merge in labels_add on an issue (or in issue_create's labels). Reuse label-write's predicate rather than restating it.
  • Both doors compare pm labels case-insensitively (refuseTwoStates included).
  • Removals are never refused. One self-test case per door and direction.

Evidence

Contract review on PR #31250, S1 and N1.

Activity

  1. added
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    domain:skillsDomain lane — seat card indexed by label:pm:seat
    pm:queueReady for the PM dispatch loop
    toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface
    and removed
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Nov 7, 2026
  2. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: audit · p2 · domain:skills · 2026-11-07T20:55Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7

    Claim: PM loop round 30 · 2026-11-08T03:37Z
    Session: session_01J8VVAj7CvjkGXvgXzd6RZ7
    Account: huangyiirene
    Branch: claude/project-thread-7dhc4l (the card thread's designated branch)
    Worktree: objectstack-issue-31253
    Domain: domain:skills
    Seat: domain:skills#3
    File surface: scripts/pm/fleet-write/dispatch.mjs (the PR-vs-issue state-label refusal on labels_add / pr_create / issue_create, reusing label-write's exports); scripts/pm/label-write.mjs (case-insensitive pm-label matching in refuseTwoStates and the kind refusal; exports only if dispatch needs one); scripts/pm/fleet-write/validate.mjs / execute.mjs only if the check must live there, said why; .claude/skills/pm-dispatch/** only inside the line ceilings, paid by same-file deletion; no ratchet raise (stop on breach)
    Container & model: M, mode:thread, project-default model, effort: high. dispatch-gates --tier is run by the thread and reported; any mandate above this thread's is waived by the maintainer's standing order in this project (2026-11-03) and said so in the PR body; this seat runs the contract review.
    Clause-②: no
    Metadata-protocol: none
    Responsibility: scripts/pm (this repo) | label-write.mjs refuses the kind rule since PR #31250, but the relay's own adding doors do not, and both match case-sensitively | every seat that adds labels through the relay, today
    Thread-read: 6712910308
    Premise: holds on main e73542555: PR #31250 is merged; dispatch.mjs imports only classifyHttp from ../label-write.mjs (L489) and applies one label rule to the three adding ops (RETIRED_LANE_REWRITE_OPS, L920) but not the kind rule; refuseTwoStates (label-write.mjs L352) and refuseKindLabels compare exact strings.
    Serial constraints: none open. The seat runs serially (one card) by the maintainer's word of 2026-11-08; #31332 handed off (PR #31347 in the merge queue).

    skip-changeset. Fixes #31253. Tier read by check-governed-merges at the PR.

  4. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 8, 2026
  5. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7

    ACCEPT → PR #31357 comment 6717084424 review, 6717176324 ACCEPT, head 79f03c1a. Not governed (ordinary queue): the seat readied it and armed auto-merge. Contract review PASS with no must-fix. The should-fix item is filed as #31359.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:skillsDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions