Skip to content

Commit ec622b0

Browse files
committed
docs(pm): record the probed CCR review-thread, convert-to-draft and auto-merge readings, and the two rate-limit buckets
Five rows land, each paid by deleting content in the same file so the 82-line ceiling is untouched: + the two rate-limit buckets (MCP on the linked user, REST/CCR on the App installation) -- paid by folding the no-tick prohibition into the tick convention row, whose "not a global fact" clause restated its own first half + GET ccr/review_threads and its response shape (no thread id) -- paid by folding the quota-read row into the check-runs/actions row + the review-comment prerequisite and the resolve/unresolve pair -- paid by folding the update-branch rationale tail and the two expected_head_sha rows, dropping the pinned error prose nobody parses + the two auto_merge refusals (PUT on a draft, DELETE with nothing armed) -- paid by folding the read-back rule into the bare-PATCH row, whose timeline half restated the read-side timeline row Claude-Session: https://claude.ai/code/session_01HZfg2AwVX191qCizp88gQr Co-authored-by: Claude <noreply@anthropic.com>
1 parent 418f3d2 commit ec622b0

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
## 通道边界
66

77
- 出口代理按设计只放 repo-scoped 路径(`/repos/{o}/{r}/...`)加 `/rate_limit`;org 级端点未实测。
8-
- ✓ 按席位类别限定,不是全局事实:每个 ✓ = 在一个会话门开着的席位实调通过。
8+
- ✓ 按席位类别限定:每个 ✓ = 会话门开着的席位实调通过,⛔ 无 ✓ 不当已验证事实。
99
- 会话门关着的席位本表两侧整表不可达:repo-scoped 读写全 403、`gh` 缺席,而 MCP 与 git 正常。
1010
- ⇒ 先跑一条 repo-scoped 探针再选通道。
1111
- 403 后 `/rate_limit` 判凭据形态:15000/时 = 凭据活被 repo-scoping 拒;60/时或 auth 错 = 无凭据。
12+
- 两只桶:MCP 记链接用户 5000/时,兄弟会话共享同桶;REST/CCR 记 App 安装 15000/时。
1213
- 限流拒绝绑定被拒身份(报文 user ID):同身份各写通道一并耗尽,⛔ 换通道续写与重试同罪。
1314
- 他侧只在身份不同时是退路:凭据 `GET /user` ≠ 被拒 user ID 才换;席内 PM 与 dev 同一身份。
14-
- ⛔ 未带 ✓ 的形状不当已验证事实复述。
1515

1616
## 读侧 —— 全部可迁移
1717

@@ -26,10 +26,10 @@
2626
- ✓ 整条评论线 `GET .../issues/{n}/comments?per_page=100`。
2727
- ✓ Timeline 事件 `GET .../issues/{n}/timeline`:cross-ref、`added_to_merge_queue`、ready_for_review。
2828
- ✓ PR diff `GET .../pulls/{n}` 带 Accept `application/vnd.github.diff`;文件清单 `.../pulls/{n}/files`。
29+
- ✓ 线程 `GET .../pulls/{n}/ccr/review_threads` 回 `{resolved,outdated,path,line,comment_ids}`,无线程 id。
2930
- ✓ 取某 ref 上的文件 `GET .../contents/{path}?ref=...`,raw accept。
3031
- ✓ 祖先与对比 `GET .../compare/{base}...{head}` —— 浅检出上本地祖先判据不可信时的正解。
31-
- ✓ 门禁与 workflow `GET .../commits/{sha}/check-runs` · `GET .../actions/runs`。
32-
- ✓ 配额自读 `GET /rate_limit`,端点自身零计费。
32+
- ✓ `GET .../commits/{sha}/check-runs` 门禁、`GET .../actions/runs` workflow、`GET /rate_limit` 配额零计费。
3333

3434
## 写侧 —— 全部可迁移
3535

@@ -41,14 +41,14 @@
4141
- 请求体走文件(`-d @file`)或引号定界 heredoc(`<<'EOF'`),⛔ 永不内联双引号串。
4242
- 双引号内 shell 先展开反引号、`$(...)`、`$VAR`,请求尚未成形;只标题坏而正文完好即此形。
4343
- ✓ 请求复审 `POST .../pulls/{n}/requested_reviewers` · 开 PR `POST .../pulls` 带 `draft=true`。
44-
- ✓ 把 `origin/main` 合进 PR head:`PUT .../pulls/{n}/update-branch`,PM 席位可用。
45-
- 它是零文件写的合 main 手段,产出真合并提交、不重写历史。
46-
- `expected_head_sha` 必须是完整 40 字符 SHA,短 SHA 回 422。
47-
- base 未动回 422 no new commits on the base branch = 无事可做,不是失败。
44+
- ✓ `origin/main` 合进 PR head:`PUT .../pulls/{n}/update-branch`,PM 席位、零文件写、真合并提交。
45+
- `expected_head_sha` 须完整 40 字符 SHA(短 SHA 回 422);base 未动回 422 = 无事可做,不是失败。
4846
- ✓ draft 转 ready `POST .../pulls/{n}/ccr/ready_for_review`,反向 `.../ccr/convert_to_draft`。
49-
- ⛔ 裸 `PATCH /pulls/{n}` 带 `{"draft": false}` 回 200 且什么都没改,读回仍 draft。
50-
- ⇒ 状态码不作数,读回才作数:`GET /pulls/{n}` 的 `draft: false`、timeline 的 `ready_for_review`。
47+
- ⛔ 裸 `PATCH /pulls/{n}` 带 `{"draft": false}` 回 200 零改;状态码不作数,`GET /pulls/{n}` 才作数。
48+
- 线程自己建:`POST .../pulls/{n}/comments` 带 `commit_id`·`path`·`line`,回读看 `review_threads`。
49+
- ✓ `POST .../ccr/comments/{id}/resolve` · `/unresolve`;`{id}` 是评审评论 id,⛔ 只在自己 PR 上探。
5150
- ✓ auto-merge 挂载 `PUT .../pulls/{n}/ccr/auto_merge` 带 `{"merge_method":"SQUASH"}`,`DELETE` 卸载。
51+
- ⛔ `PUT .../ccr/auto_merge` 在 draft 上 422 零存储;`DELETE` 无挂载回 422 = 本就没挂,非失败。
5252
- 入队读 timeline `added_to_merge_queue`,落地读 `git rev-list --parents`;⛔ `auto_merge` 与回显都不作数。
5353
- 备用通道 MCP `update_pull_request` 与 `enable_pr_auto_merge`。
5454
- 直合仓 `PUT .../pulls/{n}/merge`;actor 记通道令牌:REST 按会话为 `claude[bot]` 或用户,MCP 恒用户。

0 commit comments

Comments
 (0)