Repository navigation
feat(pm/fleet-write): three security-advisory relay rows, payload read from the event file - #29222
Conversation
…d from the event file Adds advisory_report, advisory_collaborators_add and advisory_state to the fleet-write relay. Each row travels alone in its stroke and spends a repository-advisories write grant minted for that stroke only; every other stroke's token is unchanged, and there is no fallback to an un-narrowed token. advisory_state reaches draft or closed only, and published is refused by name and reachable by no row. The relay's run log and step summary are public, so no step's env carries client_payload any more: validate.mjs and execute.mjs read the payload from $GITHUB_EVENT_PATH for every op. A refusal names the key and the byte count and never echoes a value, and the executor prints an advisory's id, state and logins only. collaborators and state read the advisory first and send one PATCH or nothing; each lands only when the answer shows the result. A report lands on a 2xx carrying an id, which the row and a notice annotation name and the seat reads back from the run. rest-channel.md names the three ops in one line, and its ratchet row goes from 80 to 81 by the measured delta. Claude-Session: https://claude.ai/code/session_01J8VVAjZFbTRtAnVEd5JnBe Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J Contract-review-claim: session_01J8VVAnMUWA9rufXzFaEh4J · head 56f0533 · 2026-11-02T09:48Z The seat review runs at CONTRACT_REVIEW_TIER in an isolated subagent (the seat session is not at that tier). |
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J Contract reviewServed-tier: Reviewer: an isolated contract reviewer at CONTRACT_REVIEW_TIER, read-only on GitHub, fed the card #29160 body, the seat's claim 6573114495, the dev's os-dev-report 6574033806 (read as input, not as conclusions), the PR body, the net diff against origin/main (merge-base 14208f2; main has since moved to 49aba82 and none of the seven touched files moved with it), the head's check-runs, contract-review.md and review-checklist.md. The card, the PR and this record carry no finding, no mechanism, no advisory id and no title; the only ids anywhere in the diff are self-test fixtures that name no real advisory, and none is repeated here. ① Derived judgmentsAccepted-set and public-surface changes, one by one, against the card's Change §1–6, Out of scope and Acceptance:
② Semver levelNone. No published package, no ③ Boundary flags
④ Design judgmentFor each hits file, against the card's scenario (a seat files a private report through the relay, adds who works it, accepts and closes, reads under its own account, and no advisory text reaches a public surface) and the code it cites:
Must-fix: none. Should-fix: S1 ( Check-runs at record time: 60 check-runs on 56f0533, 59 completed (45 success, 14 skipped, 0 failure), 1 in_progress (Test Core 1/8); Lint · docs & code guards, Lint · ESLint, Lint · repo & tooling gates, Lint · scoped · tooling self-tests, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Type Check · workspace, Type Check · source gates, Type Check · consumer gates, Type Check · debt ledger, Governed Surface Queue Guard, PR-body guards and Check Changeset all success; combined status pending. Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J 维护者速读
席位核对 — ACCEPT · domain:skills#1 · head
|
Resolves the dispatch.mjs conflict with 68ecc79 (the pull request body battery at the seat's door). Both batteries stay: the floor comment records 24 → 25 for the pull request body battery and 25 → 26 for the advisory rows' seat battery, and SELF_TEST_BATTERY_FLOOR is 26. Claude-Session: https://claude.ai/code/session_01J8VVAjZFbTRtAnVEd5JnBe Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J Contract-review-claim: session_01J8VVAnMUWA9rufXzFaEh4J · head bdb323d · 2026-11-02T11:02Z The seat review runs at CONTRACT_REVIEW_TIER in an isolated subagent (the seat session is not at that tier). |
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J Contract reviewServed-tier: Reviewer: an isolated contract reviewer at CONTRACT_REVIEW_TIER, read-only on GitHub, fed cr15's PASS on 56f0533 (comment 6574333921), the seat's ACCEPT 6574358055, the dev's statement of the merge (read as input, not as conclusions), the PR body, the merge commit against both of its parents, the replayed merge, the head's check-runs, contract-review.md and review-checklist.md. This record judges only what moved since 56f0533; cr15's judgments on the seven files stand where the blobs are unchanged. The card, the PR and this record carry no finding, no mechanism, no advisory id and no title; the self-test fixtures name no real advisory and none is repeated here. ① Derived judgmentsThe merge, one claim at a time:
② Semver levelNone, unchanged from cr15. No published package, no ③ Boundary flags
④ Design judgmentOnly dispatch.mjs changed in substance since cr15, and only by taking both sides of one comment and raising the floor by one: the design cr15 judged holds for every file, and #29225's door and this PR's advisory door are disjoint by construction (the one is keyed on Must-fix: none. Should-fix (PR body only, no new head):
Check-runs at record time (2026-11-02T11:09Z): 53 check-runs on bdb323d, 48 completed (38 success, 10 skipped, 0 failure), 5 in_progress (Test Core 1/8, Test UI 11/16, Lint UI, Type Check UI, Type Check · consumer gates); Lint · docs & code guards, Lint · ESLint, Lint · repo & tooling gates, Lint · scoped · tooling self-tests, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Type Check · workspace, Type Check · source gates, Type Check · debt ledger, Governed Surface Queue Guard, PR-body guards, Plan Test Core shards and Test Core 2/8 all success; Check Changeset skipped (label); combined status pending; Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J 维护者速读
席位核对 — ACCEPT · domain:skills#1 · head
|
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J
Requested by Irene · project thread
Fixes #29160
Clause-②: no
Metadata-protocol: none
维护者速读
advisory_report提交报告、advisory_collaborators_add加协作者、advisory_state只能改成 draft 或 closed。published没有任何一行能到达,按名拒收;发布仍由维护者手动完成。repository-advisories: write;⛔ 没有回退到未收窄令牌的路径。client_payload放进env:,两个脚本改从事件文件读载荷。What changes
scripts/pm/fleet-write/ops.mjs. Three new rows, eachalone, each spendingrepository-advisories: write, a grant minted for its stroke only (STROKE_SCOPED_PERMISSIONS):advisory_report: onePOST .../security-advisories/reports. Requiredsummaryanddescription, optionalseverityandcwe_ids.advisory_collaborators_add:ghsa_idandcollaborators.advisory_state:ghsa_idandadvisory_state, an enum ofdraftandclosedonly.publishedis refused by name (ADVISORY_REFUSED_STATES).REFUSED_PATH_FAMILIESrefuses everysecurity-advisoriespath except one advisory's path and the reports endpoint, so no row reaches a draft create, a text edit, a collaborator removal, a CVE request or a temporary fork.quietfield modifier: a refusal names the key and the byte count and never echoes the value.summaryanddescriptionarestrfields, which never echo either..github/workflows/fleet-write.yml. No step'senv:carriesclient_payloadorFLEET_WRITE_PAYLOADany more. The validate step runsvalidate.mjs --from-event --github-output, and the execute step reads the event file itself. The mint gains the scopedpermission-repository-advisoriesinput, with a comment that the action's "Unexpected input(s)" warning is expected and must not be "fixed" by removing the input.scripts/pm/fleet-write/validate.mjs.readEventPayloadreadsclient_payloadfrom$GITHUB_EVENT_PATHfor every op, and its refusals never quote the file. Field kinds, the enums, thequietandnamedrefusals, fixtures and two new batteries (the event file, 6 cases; the advisory rows, 44 cases). Battery floor 15.scripts/pm/fleet-write/execute.mjs. The three paths of the card's Change §4:triageordraft; logins compared case-insensitively; nothing missing sends nothing; otherwise one PATCH of the existing logins plus the missing ones; landed only when the answer lists every login.draftonly fromtriage,closedonly fromtriageordraft; an illegal move sends nothing; landed only when the answer shows the state.ghsa_id; the id goes in the row and in a notice annotation. A 2xx with no id is a failed action that says ⛔ do not re-send.ADVISORY_PLATFORM_MESSAGES).scripts/pm/fleet-write/dispatch.mjs. The seat reads the report's id from the run's annotations (--jsongainsadvisories). A note where the read-back is decided says why byte read-back cannot apply toadvisory_report: the report carries no body the relay can read back. New seat battery (12 cases), floor 26 (25 → 26 after the merge ofmain, which carries fix(pm): let the seat rewrite a pull request body signed on its last line #29225's battery at 25)..claude/skills/pm-dispatch/references/rest-channel.md. One line naming the three ops.scripts/pm/check-skill-line-ratchet.mjs. The rest-channel row goes from 80 to 81, by the measured delta of +1 line, and nothing else in the file changes. The comment beside the row cites the ruling of record: card feat(pm/fleet-write): a relay op that adds named accounts to one repository security advisory, carrying no advisory text (Tier H) #29160's body, which quotes the maintainer verbatim (「可以,按方案改中继,能发这个操作的账号名单我稍后点名。」 and 「你写清楚issue就可以,让车道开发」), and the seat's comment 6572738609, which stated the raise.Why
The fleet has to file a private security report, add the people who work it and move its state without the maintainer's hand, and the relay's run log and step summary are public. The old route put
client_payloadin stepenv:, which GitHub prints into the log, so report text would have reached the log. This change moves the payload to the event file for every op, adds the three rows, and keeps every advisory field but the id, the state and the logins off every public surface.Tests
All three self-tests pass with the new batteries counted:
pnpm check:pm-fleet-write-validate: 268 cases pass across 15 batteries.pnpm check:pm-fleet-write-execute: 232 cases pass across 21 batteries.pnpm check:pm-fleet-write-dispatch: 296 cases pass across 26 batteries (277 across 25 at 56f0533; the merge ofmainbrought in fix(pm): let the seat rewrite a pull request body signed on its last line #29225's pull request body battery, 19 cases).The card's Acceptance list, item by item:
ghsa_idis refused before any request: validator advisory battery, and the executor's validator-gate case (zero requests).writefor these strokes and empty for every other).publishedis refused by name: validator and executor batteries.env:carriesclient_payload: the validator's event-file battery reads the workflow, with a positive control showing the check finds a planted line.summaryanddescription, and in every advisory answer'ssummary,descriptionandvulnerabilities, appears in no log line, row, step summary, annotation or pace log across 32 executor runs, nor in the output of realvalidate.mjsandexecute.mjsprocesses reading an event file that carries it. A positive control shows the generic row printer would print it.Acceptance notes
triagetodraft, and toclosed) made by the App;ops.mjs: 「所有车队账户都能发这个操作」. What it admits: any fleet account with write on the target can add itself to an advisory whose id it holds.Verification
node scripts/pm/dispatch-gates.mjs --commandsderived 62 commands for the 7 paths. All 62 ran with each exit code captured before any pipe, and every one exited 0.--ranreconciled them: 62 derived, 62 run, 0 NOT-MEASURED, 0 UNRUN.pnpm --filter @objectstack/lint run check:doc-formula-expressionsfirst exited 3 because its packages were not built; afterturbo run buildof@objectstack/formulaand@objectstack/lintit exited 0.mainat 14208f2. The branch then mergedmainat 9f120af (merge commit bdb323d). The only conflict was the battery-floor comment indispatch.mjs, resolved by keeping both batteries and settingSELF_TEST_BATTERY_FLOORto 26. The ratchet file auto-merged, andexecute.mjs,validate.mjs,ops.mjs,fleet-write.ymlandrest-channel.mdare blob-identical to 56f0533. At bdb323d the dev and the seat's delta review each re-ran the three self-tests (268/15, 232/21, 296/26), and the review also re-rancheck:pm-skill-ratchetand its--self-test; all exit 0. The 19 commits it brought in touch none of the 7 paths except one non-overlapping row in the ratchet file. At the rebased head the derivation names the same 62 commands, and these 13 were run again, all exit 0:check:pm-skill-ratchet,check:pm-fleet-write-validate,check:pm-fleet-write-execute,check:pm-fleet-write-dispatch,check:pm-skill-id-lint,check:skill-frame-sync,check:nul-bytes,check:workflow-step-name-quoting,check:workflow-status-functions,check:watch-hint-literal,check:scripts-symbol-anchors,check:declared-population-liveandcheck-self-test-wired.mjs.scripts/ablation-replace.mjs, which restores the file and confirms an emptygit diff HEAD:summary(execute.mjs, blob 556168a36234). The marker test and the row-shape case go red: 2 of 232 fail.execute.mjs). The marker test and two refusal cases go red: 3 of 232 fail.validate.mjs, blob 134579ec575b). The marker-in-the-wrong-key case goes red: 1 of 268 fails.env:carryingclient_payload(fleet-write.yml, blob 8e31d25de5d7). Both event-file pins go red: 2 of 268 fail.eslint --no-inline-configover the five changed scripts exits 0. The workspace-widepnpm lintwas not run.scripts/pm, a workflow and a skill reference, none of which publishes, so the PR carriesskip-changeset.Human Minimum
packages/specholds no runtime logic. (Not touched.)main, one pull request.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.pnpm lintwas not run; eslint over the changed files was.)🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAjZFbTRtAnVEd5JnBe
Generated by Claude Code