Repository navigation
ci(shard-timings-refresh): push and open the refresh PR as the fleet App so it runs CI - #26017
Merged
Merged
Conversation
…App so it runs CI The weekly refresh pushed its branch and opened its PR with the run's own GITHUB_TOKEN (no RELEASE_PUSH_TOKEN is configured), and GitHub starts no workflow for an event that token raised: #24467 waited ten days, #25960 got CI only after a relay pr_update_branch. The write step now runs on a fleet App token minted on the runner from OS_FLEET_APP_ID / OS_FLEET_PRIVATE_KEY (the pair fleet-write.yml mints with, and the route ui/'s refresh took in objectui#13362), narrowed to this repository and to contents + pull-requests. The job's own token drops to contents/actions read, the checkout persists no credential, a missing credential is a named red, and a pull_request run still mints nothing and stays a dry run. The PR body's "no checks will start" paragraph is replaced by a line saying the PR runs its own CI. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GRKsjPHqpppQDE1LMetJX
os-zhuang
approved these changes
Oct 26, 2026
os-zhuang
marked this pull request as ready for review
October 26, 2026 09:16
Contributor
Author
席位核对Verdict: ACCEPT at head Checklist
What the diff does (read line by line)
⚠ For the governed approver: credential scope
ui/ half, deliberately not built here
Gates
Generated by Claude Code |
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 Elon · project thread
Part of #25936. The card stays open for two readings this PR cannot take before it merges (see "What stays open").
维护者速读(草稿)
改了什么:每周一自动刷新 Test Core 分片计时数据的 workflow(
shard-timings-refresh.yml),推分支、开 PR、打标签这三步改用 fleet App(objectstack-fleet[bot])的身份做。令牌在 runner 上现铸,只对本仓、只给 contents 和 pull-requests 两项写权限,用完即吊销。job 自己的GITHUB_TOKEN降为只读。为什么改:以前用 Actions 自带的
GITHUB_TOKEN开 PR(仓里没有配RELEASE_PUSH_TOKEN),GitHub 对这种 PR 不启动任何 CI。结果每次刷新 PR 都要有人手动推一下才有检查:#24467 等了十天,今天的 #25960 是席位用中继pr_update_branch才跑起来的。刷新会改变分片切法,恰恰最需要 CI 读一遍。风险与代价(含回滚):用的是 fleet-write 已在用的那对组织级凭据(
OS_FLEET_APP_ID/OS_FLEET_PRIVATE_KEY),不引入 PAT。凭据不可见时这一步直接报红并点名缺哪一半,不会悄悄退回无 CI 的老路。PR 上跑这个 workflow 时照旧是演练,不铸令牌、不读密钥。回滚就是 revert 这一个文件。ui/ 的逐文件计时数据集这次没接上(见下文),它由 #25712 第 5 项承接。席位意见:
你要做的:本 PR 是 Tier H(
.github/workflows/**),需要一位 GOVERNED_APPROVERS 批准;批准后席位落地。What changed
.github/workflows/shard-timings-refresh.ymlonly (+78 / −24):pull_requestand when the dataset is byte-identical:Check the fleet App credential is visible to this repositoryreadsvars.OS_FLEET_APP_IDandsecrets.OS_FLEET_PRIVATE_KEYas booleans (never printed) and reds with a message naming the missing half.Mint the fleet App token, narrowed to this repository:actions/create-github-app-token@v3, the same action and credential pairfleet-write.ymlmints with, and the route ui/'s refresh took in ci(test-shard-timings-refresh): push and open the refresh pull request as the fleet App so it runs CI objectui#13362. The grants arecontents: write(push the bot branch) andpull-requests: write(open the PR, addskip-changeset). It has noworkflowsgrant, because the branch is cut from the checked-outmainplus one commit touching only the dataset.GH_TOKENis the minted token on a live run and the run's read-only token on apull_requestdry run, whereoutwardhands it to nothing. A live run with no minted token arrives empty and the existingGH_TOKEN:?guard reds it.outward gh auth setup-gitpoints git at that token for the push. The commit author is nowobjectstack-fleet[bot].contents: write+pull-requests: write+actions: readtocontents: read+actions: read. The checkout usespersist-credentials: falseand no longer readsRELEASE_PUSH_TOKEN.USED_PATswitch are gone. It is replaced by one line saying the PR was opened as the fleet App and runs its own CI (the card's step 3).The measurement this rests on
github-actions[bot], and its body carries theUSED_PAT != truesection, soRELEASE_PUSH_TOKENis not configured. It got CI only after a relaypr_update_branch. chore(ci): refresh the Test Core shard-timings dataset #24467 (2026-10-19) sat ten days the same way.ui/.github/workflows/test-shard-timings-refresh.ymlis nested, so GitHub never runs it. Rootci.yml'sTest UI (N/16)passes no timings reporter and uploads notest-file-timings-Nartifact, and its own comment says so: the port belongs to the governance-workflow audit. That audit is tooling(ui-merge): governance in-repo — liveness evidence and spec tests stop citing objectui by commit, one sdui-parser, AGENTS.md / pm scripts dropobjectui#,ui/AGENTS.mdnests, 18 governance workflows merged or retired (parent #25677, 4b/6) #25712 item 5, which namestest-shard-timings-refreshamong the workflows to fold into the objectstack counterpart and widen toui/**. tooling(ui-merge): governance in-repo — liveness evidence and spec tests stop citing objectui by commit, one sdui-parser, AGENTS.md / pm scripts dropobjectui#,ui/AGENTS.mdnests, 18 governance workflows merged or retired (parent #25677, 4b/6) #25712 is in flight under another seat's claim, so this PR does not build that half. The dataset today:ui/scripts/test-shard-timings.jsonwas measured 2026-10-19T06:37Z over 6 runs and holds 5,547 keys. Of the 5,805 tracked*.test.*files underui/(excludinge2e/andapps/site/), 290 have no key and are weighed at the median, and 32 keys name files that no longer exist. That count is fromgit ls-filesand is an upper bound on what vitest collects.Verification
Head
cadda147(50d4fffdplus a merge oforigin/maina3e5bfa6, no conflict; this PR's diff againstmainis the one file).run:block was lifted out of the YAML and run underbash -ein a scratch repository:DRY_RUN=true,pull_request, stand-inGH_TOKEN): exit 0. Every outward act printedDRY RUN, not executed:, includinggh auth setup-git. The local commit was authoredobjectstack-fleet[bot], email332303061+objectstack-fleet[bot]@users.noreply.github.com.GH_TOKEN(a run where minting did not happen): exit 1 at the guard,GH_TOKEN: is not set; gh would run unauthenticated. Nothing was pushed.repository=objectstack. App id missing: exit 1. Key missing: exit 1.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 42 families. All 42 ran locally with exit 0, includingselect-shard-timings-run.mjs --self-test(it lifts and runs this workflow's selection step),measure-test-shard-timings.mjs --self-test,partition-test-shards.mjs --self-test,check-step-collectors,check-whole-set-label-write,check-workflow-step-name-quotingandcheck:pm-dispatch-gates(fast tier, 1917 cases).--ranreconciled: 42 run, 0 NOT MEASURED.pull_requestrun of the lane (the path filter includes the workflow) executes everything up to and including the write step's local commit, with the newenv:. That is the on-runner proof of the dry leg; read it on the PR's checks.check-governed-merges --branch HEAD: GOVERNED,.github/workflows/**, Tier H, 102 changed lines.What stays open on the card
workflow_dispatchofshard-timings-refresh.ymlatmain.objectui#,ui/AGENTS.mdnests, 18 governance workflows merged or retired (parent #25677, 4b/6) #25712 item 5 carries it (fold the ui refresh into this lane). 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 #25936 remains open until the seat records how that lands.Acceptance notes
cut-rc.ymlmakes the same "PAT if present, Actions token otherwise" choice for the release-candidate PR. It is out of scope for this card and is noted only, not filed.skip-changeset).🤖 Generated with Claude Code
https://claude.ai/code/session_014GRKsjPHqpppQDE1LMetJX