Repository navigation
ci(test-shard-timings-refresh): push and open the refresh pull request as the fleet App so it runs CI - #13362
Conversation
…t as the fleet App so it runs CI The weekly refresh pushed its branch and opened its pull request with the run's GITHUB_TOKEN, and GitHub starts no workflow for an event that token raised, so every refresh pull request arrived without CI and waited for a human push (objectui#13028 sat from 2026-10-19). The push and the pull request now go out on a fleet App token minted on the runner with actions/create-github-app-token from the organization variable OS_FLEET_APP_ID and secret OS_FLEET_PRIVATE_KEY, narrowed to this repository and to contents / pull-requests / workflows write. The job's own token drops to reads. A credential that is not visible to this repository is a red run that names it; there is no fallback to GITHUB_TOKEN. The pull-request leg mints nothing. Ruling: Sales on objectui#13349, option A. Claude-Session: https://claude.ai/code/session_01Cr2pnminvpXPZAG6sKgzgN Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: Isolated review of the net diff ① Derived judgments
Check-runs on the head: 34 total, all completed: 31 ② Semver levelNo changeset owed, and the declaration matches. The diff touches ③ Boundary flagsa. Maintainer confirmation 1 — secret visibility of Implemented-by: VERDICT: PASS Generated by Claude Code |
维护者速读
席位核对Seat: domain:ui#1 · Clause-②: no · head
|
The contract review on #13362 noted that nothing pinned a manual dispatch to main, so a dispatch on another branch would mint the fleet token and force-push the refresh branch from that branch's tree. The credential, mint and push steps now also require github.ref == refs/heads/main; a dispatch elsewhere regenerates and prints, and pushes nothing. Claude-Session: https://claude.ai/code/session_01Cr2pnminvpXPZAG6sKgzgN Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: Isolated review of the whole net diff ① Derived judgments
Check-runs on the head: 34 total, all completed: 31 ② Semver levelNo changeset owed, and the declaration matches. The diff touches ③ Boundary flagsa. Maintainer confirmation 1 — visibility of Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 · 新 head 更新Seat: domain:ui#1 · Clause-②: no · head 上一条席位记录(6365081599)是对
|
Requested by Sales · project thread
Clause-②: no
Metadata-protocol: none
Part of objectstack-ai/objectstack#25936 (step 2). Step 1, the one-time landing of #13028, is on that pull request.
维护者速读(草稿)
objectstack-fleet[bot])临时铸一个 token:只对 objectui 一个仓、只给 contents / pull-requests / workflows 写权限,job 结束即吊销。job 自己的 token 降为只读。文档ci-cd-pipeline.md同步改写那一节,并在密钥表里登记这对组织级凭据。OS_FLEET_PRIVATE_KEY,这是唯一新增的信任面;PR 跑(含 fork)不铸 token、不读密钥。凭据对本仓不可见时,周一那次 run 会红并写明原因,不会悄悄退回旧 token。回滚就是 revert 这一个提交。OS_FLEET_PRIVATE_KEY与变量OS_FLEET_APP_ID对 objectui 可见,并确认 [finding] The changeset release PR runs no CI at all — every ci.yml run onchangeset-release/mainisaction_required, so the release commit reachesmainunvalidated #5397 对 App token 的否决只管 release PR;两点都同意就批准本 PR。What changed
.github/workflows/test-shard-timings-refresh.yml:Check the fleet App credential is visible to this repository: readsvars.OS_FLEET_APP_ID != ''andsecrets.OS_FLEET_PRIVATE_KEY != ''as booleans (nothing printed) and goes red with a message naming the missing one. It also writes the token's one repository name.Mint the fleet App token, narrowed to this repository:actions/create-github-app-token@v3(the same action and credential pair objectstack'sfleet-write.ymlmints with),repositories= this repository only,permission-contents,permission-pull-requestsandpermission-workflowswrite. The last is there because the weekly force-push moves the branch from last week's base to today'smain, across whatever workflow files landed in between, which GitHub refuses for an App token without it; the workflow writes no workflow file.Open or update the refresh pull requestnow uses that token (gh auth setup-gitfor the push), commits asobjectstack-fleet[bot], and its pull request body says the PR runs its own CI instead of asking for a human push.GITHUB_TOKENdrops fromcontents: write+pull-requests: writetocontents: read(plus the existingactions: read); checkout no longer persists a credential.github.event_name != 'pull_request'guard, so a pull-request run (including a fork's) never reads the App secret.changeset-release/mainisaction_required, so the release commit reachesmainunvalidated #5397 / ci(test-shard-timings-refresh): the weekly refresh opens its PR with the Actions token, so the PR gets no CI and waits for a human push — #13028 has sat since 10-19 with 585 newly measured files while the shards run 1.3–1.8× unbalanced objectstack#25936 reasoning and the two prohibitions (no personal access token, no fallback toGITHUB_TOKEN).content/docs/guide/ci-cd-pipeline.md: the workflow's section, its inventory row, and the secrets table.No changeset:
node scripts/check-changeset-presence.mjssays no released package's source or contract moved.Governing text
changeset-release/mainisaction_required, so the release commit reachesmainunvalidated #5397's rejection read as scoped to the release pull request.Verification
At head
c543446, exit codes captured before any pipe:pnpm exec vitest run scripts/__tests__:: exit 0 (190 files passed, 2 skipped; 5727 tests passed)node scripts/check-action-ref-convention.mjs:: exit 0 (14 distinct refs, 0 off-convention)pnpm run check:control-bytes/check:doc-fences/docs:check-links/check:new-line-citations:: exit 0 eachnode scripts/check-changeset-presence.mjs:: exit 0 (no changeset owed)Not observable before merge, stated plainly: the mint, the push and the pull request open only on
schedule/workflow_dispatchonmain. The first proof is aworkflow_dispatchof this workflow after merge (or the Monday 06:47 UTC run): the refresh PR should show check runs within minutes with no human push. Theworkflows: writeneed on a force-push across workflow-file changes is GitHub's documented App-token behaviour, not measured here.Acceptance notes
17b3796, a full-suite PR run) put the 16 test legs at 6.7 to 11.9 minutes of wall clock, about 1.8x. The card's ≤1.2x reading belongs to the first full battery onmainafter chore(test): refresh the per-file test timings (objectui#12208) #13028 lands; the card session reads it and reports on ci(test-shard-timings-refresh): the weekly refresh opens its PR with the Actions token, so the PR gets no CI and waits for a human push — #13028 has sat since 10-19 with 585 newly measured files while the shards run 1.3–1.8× unbalanced objectstack#25936.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cr2pnminvpXPZAG6sKgzgN