Repository navigation
fix(pm): let the seat rewrite a pull request body signed on its last line - #29225
Merged
objectstack-fleet[bot] merged 2 commits intoNov 2, 2026
Merged
Conversation
…line An issue_patch body whose target the platform answers is a pull request may carry the seat's signature as a trailing HTML comment instead of its first line, so line 1 stays the attribution comment and the closing keyword. The target is read (GET issues/N, its pull_request key) after the packer and before the dry-run exit; an issue is refused as usage and an unread target as a prerequisite. A body carrying neither shape is refused before any read, its refusal naming both. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
…-body-refresh-door Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
Contributor
Author
|
domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd 席位核对 — ACCEPT ·
|
objectstack-fleet
Bot
deleted the
claude/issue-29145-pr-body-refresh-door
branch
November 2, 2026 10:58
This was referenced Nov 2, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 田騏 · project thread
Fixes #29145
Clause-②: no
Metadata-protocol: none
维护者速读
Fixes #n。结果评审要求"落地前把正文更新到新 head"时没人能做到,已经在三个 PR 上出现过。scripts/pm/fleet-write/dispatch.mjs这一个客户端脚本,不发布任何包。新增的一次平台 GET 读不到就拒发(退出码 3),不会放行。回滚只需 revert 这个 PR。scripts/pm/fleet-write/dispatch.mjs里的main():平台读放在打包之后、dry-run 退出之前;然后看readPullRequestTargets,它分三档判定:pull、issue、unread。node scripts/pm/fleet-write/dispatch.mjs --self-test,应看到284 cases pass across 25 batteries。What changes
scripts/pm/fleet-write/dispatch.mjsonly. The seat-edit signature rule now has one more door, for the pull request body:issue_patchbody whose first non-empty line is the seat's signature passes exactly as before, whatever it targets. No read is made.issue_patchbody that carries neither the signature line nor the trailer is refused as usage (2) before any read. Its refusal now names both shapes.issue_patchbody that carries only the trailer is judged by reading the platform:GET /repos/{repo}/issues/{n}, the same locator the read-back uses for this op. A 200 with apull_requestkey passes. A 200 without that key is an issue, refused as usage (2). Any other answer, or none, is PREREQUISITE NOT MET (3), so an unread target never passes. The read runs after the packer and before the dry-run exit, so a dry run refuses what the send would. It re-execs through the egress proxy the way the send does.signed: LANE#N · ACCOUNT · SESSION, then the comment closer (PR_BODY_TRAILER_SHAPE). Its inside is parsed by the existingreadSignatureLinefromcheck-half-states.mjs. That file is not changed, and the signature shape is not changed.comment_edittakes no trailer: a comment is a post, never a pull request body.pr_createkeeps its exemption.The header section, the exit-code table and the usage text say the same. The server side (
validate.mjs,execute.mjs,fleet-write.yml) needs no change: it holds no signature rule (grep: zero hits for signature in all three).Tests
New self-test battery, "the pull request body at the seat's door", with 19 cases pinned in
SELF_TEST_BATTERIES. The battery floor was raised from 24 to 25.unread.comment_editwith a trailer is still refused.packRequest(and beforeif (opts.dryRun).The existing battery, "the signature at the seat's door", is unchanged: 13 cases, all green.
Live dry runs on this branch, reads only:
#29083, a pull request, exits 0. The reason line reads "answered 200 with a pull_request key".Acceptance notes
platform-readings.md, edit side). The stored body's last non-empty line is therefore the platform's footer, and the trailer sits just above it. The seat should send no footer of its own. The header says this.PATCH /issues/{n}on a pull request keeps an HTML comment byte for byte. A create keeps one, because line 1 of every PR body is the attribution comment. The relay's read-back is the backstop on the first live use: a stripped trailer would read back as NOT STORED (exit 4)..claude/**is governed). The seat should be told about two places.seat-post-protocol.mdline 30 says a post's and a card's body opens with the signature. The pm-dispatch SKILL.md claim template has the seat rewriteowed — FILESto#Nbefore ACCEPT. That template step is executable through this door, but nothing there names the trailer. Today only the refusal text does.skip-changesetapplies:scripts/pm/**publishes no package.Verification
Head
e3d142f68d(origin/main merged once, at104cd1a58d).Derived gates: 38 commands, each exit captured before any pipe, all 0;
--ranreconciliationnode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 38 commands (1 path, merge base 0d15f89). All 38 ran on the head above and each exited 0.pnpm check:pm-dispatch-gatesran under nohup: "1937 cases pass" (fast tier, 398.6s on a shared box).--ran: "38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3)".Self-tests of every script that imports the changed file
pnpm check:doc-authoring: exit 0🤖 Generated with Claude Code