Skip to content

fix(work-items): refuse rule admission only for metered or renewing charges - #9877

Merged
kyle-sexton merged 5 commits into
mainfrom
fix/rule-admit-cost-billing-only
Oct 25, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
fix/rule-admit-cost-billing-only

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Closes #9904

Context: applies the owner's 2026-10-24 rule that Claude, model and eval spend holds nothing (fixed monthly credit, no auto-renewal or auto top-up) and only metered or renewing charges hold.

Summary

rule-admit.sh refused any issue whose title or body named cost, costs, spend, spending, pricing, paid, quota or quotas, with no billing context. That refused model and eval work (for example "run claude plugin eval and report the cost"), which adds no charge. The cost hit now fires only on terms that name a metered or renewing charge.

Fix

  • plugins/work-items/scripts/rule-admit.sh: def cost keeps billing, billed, subscription(s), SKU(s), retention, larger/hosted/self-hosted runner(s) and macOS minutes, adds spending limit(s) (an account billing setting), and drops the bare cost, spend, spending, pricing, paid and quota words. The refusal reason text is unchanged ("cost hit in title or body: ...; a charge needs an owner decision").
  • plugins/autonomy/reference/guardrails/admission-policy.md (precedence step 3) states the new list and that model and eval spend is no cost hit.
  • Changelog fragments for work-items and autonomy (patch).

Verification

  • bash plugins/work-items/scripts/rule-admit.test.sh: 51 PASS, 0 FAIL. Two new fixture cases: "Raise the Actions spending limit" refuses as cost hit in title or body: spending limit; an issue titled "Run claude plugin eval on the paid tier and report the cost" with body "Spend the eval quota; pricing is per run." admits by R2. Against origin/main's rule-admit.sh both new cases fail (2 checks failed): the spending-limit case refuses with reason spending, and the eval case refuses with cost hit in title or body: cost, paid, pricing, quota, spend.
  • The other five plugins/work-items/scripts/*.test.sh suites pass; shellcheck on rule-admit.sh and its test is clean.
  • Metric: rule admissions refused for a cost keyword. Baseline, measured on origin/main's script: any issue naming one of the 8 dropped word forms refuses (fixture: 1 of 1 model/eval issue refused). Expected after: model and eval issues with no billing term admit (fixture: 0 of 1 refused); issues naming billing, a spending limit, a subscription, a SKU, retention, a larger/hosted runner or macOS minutes still refuse (fixtures: 3 of 3 refused). The live refusal count across the backlog is not measured here.

Related

  • Intake admission's matching change (dropping the "a paid eval" unrunnable done-when) rides on the Q93 branch feat/intake-size-split.

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 24, 2026 15:58
…harges

The cost list refused any issue naming cost, spend, pricing, paid or
quota, which caught model and eval work whose spend draws on a fixed
monthly credit with no auto-renewal. Keep only billing terms: billing,
billed, spending limit, subscription, SKU, retention, larger, hosted or
self-hosted runners, and macOS minutes. The admission policy states the
same list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T21:19:18.911602Z 70ef2ed PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-security-review: 1 inline finding(s) on 70ef2edf2424cd661de4b13c4bbf8a48c3357f7c; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 9559311bfd4259dcfffba4a8db00198cb415e969: 0 finding(s), 0 as inline comments.

No security findings in the incremental change since afaa9658 (5 files). No trusted-path glob matches any of them.

Admission gate (rule-admit.sh, admission-policy.md, cases.json): the change makes the gate stricter than the previous head. It does not weaken it.

  • Charge terms still always refuse.
  • A spend word is now exempt only inside a claude_spend phrase: the vendor name, up to three closed qualifiers, then the spend word. The exemption is also lost when any other_charge term appears anywhere in the title or body.
  • "paid" is no longer exempt. The previous head exempted any spend word whenever "claude" or "anthropic" appeared with no other-charge term, which was a broader bypass. It is gone.
  • The new fixture cases cover the near-bypass shapes: "Datadog cost of Claude telemetry", "Sentry quota for Claude errors" and "Claude Slack pricing" all refuse.
  • The jq regex has no injection surface: the issue text is only the match input, never part of a pattern or a shell command.

Residual limit, not a finding: both term lists are closed. An issue can still pair an unlisted provider with a Claude-phrased spend word, for example "Add Datadog APM; Claude cost tracking is fine", and that would admit under R2. The policy text and changelog state this limit openly, and it is narrower than the previous head's behaviour. The policy also leaves the "adds or raises a charge" check to a person, not the evaluator.

Instruction-surface check: the admission-policy.md edit narrows the spend-word exemption and matches the script. I did not consult the exception-register README. By consequence, the narrowed rule only refuses more.

Cost: nothing here enables or changes a paid plan or billing setting. The change only decides which issues get admitted. No hold.

manifest fields: not touched.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 9559311bfd4259dcfffba4a8db00198cb415e969: 0 finding(s), 0 as inline comments.

Incremental review of the changes since afaa9658: no findings.

I traced the new claude_spend and $unclaimed logic in plugins/work-items/scripts/rule-admit.sh by hand against every fixture in cases.json that touches spend words. I did not run the test suite, so the test results below are my reading, not a run. Each fixture gives the expected verdict and reason string:

  • "Claude eval cost and quota admit" admits.
  • "spend words not tied to Claude refuse" refuses.
  • The Datadog, Sentry and Slack cases refuse.
  • The Vercel, OpenAI, Azure and GitHub cases refuse.
  • The "paid hosted service" case refuses.

The reason string is built from all spend hits, not only the unclaimed ones, and the fixtures' expected reasons match that.

The policy text and both changelog fragments match the script. They agree on the three-qualifier limit, on "paid" lying outside the exempt phrase, and on both lists being closed.

Closing issue #9904 ("rule admission refuses only non-Claude charges"): met by this change, and the fixtures cover both the admit and the refuse sides.

Residual design edge, not counted: a Claude phrase beside an unlisted provider elsewhere in the text still admits, for example "Claude cost on Datadog". The policy states that both lists are closed, so this follows the stated design.

Spend: the change adds no billed resource, so no hold applies.

Keep cost, spend, spending, pricing, paid and quota refusing, and exempt
them only when the issue is Claude, model or eval work that names no
other provider or metered service. Add always-refusing charge terms
(seat, Codespaces, paid plan, top-up, auto-renew, auto-reload, extra
usage). Owner decision 2026-10-24: spend on the subscription or the
fixed API credit is fine; GitHub, Azure and other charges wait.

Fixtures cover the review's seven charge examples (refuse), eval spend
on Azure or GitHub Actions (refuse), auto-reload on the API key
(refuse), and API key or eval spend (admit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on c7e4efd5b2101e635ec3698b5aafe8cf38a6e60b; the summary is in this lane's pull request comment.

claude-lane: claude-review

The spend-word exemption matched bare "model" or "eval" and a short
provider list, so eval cost on OpenAI or Vercel, or a data model's cost,
admitted by rule. Require Claude or Anthropic by name, and widen the
other-charge list to other model vendors, clouds, hosting and payment
providers and the generic provider, vendor, service and plan, per the
owner decision in #9904.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on afaa9658b0d4ba09125d16110b5925bad6a11ec3; the summary is in this lane's pull request comment.

claude-lane: claude-review

Naming Claude anywhere lifted the refusal for any spend word, so an
unlisted provider's charge (Datadog, Sentry, Slack) beside a Claude
mention admitted by rule. Exempt only spend words claimed by a phrase
such as "Claude eval cost" or "Claude API key spend"; every other
occurrence refuses. The policy and fragments now say the evaluator
holds closed lists (owner decision #9904).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit 1648ba4 Oct 25, 2026
35 checks passed
@kyle-sexton
kyle-sexton deleted the fix/rule-admit-cost-billing-only branch October 25, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

work-items: rule admission refuses only non-Claude charges

1 participant