Skip to content

Commit bac22eb

Browse files
claude[bot]claude
andauthored
docs(pm): rest-channel.md rows 1–2 name the ccr REST routes for the draft flip and auto-merge (#17823)
The session proxy refuses `POST /graphql` outright and its refusal names first-party REST routes on the seat's own credential, so `rest-channel.md` rows 1 and 2 — the draft → ready flip and auto-merge / enqueue — are no longer GraphQL-only with no fallback. Both routes were driven with read-back on 2026-09-12, by the cli seat at 07:46Z and by the skills seat at 08:45Z. The two rows therefore leave the 「不可迁移」 bucket for the write-side list as `ccr` bullets that keep MCP as the alternative rather than the only channel, keep the read-back criteria unchanged, and record in one clause the cost the new channel brings: the timeline actor differs by channel. Fixes #17820 ## Acceptance notes **Premises, checked on `origin/main` before the first edit** 1. ✅ Rows 1 and 2 read exactly as the card quotes them. The file is byte-identical to the dispatch's `2070a1d8` (`git diff 2070a1d HEAD -- .claude/skills/pm-dispatch/references/rest-channel.md` is empty); the rows sit at lines 53–57 on `c1078a559`, not 51–56, which is a line-number drift only. 2. ⚠️ **FALSE in its first half, and it is load-bearing.** The dispatch and the grading comment both say the file is "82 lines, **not** in the line-count ratchet's CEILINGS table". It IS in that table — `['.claude/skills/pm-dispatch/references/rest-channel.md', 82]` in `scripts/pm/check-skill-line-ratchet.mjs`, i.e. the file sits at **headroom 0**, and it is additionally recorded as a SOURCE (93 → 82) inside a declared CROSS_FILE_MOVE, so its ceiling number is load-bearing arithmetic for another file's raise. The second half of the premise holds: `MAX_LINE_BYTES = 120` applies per line, and every line written here is within it (the widest is exactly 120 bytes). 3. ✅ No open PR touches `rest-channel.md` — checked by reading the file list of all 20 open PRs, not from memory. **How the required content was paid for, at net zero lines** The rewrite needed seven bullets where the two retired rows occupied five lines, and a ratchet at headroom 0 admits no raise without a maintainer ruling. The missing two lines came from restoring an encoding a standing maintainer ruling already prescribed for this very file, quoted in the ratchet script's own CEILINGS comment (2026-09-01, 总监批): 「**C 同批**:退役 L58 对红窗常设规则的复述 —— 内容归属裁定:**红窗规则由 `platform-readings.md` 配额段独家持有**,`rest-channel.md` 只留指路」, which the same comment records as having been paid "folded into the 不可迁移 heading at zero line cost". The pointer had since drifted back out into a standalone line plus its blank; it is folded back into the heading here, verbatim in substance. Result: **82 lines before, 82 lines after, ceiling 82, headroom 0** — the file's own convention, and the CEILINGS entry is untouched. **What landed, per work item** - **A** — `POST .../pulls/{n}/ccr/ready_for_review` and the reverse `.../ccr/convert_to_draft` are named as the seat-credential channel; MCP `update_pull_request` stays as the alternative; the read-back criterion 「状态码不作数,读回才作数」 stays, now spelled with both halves (`GET /pulls/{n}` → `draft: false`, timeline `ready_for_review`). The 「断粮:等它恢复或人工点一下」 clause is gone. - **B** — `PUT .../pulls/{n}/ccr/auto_merge` with `{"merge_method":"SQUASH"}`, `DELETE` disarms; MCP `enable_pr_auto_merge` stays as the alternative; enqueue is verified by `added_to_merge_queue` on the timeline and the landing shape by `git rev-list --parents`, with 「⛔ `auto_merge` 与回显都不作数」 keeping both unreliable readings out. 「配额红窗无退路」 is gone; the direct-merge note `PUT .../pulls/{n}/merge` is kept. - **C** — one clause, on the row that carries the direct-merge note: 「ccr 的 timeline actor 记 `claude[bot]`,MCP 记席位账号」. Stated as a fact, with no recommendation and no ruling; the card number is deliberately absent because `pnpm check:pm-skill-id-lint` bans issue IDs in this corpus, so the question's owner cannot be cited in-file. - **D** — both rows moved into 「写侧 —— 全部可迁移」, beside the other PR-lifecycle writes. The 「不可迁移」 framing is re-counted honestly: 「只有这几件」 → 「只有这三件」, and rows 3–5 renumber to 1–3 with their text untouched. - **E** — both new rows carry 「2026-09-12 两席实调」; the retained 2026-09-11 reading keeps its own date. **Reading kept rather than dropped** The old row 1's naked-`PATCH` reading (「`PATCH /pulls/{n}` 带 `{"draft": false}` 回 200 且什么都没改」) is kept, as the ⛔ line directly under the new route. It is what stops a seat from reaching for the plain REST route now that a REST route exists, and it is the evidence behind 「状态码不作数」. **Verification** `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` in this worktree, derived at `d6ebc6383`, printed 14 commands; all 14 were run and all exited 0. Verdict lines worth quoting: ``` ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/rest-channel.md is 82 lines (ceiling 82; headroom 0). ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/rest-channel.md: widest table row is 0 bytes (pin 0; headroom 0). ``` Two of the fourteen first exited **3 — PREREQUISITE NOT MET**, not a finding: `pnpm install` had not run in this fresh worktree, and `check:doc-formula-expressions` additionally needed `@objectstack/formula` and `@objectstack/lint` built. Both were re-run green after `pnpm install` and a lock-held `turbo run build --filter=@objectstack/formula --filter=@objectstack/lint`. No changeset: the diff is `.claude/**` only, which publishes nothing from any released package, so the PR carries `skip-changeset`. **Out of scope, reported not done** `references/platform-readings.md` now contradicts this table in three of its lines — 「undraft 可用路径只有 MCP 这条」, 「裸 GraphQL 在会话内被拒,它建议的改用 REST 对 undraft 是错的」 (the suggested route now works) and the `enable_pr_auto_merge` rows that read as the only enqueue channel. The card explicitly rules that file out of this landing, so nothing here touches it; the skills lane owns the follow-up. Also noted, not filed: the actor question — an act through a `ccr` route is written to the timeline as `claude[bot]` and through MCP as the seat account — belongs to the open card that holds it, and this PR rules nothing about it. ## 维护者速读(草稿) **改了什么** — PM 用的 REST 通道对照表里,「draft 转 ready」和「挂 auto-merge / 入队」两条原本写着「只能走 GraphQL、配额红窗里无路可走」。今天平台不再这样:会话代理直接拒绝 GraphQL,并在拒绝里点名一组席位凭据可用的 REST 路由。这两条改写成「有 REST 通道、MCP 仍是备选」,并从「不可迁移」挪到「写侧」,同时保留原有的「读回才作数」判据。 **为什么改** — 表里的事实错了,代价不是掉链子而是排错计划:席位按旧表会在配额红窗里干等或去找人工点按钮,而它自己的通道是通的。两次实调(2026-09-12,cli 席 07:46Z、skills 席 08:45Z)都带读回验证。 **风险与代价(含回滚)** — 风险有一条并已写进表里:走 ccr 路由时,时间线上的操作者记成 `claude[bot]`,走 MCP 记成席位账号;哪个对是另一张卡的问题,本 PR 不裁。回滚成本为零 —— 单文件文档改动,`git revert` 即可,无代码、无发布物、无 changeset。行数守恒:82 行进、82 行出,棘轮天花板与其跨文件移动声明都没动。 **席位意见** — **你要做的** — 这是受管面(`.claude/**`),按规矩只能由维护者人工合并;PR 停在 draft,席位不会翻 ready、不会挂 auto-merge。需要你确认的只有一点:本 PR 把「红窗规则只在 `platform-readings.md`、本表只留指路」那条既有裁决的编码方式(折进「不可迁移」标题、零行成本)恢复了原样,以此腾出两行装下新内容。若你希望改用「把天花板从 82 提到 84」的方式承载,请直接说,届时需要你的一句提额裁决。 _Generated by [Claude Code](https://claude.ai/code/session_01MCLBsUgfykL74aU716rzVK)_ --- _Generated by [Claude Code](https://claude.ai/code/session_01MCLBsUgfykL74aU716rzVK)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent d79f249 commit bac22eb

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

.claude/skills/pm-dispatch/references/rest-channel.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@
4545
- 它是零文件写的合 main 手段,产出真合并提交、不重写历史。
4646
- `expected_head_sha` 必须是完整 40 字符 SHA,短 SHA 回 422。
4747
- base 未动回 422 no new commits on the base branch = 无事可做,不是失败。
48+
- ✓ draft 转 ready `POST .../pulls/{n}/ccr/ready_for_review`,反向 `.../ccr/convert_to_draft`
49+
- ⛔ 裸 `PATCH /pulls/{n}``{"draft": false}` 回 200 且什么都没改(2026-09-11 实调),读回仍 draft。
50+
- ⇒ 状态码不作数,读回才作数:`GET /pulls/{n}``draft: false`、timeline 的 `ready_for_review`
51+
- ✓ auto-merge 挂载 `PUT .../pulls/{n}/ccr/auto_merge``{"merge_method":"SQUASH"}`,`DELETE` 卸载。
52+
- 入队读 timeline `added_to_merge_queue`,落地读 `git rev-list --parents`;⛔ `auto_merge` 与回显都不作数。
53+
- 两条 2026-09-12 两席实调;备用通道 MCP `update_pull_request``enable_pr_auto_merge`
54+
- 直合仓另有 `PUT .../pulls/{n}/merge`;ccr 的 timeline actor 记 `claude[bot]`,MCP 记席位账号。
4855

49-
## 不可迁移 —— 只有这几件,围着它们排计划
56+
## 不可迁移 —— 只有这三件,围着它们排计划;红窗守候规则住 `platform-readings.md` 配额段
5057

51-
红窗守候规则住 `platform-readings.md` 配额段。
52-
53-
1. draft 转 ready 翻转:GraphQL-only mutation;出口代理只放钉住的 PR-review GraphQL 集。
54-
判据 = 2026-09-11 实调:REST `PATCH /pulls/{n}``{"draft": false}` 回 200 且什么都没改,读回仍 draft
55-
⇒ 状态码不作数,读回才作数。通道 = MCP `update_pull_request`;断粮:等它恢复或人工点一下。
56-
2. auto-merge 与入队挂载:GraphQL mutation,即 MCP `enable_pr_auto_merge`
57-
走合并队列的仓落地必经它 ⇒ 配额红窗无退路;直合仓有退路 `PUT .../pulls/{n}/merge`
58-
3. 语义搜索:`/search/*` 被出口代理按设计拒绝。退路 = REST 列表端点加本地 grep。
58+
1. 语义搜索:`/search/*` 被出口代理按设计拒绝。退路 = REST 列表端点加本地 grep。
5959
REST 也被会话门关掉的席位 = 一次定向 MCP `search_issues`,⛔ 不宽表扫。
60-
4. Projects field_values:GraphQL-only —— 舰队并不需要它;MCP 服务器端无条件抓它才是漏点。
61-
5. `issue transfer`:issues 端点表无 transfer 路由(核对文档,未实调)⇒ 同为 GraphQL-only。
60+
2. Projects field_values:GraphQL-only —— 舰队并不需要它;MCP 服务器端无条件抓它才是漏点。
61+
3. `issue transfer`:issues 端点表无 transfer 路由(核对文档,未实调)⇒ 同为 GraphQL-only。
6262
拿不到时当轮改走在目的仓重建配方,配方住 `platform-readings.md`
6363

6464
## 第三桶 —— git 零配额等价物

0 commit comments

Comments
 (0)