Skip to content

fleet: half-state patrol token lacks checks:read for H82, and the post-stamped claim refusal advises the wrong stroke for an amendment #36454

Done

Description

@objectstack-fleet

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Follow-up from #36203 (PR #36434, the H82 half-state and the post-stamped claim refusal). Found by the seat while landing it. Filed by the seat.

What happens

  1. scripts/pm/check-half-states.mjs H82 reads /commits/SHA/check-suites for a claimed card's PR head. Its standing caller, .github/workflows/half-state-patrol.yml, grants the token contents: read, issues: write and pull-requests: read, and no checks: read. On the scheduled run the read can be refused, so H82 may report every such PR as unread rather than judge it. To be measured on a patrol run log.
  2. scripts/pm/post-stamped.mjs refuses a lone claim comment and prints the stroke label-write.mjs … --add pm:dispatched --remove pm:queue --assign LOGIN. For a claim AMENDMENT the card is already pm:dispatched and assigned, so that advice is wrong for the case it fires on most.

To do

  1. Read the H82 coverage line ("Claimed card PRs (H82): PR row read on N of M") on the latest scheduled patrol run. If the check-suites read is refused, add checks: read to the workflow's permissions: block and say why in its permissions note.
  2. Give the claim refusal a second arm for an amendment of a card that is already dispatched, naming the stroke that fits it.

Acceptance

  • On a scheduled patrol run, H82 reads the check suites of every claimed card PR it gathers.
  • A refused claim amendment prints a stroke that is right for a card already pm:dispatched.

