Skip to content

Commit dd58336

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-22463-sso-domain-verification-unknown-provider
2 parents 527974a + dee7692 commit dd58336

6 files changed

Lines changed: 434 additions & 56 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
- 出口代理按设计只放 repo-scoped 路径(`/repos/{o}/{r}/...`)加 `/rate_limit`;org 级端点未实测。
88
- ✓ 按席位类别限定:每个 ✓ = 会话门开着的席位实调通过,⛔ 无 ✓ 不当已验证事实。
99
- 403 后 `/rate_limit` 判凭据形态:15000/时 = 凭据活被 repo-scoping 拒;60/时或 auth 错 = 无凭据。
10-
- 两只桶:MCP 记链接用户 5000/时,兄弟会话共享同桶;REST/CCR 记 App 安装 15000/时。
1110
- `objectstack-fleet[bot]` 经 `fleet-write` 中继:五个写工具与 `with-fleet.sh --via auto` 共一选择器。
1211
- 三条件全立才 `dispatch`:`CCR_AGENT_PROXY_ENABLED=1`、会话 id、中继活着;否则 `direct`,印一行。
1312
- 会话 id 由容器 `CLAUDE_CODE_REMOTE_SESSION_ID` 派生;`OS_FLEET_SESSION` 只覆盖本地检出与测试。
@@ -49,6 +48,7 @@
4948
- ✓ `origin/main` 合进 PR head:中继 op `pr_update_branch`(`pull` + 40 位 `expected_head_sha`),真合并提交。
5049
- ⛔ 裸 `PUT .../pulls/{n}/update-branch` 落个人账号;短 SHA 派发前即拒;base 未动 422 = op 报 no-op。
5150
- ✓ 落地经中继 `node scripts/pm/fleet-write/dispatch.mjs --repo O/N --actions-file F`;`--via dispatch` 同载。
51+
- ✓ 启动 run 走 op `workflow_dispatch`:解锁物是白名单 run 才启;入表只经 workflow 自己的 PR。
5252
- ⛔ 裸 `PATCH /pulls/{n}` 带 `{"draft": false}` 回 200 零改;状态码不作数,`GET /pulls/{n}` 才作数。
5353
- 线程自己建:`POST .../pulls/{n}/comments` 带 `commit_id`·`path`·`line`,回读看 `review_threads`。
5454
- ✓ `POST .../ccr/comments/{id}/resolve` · `/unresolve`;`{id}` 是评审评论 id,⛔ 只在自己 PR 上探。

‎.github/workflows/fleet-write.yml‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
# alone, that transfer's one target too: `transferIssue` needs issues write on
2121
# both ends) and to the permissions the op table declares (`issues: write`,
2222
# `pull-requests: write`, the `contents: write` GitHub's auto-merge mutations
23-
# require, and the `metadata: read` the sender gate's permission read needs)
23+
# require, and the `metadata: read` the sender gate's permission read needs;
24+
# plus, for a `workflow_dispatch` stroke ALONE, the `actions: write` the
25+
# dispatch endpoint needs — minted from the validator's per-stroke output, so
26+
# every other run's token is exactly the four grants above)
2427
# — and revoked by that action's post step. The workflow's own `GITHUB_TOKEN` gets nothing
2528
# (`permissions: {}` below); the job grants it `contents: read` for the
2629
# checkout and nothing else, so the run's ONLY write path is the App token,
@@ -84,7 +87,9 @@ jobs:
8487
# non-integer number, an over-cap string or an over-cap payload with
8588
# every reason in the step summary and zero writes; on success it hands
8689
# the mint below the repository NAMES its token must reach through
87-
# `$GITHUB_OUTPUT` — one for every stroke, two for a transfer stroke.
90+
# `$GITHUB_OUTPUT` — one for every stroke, two for a transfer stroke —
91+
# and `permission_actions`: `write` for a stroke carrying the one
92+
# `workflow_dispatch` action, EMPTY for every other stroke.
8893
- name: Validate the payload (closed schema, zero writes on refusal)
8994
id: validate
9095
env:
@@ -119,6 +124,15 @@ jobs:
119124
# or branch write — so this grant is spent only by those two mutations.
120125
permission-contents: write
121126
permission-metadata: read
127+
# ONE consumer: the `workflow_dispatch` row — `POST .../actions/workflows/{file}/dispatches`
128+
# on an allowlisted file at `main`. Minted ONLY for a stroke carrying that op: the validator
129+
# writes `permission_actions=write` for such a stroke and an EMPTY value for every other,
130+
# and `actions/create-github-app-token` skips an empty `permission-*` input (its
131+
# `lib/get-permissions-from-inputs.js`: an empty value leaves the set unchanged, measured
132+
# at the v3 tag), so every other run keeps exactly the four grants above. `actions: write`
133+
# also reaches cancel, re-run, delete, cache and artifact endpoints; the op table has no
134+
# row for any of them, and `validate.mjs --self-test` pins that none is reachable.
135+
permission-actions: ${{ steps.validate.outputs.permission_actions }}
122136

123137
# The sender gate, then the actions in order, then the step summary —
124138
# request id · sender and role · session · target · one row per request.

0 commit comments

Comments
 (0)