Repository navigation
feat(work-items,autonomy): hold work that adds a charge for the owner - #9201
Conversation
The owner decided (2026-10-22, relayed by GitHub Security & Cost) that work which would add or raise a charge stops for the owner unless a recorded decision already covers it. - intake-triage escalates such an issue to needs-human with a Cost line. - rule-admit refuses rule admission on a charge term in the title or body, with fixture cases that fail before the change. - The admission policy documents the new precedence step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…orded decision Security & Cost: the COST skip trusted any comment starting with the decision marker. The reusable already passes only allow-listed authors' comments to the model; this also excludes [bot] authors, matching the re-entry rule. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security findings in the incremental change ( The diff rewrites only the COST instruction in the triage lane's
I did not review the reusable workflow's handling of |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f0697efb5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-review reviewed No findings. I reviewed only the incremental change to The COST instruction (lines 208-215) used to say "escalate to needs-human". It now says to apply the
|
…ssue A run that sets needs_human posts only the reusable's fixed note, which would drop the Cost line. Apply the needs-human label and keep needs_human false, as the re-entry rule does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e PR moves mid-run (#9223) Closes #9207 ## Summary When the PR head moved while pr-unblock's `fix-docs` ran, its report job posted **failure** on the new head, and the guardrails merge guard refused the merge until someone re-dispatched by hand. Example: on #9201, fix-docs run [39857913086](https://github.com/melodic-software/claude-code-plugins/actions/runs/39857913086) gated `2f0697ef`, the head moved to `6aed779a`, and check 120101945136 posted failure on `6aed779a`. **Root cause.** The fault is in the head the check is posted on, not in `decide.mjs`. The `fix-docs` and `fix-docs-subscription` calls in `.github/workflows/pr-unblock.yml` passed no `head-sha`. The run is a `workflow_dispatch`, so it has no event head either. The read report job's "Choose the head the check is posted on" step (`.github/workflows/pr-run-activity-read.yml`) then trusted only the PR head it read from the API at report time. Any push mid-run made the run's own head look forged, so the step set `forged=true`, which forces `run-result: failure` and posts on the API head. `decide.mjs:107-115` only supplies the message text. The report job log for that run shows: ``` RUN_HEAD: 2f0697e CALLER_HEAD: EVENT_HEAD: API_HEAD: 6aed779 ##[error]the run job's head-sha or pr-number is not the gated PR's; failure is posted on the trusted head 6aed779… report-check-run: posted pr-unblock / fix-docs failure on 6aed779… ``` `fix-ci` is not affected, because both of its calls already pass `fix-ci-context`'s head. ## Fix - A new `fix-docs-head` job in `pr-unblock.yml` reads the PR head over the API. It runs no head code and holds only `pull-requests: read`. Both `fix-docs` calls pass that head as `head-sha`, the same way fix-ci uses `fix-ci-context`. When the head moves mid-run, the run's head matches the gated head, so the check posts the run's real outcome on the head it ran on. The new head gets no stale check. - The report step's trust logic is unchanged: a run head that matches no gated head still posts failure. - Docs: `pr-run-activity.md` and the `head-sha` input description name `fix-docs-head`. Changelog fragment under `.changes/pr-pipeline/`. The fix lives in the caller rather than in `decide.mjs` because the verdict's `head-sha` is the same value the run job can forge. `decide` cannot tell a superseded head from a forged one, and turning that mismatch neutral would also turn real forgery neutral. Posting on the run's own head is the "posts on its own head only" option in the issue's direction. **How this maps to the Done-when items.** - *Superseded verdict.* It posts its real outcome on its own head rather than neutral on the new head. The merge guard reads check runs only on the PR's current head (`plugins/guardrails/hooks/block-unresolved-pr-merge.sh:675`, `:709`) and blocks only on a completed failing conclusion (`:759`), so a check on an older commit, or a missing one, does not block. - *Genuine mismatch.* A foreign run head still posts failure. The new test covers this. - *Tests.* They live in `.github/actions/resolve-config/callers.test.mjs`, beside the other pr-unblock caller-contract tests, and not in `report-check-run/`, because the defect is in the caller and the head step. **Two limits, both unchanged by this PR.** - `fix-docs` runs once per PR by design. `fix-docs-dispatch.mjs:186-189` skips any PR whose earlier commit has a `pr-unblock / fix-docs` check, so the new head does not get its own fix-docs run, before or after this change. - `fix-docs-head` reads the head before `fix-docs` waits in the `pr-pipeline-write-<pr>` queue. If the head moves in that window, the run gates a newer head. The step then treats it as forged and posts failure on the older, gated head, never on the current head, so the merge is not blocked. `fix-ci-context` has the same window. ## Verification - New test `pr-unblock.yml: a read activity whose PR head moved mid-run posts on its own head, never on the new one`. It runs the report job's head step, lifted from the YAML, with each pr-unblock read-call's `head-sha` and an API head that moved. It failed before the fix (`fix-docs passes the head a base job read`: actual `''`) and passes after. A foreign run head still yields `forged=true`. - Updated two existing assertions that pinned the old no-`head-sha` behavior for fix-docs. - `node --test` in `.github/actions/resolve-config` (callers.test.mjs): 97/97 pass. `.github/actions/report-check-run`: 100/100 pass. `check-trusted-trigger`, every `.github/scripts/pr-unblock/*.test.mjs`, and `pr-merge/refire-refused.test.mjs`: 0 failures. - `scripts/read-runner-dispatcher-gate.test.sh` (9/9), `scripts/pr-unblock-trusted-base.test.sh` (20/20), and the morning-brief suites (450 cases plus the view suite): pass. - `actionlint` is clean on both workflows. `zizmor --offline` on `pr-unblock.yml` reports no findings. `runner-policy.mjs --root .` passed. ## Related - #9201, the PR where the failure was observed - Report run [39857913086](https://github.com/melodic-software/claude-code-plugins/actions/runs/39857913086) - `.github/workflows/pr-run-activity-read.yml`, the "Choose the head the check is posted on" step 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
No related issue: owner decision relayed by GitHub Security & Cost on 2026-10-22 (work that adds or raises a charge stops for the owner unless an owner-recorded decision covers it).
Summary
Holds work that would add or raise a charge for the owner, at both admission points: the intake-triage lane and the no-model rule-admission evaluator.
Fix
.github/workflows/intake-triage.yml: a COST instruction escalates such an issue toneeds-humanwith aCost:line (what bills, where, the owner decision it lacks), unless a**Decision recorded.**comment already covers it.plugins/work-items/scripts/rule-admit.sh: a cost-term check refuses rule admission after the trust-surface check. The term list is narrow (cost, billing, billed, spend, pricing, paid, subscription, SKU, quota, retention, larger/hosted/self-hosted runner, macOS minutes) so ordinary work such as "plan" wording still admits.plugins/autonomy/reference/guardrails/admission-policy.md: documents the new precedence step.Verification
bash plugins/work-items/scripts/rule-admit.test.sh: all checks pass; the two new cost cases fail without therule-admit.shchange and pass with it; a control case ("plan step wording") still admits.bash scripts/check-affected.sh --uncommitted: 11 passed, 5 skipped, 0 failed.Related
🤖 Generated with Claude Code