Tier H: .github/workflows/** and scripts/pm/** guard instruments land on the maintainer's approval.

Grade

p2 · domain:devx · area:fleet. A patrol that may be blind on one check, and a wrong hint.


Generated by Claude Code

Activity

  1. added
    bug
    priority:p2
    domain:devx
    on Nov 22, 2026
  2. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:devx (half-state patrol token, post-stamped claim refusal) · pm:queue; rationale: area:fleet · Bug · the patrol token lacks checks:read for H82, and the claim refusal advises the wrong next step; fleet tooling → p2 as filed · size XS.

  3. added
    pm:queue
    on Nov 22, 2026
  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · huangyiirene · session_01J8VVAmv6XL2E9bD25YSnUG

    Claim: PM loop round 1
    Session: session_01J8VVAmv6XL2E9bD25YSnUG
    Account: huangyiirene
    Branch: claude/project-thread-0609iq
    Worktree: objectstack-issue-36454
    Domain: domain:devx
    Seat: repo:objectstack#2
    Area: f2-B (patrol and stamps; lease table on seat post #34478)
    File surface: scripts/pm/post-stamped.mjs (and its own self-test inside the file). Not .github/workflows/**: see Premise.
    Container & model: S, mode:subagent, model: default (quoting dispatch-gates --tier at a73edb3c: "Model tier — no path-derived mandate: the surface hits none of the 4 declared glob(s)"), effort: high (reason: the seat's area order for f2-B sets effort high, written 2026-11-24 under the lease table on seat post #34478)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: fleet tooling in objectstack (scripts/pm/post-stamped.mjs) | none | every seat that amends a claim on a card already pm:dispatched; each amendment
    Thread-read: 7079383500
    Premise: holds for item 2; item 1 unmeasured and sent to the seat. Item 2, read at a73edb3: claimStrokeRefusalText prints one stroke, --add pm:dispatched --remove pm:queue --assign LOGIN, whatever the card's state; and label-write.mjs refuses --comment-file with no label or assignee change ("a lone comment — post-stamped's write"), so an amendment has no printed path that works. Item 1: the card asks for "the latest scheduled patrol run", but .github/workflows/half-state-patrol.yml declares no schedule (on demand only) and the run list holds 0 workflow_dispatch runs. The latest run (45017436563, pull_request, 2026-11-22) logs the token as Contents read, Issues write, Metadata read, PullRequests read, with no Checks row; the H82 coverage line goes to the step summary only, not the log. So whether the read is refused is not measured either way; the workflow file is outside this area's lease and is not touched under this claim until the seat routes it.
    Serial constraints cleared: overlap-check at a73edb3 on a probe commit touching scripts/pm/post-stamped.mjs, scripts/pm/check-half-states.mjs and scripts/pm/fleet-write/execute.mjs: 0 open PR heads share a file, VERDICT clean exit 0.
    Pre-claim lane: repo:objectstack#2, intake area:fleet, area f2-B; scripts/pm/post-stamped.mjs is in the f2-B lease (seat post #34478); no other seat's claim or open PR names this card.
    Pre-claim deps: no Blocked-by:; the parent work #36203 is closed and PR #36434 merged.
    Prior rulings read: node scripts/pm/check-prior-rulings.mjs --card 36454 --paths scripts/pm/post-stamped.mjs,scripts/pm/check-half-states.mjs exit 0 at a73edb3; card ruling: none; 432 in-file ⛔ lines in post-stamped.mjs, the ones on the claim refusal (its docblock and claimStrokeRefusal: the fold is relay-only, a route resolved direct posts the claim, not in judgeBody) stand as constraints; same-day churn c292607.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 24, 2026
  6. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · huangyiirene · session_01J8VVAmv6XL2E9bD25YSnUG

    Premise reading, item 1 (H82 patrol token checks: read) · 2026-11-24T15:43Z · not built under claim 7136404129; item 2 is building.

    • The card asks for "the latest scheduled patrol run". .github/workflows/half-state-patrol.yml at a73edb3 declares no schedule: (on demand only, ruling 🔗 Broken links detected in documentation #208 on [Decision] 仪器与吞吐的取舍:哪些闸门该硬、达档复核保留到什么程度 #19491). The workflow's run list holds 0 workflow_dispatch runs, so no run has ever written H82 into the anchor body.
    • The latest run is 45017436563 (pull_request, 2026-11-22, PR feat(pm): H82 reads claimed card PRs CI cannot see; post-stamped refuses a lone Claim: comment #36434's head merged with main). Its job log shows the token's permissions as Contents read, Issues write, Metadata read, PullRequests read. There is no Checks row.
    • The H82 coverage line ("Claimed card PRs (H82): …") goes to the step summary only. The sweep step sends the report to $GITHUB_STEP_SUMMARY, and its stderr file was empty. The job log does not carry the line, and this seat's container cannot read the step summary. So whether the check-suites read was refused is NOT MEASURED either way.
    • The repository is public. GitHub documents GET /repos/{owner}/{repo}/commits/{ref}/check-suites as readable without the Checks permission when only public resources are requested, so a refusal is not expected. That is a reading of the docs, not a measurement.
    • No seat can dispatch the patrol: the relay's workflow_dispatch allow-table for this repository lists only shard-timings-refresh.yml and release.yml.

    Remainder: the one step item 1 needs is a maintainer running "Half-State Patrol" on main once from the Actions tab. Then H82's coverage line in anchor #9857's body says whether the read is refused, and checks: read is added only if it is. The card will be released with item 1 as the remainder when item 2's PR lands.

  7. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · huangyiirene · session_01J8VVAmv6XL2E9bD25YSnUG
    os-dev-report

    {
     "issue": 36454,
     "status": "done",
     "branch": "claude/project-thread-0609iq",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37040",
     "session": "session_01J8VVAmv6XL2E9bD25YSnUG",
     "premise_still_valid": true,
     "summary": "Item 2 only. The post-stamped claim refusal now prints two arms, each under the card state it fits: the unchanged dispatch stroke for a pm:queue card, and `label-write.mjs --issue N --comment-file PATH --add pm:dispatched` for an amendment of a card already pm:dispatched. Measured: label-write takes a no-op --add beside --comment-file and packs the comment alone on a dispatched card, and refuses the same arm with ONE-OF (nothing written) on any other state. So the refusal stays pure and prints both arms; a wrong pick fails loudly. The old stroke added LOGIN as a second assignee on a dispatched card unless LOGIN already held it. Relay-only, the direct-route exemption and staying outside judgeBody are all kept. Item 1 (checks: read) is not in this PR; the seat holds it.",
     "tests": "node scripts/pm/post-stamped.mjs --self-test at 58100e07: exit 0, 812 cases pass across 30 batteries (807 before, claim-stroke battery pin 15 -> 20). Five new cases: the two-arm text; each printed arm run as label-write own dry run in a child process (amendment arm on a dispatched card -> exit 0, ops comment; on a pm:queue card -> exit 2, ONE-OF; dispatch arm on a dispatched card held by another login -> comment > assign; on a queue card -> comment > labels_add > labels_remove > assign). Ablation 1, the amendment-arm line deleted via ablation-replace (anchor 1 -> 0): 3 of 812 failed; restored to the HEAD blob 5a16ec8b. Ablation 2, label-write planned made to ignore --add (file not in diff): 2 of 812 failed; restored to the HEAD blob 514254c3.",
     "gates": "local at 58100e07: dispatch-gates --commands derived 64; all 64 run, each exit captured before any pipe; 63 exit 0; pnpm check:i18n-coverage exit 3 PREREQUISITE NOT MET (no dist closure) = NOT MEASURED, CI-owned. --ran with exit codes: 64 accounted, 63 run, 1 NOT-MEASURED. overlap-check VERDICT clean exit 0. CI at report time: Check Changeset=success; Lint lanes, Type Check lanes, PR-body guards, Governed Surface Queue Guard, Check PR Size = in_progress.",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "3 — git push x2 (empty branch, fix commit; git, not REST); relay pr_create x1 (POST /pulls draft + POST /issues/37040/assignees + POST /issues/37040/labels skip-changeset); post-stamped comment x1 (this report, POST /issues/36454/comments)",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted in PR Acceptance notes, not filed: the amendment arm depends on label-write deciding planned from the flags, not from what they change; the cross-tool self-test case pins this (ablation 2)."
     ]
    }
  8. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · huangyiirene · session_01J8VVAmv6XL2E9bD25YSnUG
    os-dev-report delta · patch round 1 · PR #37040 · head 63a4559

    Correction to the report comment 7137318718. Its summary says label-write "refuses the same arm with ONE-OF (nothing written) on any other state". That is wrong. label-write refuses the amendment arm (--add pm:dispatched alone) only on a card that carries ANOTHER pm state label. On a card with no pm state label, the arm is not refused: it packs comment > labels_add with no assign, which dispatches the card with nobody assigned. Such a card takes the first arm, which packs comment > labels_add > assign.

    What changed in this round, one commit 63a45590 on the same branch:

    • the refusal text and both docblocks say "another pm state", and the first arm is named "a card not yet dispatched (pm:queue or no pm state)";
    • a new control in the claim-stroke battery runs both arms through label-write's dry run on a card with no pm state, and the battery pin goes from 20 to 21.

    Self-test at 63a4559: 813 cases pass across 30 batteries. Ablation: dropping "or no pm state" from the first arm's label makes the self-test report 1 of 813 failed (the new control); the file was restored to the HEAD blob 21a7ff20. Gates at 63a4559: dispatch-gates --commands derived 64 families, and all 64 ran with exit codes recorded; 63 exited 0. pnpm check:i18n-coverage exited 3, PREREQUISITE NOT MET (no built dist closure), so it is NOT MEASURED locally and left to CI. --ran reconciliation: 64 accounted, 63 run, 1 NOT-MEASURED. overlap-check: VERDICT clean exit 0.

  9. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · huangyiirene · session_01J8VVAmv6XL2E9bD25YSnUG

    Release: session session_01J8VVAmv6XL2E9bD25YSnUG (area f2-B) · cause: partial landing. Item 2 landed in PR #37040 (merged as 3691a5c, Refs #36454 (item 2)). Item 1 is left, and only a maintainer can take its next step · destination: pm:awaiting-maintainer, assignee cleared.
    Maintainer-action: run "Half-State Patrol" (.github/workflows/half-state-patrol.yml) on main once from the repository's Actions tab ("Run workflow") — done when a workflow_dispatch run of that file has completed and anchor #9857's body carries the H82 line "Claimed card PRs (H82): …"
    Resume-from: none

    • What landed (merged 2026-11-24T18:29Z): when post-stamped refuses a Claim: comment, it now prints two strokes. A card not yet dispatched (pm:queue or no pm state) gets the dispatch stroke. A card already pm:dispatched (an amendment) gets --add pm:dispatched, which sends the comment alone. L1 ACCEPT 7140176665; landing comment 7140216515.
    • What is left (item 1): whether the patrol token's check-suites read is refused. The reading is in comment 7136512637: there is no scheduled run, the patrol has never been dispatched, the relay cannot dispatch it, and the line goes only to the step summary. Once the maintainer's run puts the H82 line in [Half-state patrol] check-half-states live sweep — generated view (please pin) #9857, a seat reads it. If the read is refused, checks: read joins the workflow's permissions: block in a governed workflow PR. If it is not refused, item 1 needs no change and the card closes.
    • Why pm:awaiting-maintainer and not pm:queue: nothing on item 1 can move until that run exists, and a queued card would be re-claimed into the same wall. The director's seat moves the card back to pm:queue with the evidence once the run is in.
  10. added
    pm:awaiting-maintainer
    and removed
    pm:dispatched
    on Nov 24, 2026
  11. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · huangyiirene · session_01J8VVAm8Y73VGNq3PkTe3dc

    Closed 2026-11-26T01:22Z: item 1 reads not refused, so it needs no change; item 2 landed in PR #37040.

    Nothing on this card is left. No follow-up card is filed.

  12. removed
    pm:awaiting-maintainer
    on Nov 26, 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

    area:fleetbugdomain:devxpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions