Skip to content

Commit ddcb706

Browse files
fix(pr-pipeline): refuse charge words and post-verdict body edits, and defer on a fail-open capacity read (#10410)
Refs: #9254 ## Summary Opened by the work-resolve-issue lane. The run's own summary: > Intake admission (admit.mjs) now refuses an issue whose title or body names a charge, using the same charge-word pattern rule-admit.sh uses. Both read it from one file, plugins/work-items/scripts/charge-words.json, and the refusal parks the issue at status: needs-decision. Admission also refuses an issue whose body was edited after the triage lane comment its verdict came from (parked at status: confirmed). It defers, and the hourly sweep admits nothing, when check-wip-cap reports admission_basis fail-open. This builds findings 1 and 2 as the recorded decision scoped them. The trust-surface word list and the spend branch are left out on purpose. ## Remaining work - File findings 3 to 7 of #9254 as one follow-up issue that refs #9254 and carries their text (drafted in the run scratchpad as followup-issue-9254.md); this lane cannot write to the tracker ## Not verified - Did not run the Node suites (.github/scripts/intake-triage, .github/scripts/work-unblock: `node --test`) or plugins/work-items/scripts/rule-admit.test.sh. This lane runs only the named wrappers, and check-affected skips anything that runs checked-tree code. They are left to the PR's CI test lanes. - Follow-up issue for findings 3 to 7 not filed: this lane has no tracker write. Its text, which refs #9254, is drafted in the run's scratchpad as followup-issue-9254.md for a person or a later job to file. - The test selector (scripts/plan-test-lanes.sh) starts a .github/scripts Node package only for changes under its own directory. A later change to charge-words.json alone would run rule-admit.test.sh but not the intake-triage suite. Cross-package imports already behave this way, so this PR leaves it a - Side effect, as the decision intends: an issue whose own title or body uses a charge word (for example #9254's body, which says 'SKU' and 'larger runners') now parks at status: needs-decision when admission runs again. ## Fix - plugins/work-items/scripts/charge-words.json: new file, the one charge-word definition (the `cost` regex moved out of rule-admit.sh unchanged) - plugins/work-items/scripts/rule-admit.sh: reads `cost` from charge-words.json beside it and passes it to jq as $cost (`def cost: $cost;`); exits 8 when the file is unreadable or has no pattern; header exit codes updated - plugins/work-items/scripts/rule-admit.test.sh: a copy of the script with no charge-words.json exits 8 and prints no row; a copy whose charge-words.json holds another pattern refuses on that pattern, which shows the script reads the file - .github/scripts/intake-triage/admit.mjs: chargePattern() reads charge-words.json once and chargeHits() matches it; decide() refuses with hold on a charge word in the title or body, and refuses (no hold) when spec.lastEditedAt is after verdict.writtenAt or writtenAt does not parse; admit() defers on - .github/scripts/intake-triage/apply-verdict.mjs: passes the lane comment's updated_at to admission as verdict.writtenAt - .github/scripts/work-unblock/label-unblocked.mjs: admissionGate gives no room when admission_basis is fail-open and logs the reason, so the hourly sweep does not admit a deferred issue on the same failed read - .github/scripts/intake-triage/admit.test.mjs: tests for the charge-word refusal (body and title, hold, one entry per word), a body with no charge word still admitted, the pattern matching charge-words.json, the edited-after refusal (decide and admit), bodies never edited or edited before or at the v - .github/scripts/intake-triage/apply-verdict.test.mjs: asserts admission receives writtenAt equal to the lane comment's updated_at - .github/scripts/work-unblock/label-unblocked.test.mjs: a failed queued read (fail-open) defers a newly unblocked issue with or without pause-from and names why; corrected the comment on the incomplete-search test - .changes/work-items/fix-9254-admission-charge-words-5c1e9a07.md: patch fragment for the work-items change ## Verification The runner ran each check from the base copy against af63834: - scripts/check-changelog-fragments.sh --check: passed The run reports: - /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: all 5 changelog fragments under .changes/ are valid - /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: 11 passed, 6 skipped over 10 changed files (an earlier run failed shell-portability on a `\b` inside the JSON written by rule-admit.test.sh; changed the test pattern to a plain word and the rerun passed) - cant-fail-scan --file --check on admit.test.mjs, apply-verdict.test.mjs, label-unblocked.test.mjs and rule-admit.test.sh: no gating findings (a report-only source-text-read finding on an earlier admit.test.mjs draft that read rule-admit.sh as text was removed by moving that proof into rule-admit.tes - Fresh-context review subagent over the whole diff: no correctness bugs found; it checked jq quoting and exit behavior, the regex in jq and JS, the relative path, existing fixtures for charge words or late edits, and the new tests' expected values - The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40441501384 Left out: the items under Not verified. ## Related #9254 --------- Co-authored-by: melodic-automation-lanes[bot] <337595936+melodic-automation-lanes[bot]@users.noreply.github.com>
1 parent 998bed9 commit ddcb706

10 files changed

Lines changed: 184 additions & 26 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
bump: patch
3+
---
4+
5+
### Changed
6+
7+
- `rule-admit.sh` reads its charge words from `scripts/charge-words.json`, the one definition
8+
intake admission reads too, and exits 8 when that file is unreadable.

‎.github/scripts/intake-triage/admit.mjs‎

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
// Criteria 1, 5 and 6 (exact intent, no very-high security risk, no charge)
77
// are already in `status: ready`: apply-verdict withholds it on any flag
88
// (triage flags security only for a very-high risk) or a hold label, and the
9-
// cost rule adds needs-human. Criterion 4 (no protected path named) applies
10-
// only to the paths the issue lane cannot push (unpushablePaths). This checks
11-
// the rest:
9+
// cost rule adds needs-human; criterion 6 is checked here too, on the charge
10+
// words rule-admit.sh refuses (chargePattern), whatever the verdict flagged.
11+
// Criterion 4 (no protected path named) applies only to the paths the issue
12+
// lane cannot push (unpushablePaths). This checks the rest:
1213
//
1314
// - 2: the Issue Type is in `types`, or in `types-under-parent` under an open
1415
// parent issue a listed human filed that awaits no decision; a type in
@@ -40,14 +41,16 @@
4041
// - a `recurring` item's schedule row, read from the default branch's
4142
// .github/recurring-schedule.json, does not set
4243
// requires_operator_confirmation (operatorConfirmation);
44+
// - the body was not edited after the lane comment the verdict came from;
4345
// - lane-runnable done-when: no task-list item asks for what an unattended
4446
// lane run cannot do (unrunnableCriteria below): a run on a named host or
4547
// OS, a paid eval, a run repeated N times, a measurement over time, or a
4648
// page on a host outside resolve-issue's web-access domains. The refusal
4749
// recommends splitting those items into a needs-human child issue, which
4850
// refine.mjs files when some items are left for the lane;
49-
// - 10: check-wip-cap's status: over the queued cap, or with the lane paused
50-
// over the WIP or held cap (from wip.pause-from), the issue gets
51+
// - 10: check-wip-cap's status: over the queued cap, with a queued count it
52+
// could not read (fail-open), or with the lane paused over the WIP or held
53+
// cap (from wip.pause-from), the issue gets
5154
// `admission-deferred`, which work-unblock's hourly sweep admits once there
5255
// is room. With room, an issue still waits behind an older open issue in
5356
// `admission-deferred`, so admission takes the oldest first (owner Q95).
@@ -362,6 +365,23 @@ export function issuePushRefusals() {
362365
return pushRefusalNames;
363366
}
364367

368+
let chargeWords;
369+
// The charge-word pattern rule-admit.sh matches too, read once from its one
370+
// definition in the default branch's checkout beside this script.
371+
export function chargePattern() {
372+
if (chargeWords === undefined) {
373+
const { cost } = JSON.parse(readFileSync(new URL("../../../plugins/work-items/scripts/charge-words.json", import.meta.url), "utf8"));
374+
if (typeof cost !== "string" || cost === "") {
375+
throw new Error("plugins/work-items/scripts/charge-words.json: `cost` must be a pattern");
376+
}
377+
chargeWords = new RegExp(cost, "gi");
378+
}
379+
return chargeWords;
380+
}
381+
382+
// The charge words `text` holds by `pattern`, lowercased, each once. Pure.
383+
export const chargeHits = (text, pattern) => [...new Set([...String(text ?? "").matchAll(pattern)].map((m) => m[0].toLowerCase()))];
384+
365385
// A repository path a criterion names: a backticked span or a word, less a
366386
// trailing `:12` or `:3-9` and punctuation. Only a relative path with a `/`,
367387
// or a root CODEOWNERS or .gitmodules, counts: a bare file name or an
@@ -457,12 +477,16 @@ export function admissionSettled(labels, events, isMark) {
457477

458478
// {verdict: admit | refuse | wait | skip, reasons}, plus `hold: true` on a
459479
// refusal that parks at needs-decision: an untrusted author or provenance or
460-
// a person-held label (the owner's 2026-10-26 rule keeps a person out of
461-
// every other refusal), or done-when items a lane run cannot perform, which
462-
// refine splits only from needs-decision (refine.mjs splitOf). Pure but for
463-
// `pushRefusals`, read from patch-rules.json when not given; a file that does
464-
// not read throws out of decide, so no issue is admitted on a guess.
465-
export function decide({ issue, verdict, rules, parent, blockers, trustedCloses, pulls = [], subIssues = [], events, spec, schedule, humans, appId, repository, webHosts, pushRefusals = issuePushRefusals() }) {
480+
// a person-held label or a charge word (the owner's 2026-10-26 rule keeps a
481+
// person out of every other refusal), or done-when items a lane run cannot
482+
// perform, which refine splits only from needs-decision (refine.mjs splitOf).
483+
// `verdict.writtenAt` is when the lane comment the verdict came from was last
484+
// written; a body edited after it refuses, since the verdict judged an older
485+
// body. The sweep reads no lane comment and passes none. Pure but for
486+
// `pushRefusals` and `charges`, read from patch-rules.json and
487+
// charge-words.json when not given; a file that does not read throws out of
488+
// decide, so no issue is admitted on a guess.
489+
export function decide({ issue, verdict, rules, parent, blockers, trustedCloses, pulls = [], subIssues = [], events, spec, schedule, humans, appId, repository, webHosts, pushRefusals = issuePushRefusals(), charges = chargePattern() }) {
466490
const labels = names(issue.labels);
467491
if (!labels.includes(READY)) {
468492
return { verdict: "skip", reasons: [`no ${READY}`] };
@@ -539,6 +563,20 @@ export function decide({ issue, verdict, rules, parent, blockers, trustedCloses,
539563
if (unpushable.length > 0) {
540564
refuse.push(`a criterion names ${unpushable.join(", ")}, which the issue lane cannot push (patch-protected-path); a builder session takes it`);
541565
}
566+
// A metered or renewing charge needs the owner's decision, whatever the
567+
// verdict flagged.
568+
const charged = chargeHits(`${issue.title ?? ""}\n${issue.body ?? ""}`, charges);
569+
if (charged.length > 0) {
570+
refuse.push(`its title or body names a charge (${charged.join(", ")}), which needs an owner decision`);
571+
hold = true;
572+
}
573+
if (verdict.writtenAt !== undefined) {
574+
const judged = Date.parse(verdict.writtenAt);
575+
const edited = spec?.lastEditedAt == null ? null : Date.parse(spec.lastEditedAt);
576+
if (!Number.isFinite(judged) || (edited !== null && !(edited <= judged))) {
577+
refuse.push("its body was edited after the triage verdict, which judged the body as it stood before");
578+
}
579+
}
542580
for (const label of rules["refuse-labels"]) {
543581
if (labels.includes(label)) {
544582
refuse.push(`it carries ${label}`);
@@ -1158,13 +1196,18 @@ export async function admit({ github, repository, number, verdict, rules, humans
11581196
return { outcome: "waiting", reasons: decision.reasons };
11591197
}
11601198
const s = await status();
1161-
const full = s.paused || !s.admission_open || (s.admission_room ?? 1) <= 0;
1199+
// A queued count check-wip-cap could not read (fail-open) admits nothing,
1200+
// as an incomplete search answer admits nothing.
1201+
const unread = s.admission_basis === "fail-open";
1202+
const full = s.paused || unread || !s.admission_open || (s.admission_room ?? 1) <= 0;
11621203
if (full || (await deferredAhead(github, repository, issue))) {
11631204
const why = !full
11641205
? `an older ${DEFERRED} issue is ahead of it`
11651206
: s.paused
11661207
? `the lane is paused (${s.pause_reason})`
1167-
: `admissions are closed (${s.admission_reason})`;
1208+
: unread
1209+
? "the issue lane's queued count could not be read (admission_basis fail-open)"
1210+
: `admissions are closed (${s.admission_reason})`;
11681211
await github("POST", `${base}/labels`, { labels: [DEFERRED] });
11691212
log(`admit: #${number} deferred: ${why}`);
11701213
return { outcome: "deferred", reasons: [why] };

‎.github/scripts/intake-triage/admit.test.mjs‎

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { renderSplitRecord, SIZE_SPLIT_MARKER, splitChildBody, splitChildHeader
44
import { fileURLToPath } from "node:url";
55
import { readFileSync } from "node:fs";
66

7-
import { ADMIT_MARKER, AGENT_READY, DEFERRED, PATCH_ROW, admissionFacts, admit, decide, loadRules, noteUnrunnable, openPullsNaming, readSchedule, refusalText, unrunnableCriteria, untrustedHold } from "./admit.mjs";
7+
import { ADMIT_MARKER, AGENT_READY, DEFERRED, PATCH_ROW, admissionFacts, admit, chargeHits, chargePattern, decide, loadRules, noteUnrunnable, openPullsNaming, readSchedule, refusalText, unrunnableCriteria, untrustedHold } from "./admit.mjs";
88
import { REFINE_MARKER, render, sizeSplitPending, validateOutput } from "./refine.mjs";
99
import { VERDICT_MARKER } from "./apply-verdict.mjs";
1010
import { TARGETS } from "../apply-patch/apply-patch.mjs";
@@ -437,6 +437,64 @@ describe("decide", () => {
437437
});
438438
});
439439

440+
// rule-admit.sh's fixed checks: its charge words, read from one definition,
441+
// and its body-edited-after-the-verdict refusal.
442+
describe("a charge word in the title or body", () => {
443+
const CHARGE = /names a charge \(([^)]+)\), which needs an owner decision/;
444+
445+
test("refuses and holds for a person, naming each word once", () => {
446+
for (const [issue, words] of [
447+
[issueOf({ body: `${BODY}\n\nMove the job to larger runners and a paid Azure SKU. Larger runners are faster.` }), "larger runners, sku"],
448+
[issueOf({ title: "chore: raise the Actions spending limit" }), "spending limit"],
449+
]) {
450+
const result = decide(facts({ issue }));
451+
assert.equal(result.verdict, "refuse");
452+
assert.equal(result.hold, true);
453+
assert.equal(CHARGE.exec(result.reasons.join("; "))?.[1], words);
454+
}
455+
});
456+
457+
test("an issue that names no charge is still admitted", () => {
458+
assert.deepEqual(decide(facts({ issue: issueOf({ body: `${BODY}\n\nThe sweep deletes runs older than a week.` }) })), { verdict: "admit", reasons: [] });
459+
});
460+
461+
// rule-admit.test.sh shows the script reads the same file.
462+
test("reads the pattern from the one definition rule-admit.sh reads", () => {
463+
const shared = JSON.parse(readFileSync(new URL("../../../plugins/work-items/scripts/charge-words.json", import.meta.url), "utf8"));
464+
assert.equal(chargePattern().source, new RegExp(shared.cost).source);
465+
assert.deepEqual(chargeHits("Turn on auto-renewal for the Codespaces plan.", chargePattern()), ["auto-renewal", "codespaces"]);
466+
});
467+
});
468+
469+
describe("a body edited after the triage verdict", () => {
470+
const at = (writtenAt) => ({ ...VERDICT, writtenAt });
471+
const editedAt = (lastEditedAt) => ({ ...humanSpec(issueOf()), editor: USER(HUMAN), lastEditedAt });
472+
const EDITED = "its body was edited after the triage verdict, which judged the body as it stood before";
473+
474+
test("refuses at status: confirmed, as no person must answer it", () => {
475+
const result = decide(facts({ verdict: at("2026-10-22T12:05:00Z"), spec: editedAt("2026-10-22T12:06:00Z") }));
476+
assert.deepEqual(result, { verdict: "refuse", reasons: [EDITED] });
477+
});
478+
479+
test("a body never edited, or edited before the verdict, is still admitted", () => {
480+
for (const spec of [humanSpec(issueOf()), editedAt("2026-10-22T12:04:59Z"), editedAt("2026-10-22T12:05:00Z")]) {
481+
assert.deepEqual(decide(facts({ verdict: at("2026-10-22T12:05:00Z"), spec })), { verdict: "admit", reasons: [] });
482+
}
483+
});
484+
485+
test("a verdict time that does not parse refuses; the sweep, which passes none, is not judged on it", () => {
486+
assert.deepEqual(decide(facts({ verdict: at("soon"), spec: humanSpec(issueOf()) })).reasons, [EDITED]);
487+
assert.equal(decide(facts({ spec: editedAt("2026-10-22T12:06:00Z") })).verdict, "admit");
488+
});
489+
490+
test("admit() reads the edit time and parks the issue at status: confirmed", async () => {
491+
const fake = fakeGitHub({ spec: editedAt("2026-10-22T12:06:00Z") });
492+
const result = await admit({ ...goArgs(fake), verdict: at("2026-10-22T12:05:00Z"), status: async () => assert.fail("a refusal reads no status") });
493+
assert.deepEqual(result, { outcome: "refused", reasons: [EDITED], status: CONFIRMED });
494+
assert.ok(!writes(fake.calls).some((line) => line.includes(AGENT_READY)), "no agent-ready label");
495+
});
496+
});
497+
440498
test("skips an issue already agent-ready, or without status: ready", () => {
441499
assert.equal(
442500
decide(
@@ -730,6 +788,8 @@ describe("admit", () => {
730788
admission_reason: "search-incomplete",
731789
},
732790
],
791+
// On a failed queued read check-wip-cap leaves admissions open, room null.
792+
["check-wip-cap could not read the queued count", { ...open, admission_room: null, admission_basis: "fail-open" }],
733793
];
734794
for (const [name, status] of full) {
735795
test(`defers, never agent-ready, when ${name}`, async () => {

‎.github/scripts/intake-triage/apply-verdict.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ export async function run({ env, github, dimensionsConfig, fieldSetters, admitIs
484484
let admission = waits ? { outcome: EDGE_MISSING, reasons: [`blocked-by edge ${missedEdges(edges.missed).join("; ")}`] } : null;
485485
if (plan.ready && admitIssue && !waits) {
486486
try {
487-
admission = await admitIssue({ ...verdict, dimensions: plan.dimensions });
487+
admission = await admitIssue({ ...verdict, dimensions: plan.dimensions, writtenAt: comment.updated_at });
488488
} catch (error) {
489489
admission = { outcome: "error", reasons: [String(error?.message ?? error)] };
490490
}

‎.github/scripts/intake-triage/apply-verdict.test.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,8 @@ describe("run", () => {
10011001
}),
10021002
);
10031003
assert.equal(seen.length, 1);
1004+
// Admission refuses a body edited after the lane comment it read.
1005+
assert.equal(seen[0].writtenAt, laneComment().updated_at);
10041006
});
10051007

10061008
test("an admission error still rewords the comment and reports the verdict", async () => {

‎.github/scripts/work-unblock/label-unblocked.mjs‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ const closedElsewhere = (args) => (blocker) => {
465465
// The admission pace for one run: `take()` answers whether one more issue may
466466
// get agent-ready now, reading the issue lane's status the first time it is
467467
// asked and counting each admission against its room. A lane paused over its
468-
// WIP or held cap admits nothing, as intake's admission does.
468+
// WIP or held cap, or a queued count that could not be read (fail-open),
469+
// admits nothing, as intake's admission does.
469470
function admissionGate(status) {
470471
let room;
471472
let reason;
@@ -477,13 +478,16 @@ function admissionGate(status) {
477478
? `the issue lane is paused (${pause})`
478479
: reason === "search-incomplete"
479480
? "GitHub search answered incomplete results"
480-
: "queued work is at the queued cap",
481+
: reason === "fail-open"
482+
? "the issue lane's queued count could not be read"
483+
: "queued work is at the queued cap",
481484
take: async () => {
482485
if (room === undefined) {
483486
const s = await status();
484487
pause = s.paused ? s.pause_reason : null;
485-
room = pause ? 0 : (s.admission_room ?? Number.POSITIVE_INFINITY);
486-
reason = s.admission_reason;
488+
const unread = s.admission_basis === "fail-open";
489+
room = pause || unread ? 0 : (s.admission_room ?? Number.POSITIVE_INFINITY);
490+
reason = unread ? "fail-open" : s.admission_reason;
487491
if (!s.admission_open) {
488492
console.log(`::notice title=admission paused::${escapeCommand(admissionLine(s))}`);
489493
}

‎.github/scripts/work-unblock/label-unblocked.test.mjs‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,15 @@ function world({
176176
const items = queuedIssues.map((number) => ({ number }));
177177
return { total_count: items.length, incomplete_results: false, items: items.slice((page - 1) * 100, page * 100) };
178178
}
179-
if (q === `repo:${REPO} is:pr is:open author:app/melodic-automation-lanes`) {
179+
// The lanes App is whichever LANES_BOT_LOGIN names, so any App author.
180+
if (new RegExp(`^repo:${REPO} is:pr is:open author:app/[\\w-]+$`).test(q)) {
180181
if (openLanePrs === null) {
181182
throw new Error(`${method} ${path} failed with status 403`);
182183
}
183184
const open = Array.from({ length: openLanePrs }, () => ({ labels: [], body: "", created_at: STAMP }));
184185
return { total_count: openLanePrs, incomplete_results: false, items: open.slice((page - 1) * 100, page * 100) };
185186
}
186-
assert.match(q, /^repo:\S+ is:pr (is:merged )?author:app\/melodic-automation-lanes (merged|created):>=\S+$/);
187+
assert.match(q, /^repo:\S+ is:pr (is:merged )?author:app\/[\w-]+ (merged|created):>=\S+$/);
187188
if (q.includes("is:merged") && mergedLanePrs === null) {
188189
throw new Error(`${method} ${path} failed with status 403`);
189190
}
@@ -2935,7 +2936,7 @@ test("under the queued cap, or before pause-from, a newly unblocked issue is lab
29352936
});
29362937

29372938
// A degraded search answers a false empty (total_count 0, incomplete_results
2938-
// true): past pause-from that admits nothing, where a failed read fails open.
2939+
// true): that admits nothing, with or without pause-from.
29392940
test("an incomplete search answer defers a newly unblocked issue, with or without pause-from, and names why", async (t) => {
29402941
const log = t.mock.method(console, "log", () => {});
29412942
for (const config of [PAUSING, {}]) {
@@ -2948,6 +2949,19 @@ test("an incomplete search answer defers a newly unblocked issue, with or withou
29482949
assert.ok(!lines.some((line) => line.includes("at the queued cap")), lines.join("\n"));
29492950
});
29502951

2952+
// A queued count check-wip-cap could not read (admission_basis fail-open)
2953+
// admits nothing either, as intake's admission defers on it.
2954+
test("a queued count that could not be read defers a newly unblocked issue, with or without pause-from, and names why", async (t) => {
2955+
const log = t.mock.method(console, "log", () => {});
2956+
for (const config of [PAUSING, {}]) {
2957+
const { github, calls } = world({ ...oneDependentWorld(), openLanePrs: null });
2958+
assert.equal(await main({ env: envFor({}, config), github }), 0);
2959+
assert.deepEqual(writes(calls), [deferredLabel(20)], JSON.stringify(config));
2960+
}
2961+
const lines = log.mock.calls.map((call) => String(call.arguments[0]));
2962+
assert.ok(lines.includes("label-unblocked: #20 admission deferred: the issue lane's queued count could not be read"), lines.join("\n"));
2963+
});
2964+
29512965
test("at the queued cap the deferral names the queued cap", async (t) => {
29522966
const log = t.mock.method(console, "log", () => {});
29532967
const { github } = world({ ...oneDependentWorld(), queuedIssues: queuedN(24) });
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"description": "The charge-word definition: words in an issue's title or body that name a metered or renewing charge, which admission refuses until the owner decides it. rule-admit.sh reads it, and so does intake admission in the marketplace repository (.github/scripts/intake-triage/admit.mjs). A regular expression valid in both jq (Oniguruma) and JavaScript, matched case-insensitively.",
3+
"cost": "\\b(billing|billed|spending[- ]limits?|subscriptions?|skus?|retention|(larger|hosted|self-hosted)[- ]runners?|macos minutes|seats?|codespaces|paid (plans?|seats?)|top[- ]?ups?|auto[- ]?(renew(al|ed|ing)?s?|reload)|extra usage)\\b"
4+
}

0 commit comments

Comments
 (0)