Repository navigation
fix(pm): the relay reads the workflows split before requesting governed review - #31710
Merged
Merged
Conversation
…ed review governedReviewPlan decided from paths alone, so a workflow-only pull the queue guard measures as Tier S still had both approvers requested at pr_ready. The follow-up now reads the queue guard's own measure (readWorkflowDiff, imported) merge base to head when every governed hit is the workflows row in its split.repos, and requests nobody when it says S. No checkout, a missing commit, git throwing, an unread compare, an H reading, a mixed pull or a repository outside split.repos request exactly as before, and the verdict row says which. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTJ27J6P6KVq74iiqQ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTJ27J6P6KVq74iiqQ
Contributor
Author
|
domain:skills#2 · zhuangjianguo · session_01QsR2jT34CXs5fCn3BDirZw 维护者速读
席位核对Head-sha:
|
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 Steedos · project thread
Fixes #31690
维护者速读
.github/workflows/**,会先用合并队列守卫同一套读法(合并基点到 head)判 Tier,判出 S 就不再请你和 hotlong 审。.github/workflows/**landing: split workflow PRs, keep high-risk edits Tier H, move the rest to Tier S #31538 之后 objectstack 的工作流 PR 可以是 Tier S,但中继只看路径,仍然给你发不需要的审阅请求。scripts/pm/fleet-write/execute.mjs里的workflowSplitReadable、workflowReadingFor和requestGovernedReview新加的一段。node scripts/pm/fleet-write/execute.mjs --self-test,看 312 个用例全过,其中 6 个新用例覆盖 S 不请、H 请、读不到请、混合请、objectui 请。What changes
governedReviewPlantakes an optionalworkflowDiffand reads the tier throughapplyWorkflowSplit, imported fromcheck-governed-merges.mjs. Without a reading the answer is byte-identical to the path-only plan.requestGovernedReview(thepr_readyfollow-up) reads the split only whenworkflowSplitReadablesays so: every governed hit is theworkflowsrow and the target is in itssplit.repos.workflowReadingForthen gets the merge base fromGET /repos/{repo}/compare/{base.sha}...{head.sha}, checks that the checkout'soriginis the target (slugFromRemote), fetches the merge base and head by sha at depth 1 when they are missing, and callsreadWorkflowDiffwith base = inventory base = merge base. This is the queue guard'spull_requestleg. The reader is imported, not copied.workflow split read (merge base … → head …): <file> S|H (reason),workflow split UNREAD …: <reason> — fail closed, the path-only tier H stands, orworkflow split not read: <another governed row | repo not in split.repos>.checkoutGit(<repo root>)asdeps.git. Without that seam the run reads as "no checkout" and fails closed.Why
PR #31628 (ruling C on #31538) lets an objectstack workflow PR land as Tier S. The relay's governed-review follow-up still decided from paths alone, so it requested both approvers anyway. That was review flag B2 of contract review 6724981811.
The relay's checkout:
fleet-write.ymlusesactions/checkout@v7with defaults:main, depth 1,persist-credentials: false. The pull's head and merge base are not in it. The run fetches those two commits anonymously (the repository is public) instead of deepening the checkout, so no workflow file is edited and this card's tier does not change.Verification
Head
49babaa0(fix1fd8b980, plus a merge oforigin/main).node scripts/pm/fleet-write/execute.mjs --self-test: 306 → 312 cases, 25 batteries, exit 0. The governed-review battery floor goes from 30 to 36.tier-s-workflow-pull-requests-no-one,h-reading-workflow-pull-requests,unreadable-workflow-pull-requests(covers no checkout, a commit the fetch cannot bring, git throwing, a fetch that throws, a checkout of another repository, and a refused compare),mixed-workflow-pull-requests,objectui-workflow-pull-requests, and the pure plan-with-a-reading case.workflowSplitReadableforced toread: false, the self-test exits 1 and the S, H and unreadable pins go red. The file was restored withgit checkout HEAD --, and its hash matched the HEAD blob.git initcheckout with the compare answered by the real API: ci(glue): narrow the Merge Queue Triage and Scheduled Full Run Card workflow_run triggers by branch #31544 (two workflow files) reads S on both files, with no review requested. ci(lint): run check:liveness in the required source-gates lane on every change #31559 reads H (a newcontinue-on-error). ci(fleet-write): the advisory mint comment names its five write rows and both read rows #31468 reads H (fleet-write.yml, Tier H by path). Each fetch took about 21 s from an empty repository.dispatch-gates --commands, 36 families) all exit 0 at1fd8b980.--ranreconciliation: 36 derived, 36 run, 0 NOT-MEASURED.Clause-②: no
Metadata-protocol: none
skip-changeset:
scripts/pm/**only, no published package moves.Human Minimum
packages/specholds no runtime logic. (untouched)pnpm lintpasses. (CI owns the repo-wide lint)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTJ27J6P6KVq74iiqQ