Skip to content

Commit 9a8bb83

Browse files
fix(pm): a ceiling claim's citation is read inside its model slot; RUNNER's security-fix effort follows the pm-dispatch rule (#35958)
<!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuYMxVr4whKU7SgYTUvvzVkx)_ Part of #35270 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;派发认领里「最贵档」的理由只认写在档位那一格里的,测试清单说明里安全修复的力度改成跟派发规则一致。 - 为什么做:属于车队派发力度整理(替力度规则那张卡收尾两处小尾巴);此前力度格里的理由会被误当成档位理由放行,清单说明还写着一律最高力度。 - 出错会怎样:只影响车队自己的认领检查与说明文字;写错最多误拦或误放一条认领,可直接撤回本次改动。 - 要你做什么:无 ## What changes - `scripts/pm/dispatch-gates.mjs`: `readContainerModelLine` reads the `MANDATORY` / `reason:` citation only inside the `model:` slot, from the `model:` key to the next `effort:` key or to the end of the line. Before, it matched anywhere on the `Container & model:` line, so an `effort: xhigh, reason: ...` citation satisfied the ceiling-tier check by accident (contract-review nit N1, release comment 7027271918). The tier token and every correctly written claim read as before. The jsdoc states the rule. - `scripts/pm/dispatch-gates.self-test.mjs`: three cases. Two negatives: a citation only in the effort slot is refused, for `reason:` and for `MANDATORY`. One positive twin: a citation inside the model slot with commas and parentheses still reads with an effort slot after it. - `docs/qa/platform-checklist/RUNNER.md` line 94: a runner's security fix is no longer dispatched "at `xhigh`". It follows the pm-dispatch security effort rule and names `references/execution-duties.md`: high-severity built at `high` with one read-only `xhigh` diff review, medium-severity at `high`, anything else by difficulty (ruling record 7024443457, decision 一 A). ## Tests - `pnpm check:pm-dispatch-gates` at `366b52cf2` (the same commit before it was moved onto `main` at `e3e202a97` as `f64915ce5`): exit 0, fast tier 2252 cases pass (2249 + 3). - Red on the old code: the three predicates run against the HEAD blob of the old reader answer a=false, b=false, c=true (both negatives red, the twin green); against the new reader, all true. ## Acceptance notes - N5/N6 of the release comment: gone. The ceiling table was re-based to bytes by #35712 and no longer carries those row comments. - Not in this PR: items 1 and 2 of the release comment (measurement runs, the maintainer's word) and nit N4. - Landing tier: Tier H. `scripts/pm/dispatch-gates.mjs` is on the governed register, so this PR waits for the governed approver. - No changeset: `scripts/pm/**` and `docs/qa/**` do not ship in a package (`skip-changeset`). ## Verification - `dispatch-gates --commands` derived 69 commands at `366b52cf2`, the same commit on its earlier base; all ran, all exit 0 after the two exit-3 prerequisite builds (verify lock VERDICT command-exit 0); `--ran`: 68 families accounted for, 0 NOT-MEASURED. `overlap-check`: VERDICT clean exit 0. Read first: the slot cut in `readContainerModelLine` (three added lines), then the three new self-test cases. Two-minute check: `node scripts/pm/dispatch-gates.mjs --self-test --fast` prints the three new case titles as passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgUU7y15SHQsH8q8y74 <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgUU7y15SHQsH8q8y74 --> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8500ee7 commit 9a8bb83

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

‎docs/qa/platform-checklist/RUNNER.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ selector handed you has a verdict; planned ids are listed, not chased.
9191
message, and keeps it nowhere else; a runner with no such channel keeps it in its own
9292
session and reports the hand-off as blocked, without the reproduction. **That
9393
dispatching PM session** decides the fix and dispatches it through `pm-dispatch`: an
94-
in-seat `os-dev` subagent at `xhigh` whose dispatch prompt alone carries the
94+
in-seat `os-dev` subagent at the effort that skill's security rule sets
95+
(`.claude/skills/pm-dispatch/references/execution-duties.md`: a high-severity advisory
96+
fix is built at `high` with one read-only `xhigh` review of the diff, a medium-severity
97+
one at `high`, anything else by difficulty), whose dispatch prompt alone carries the
9598
reproduction, and whose PR, commit and changeset describe a hardening without the
9699
exploit steps. A finding that needs a contract decision first goes to the maintainer
97100
instead. Getting a defect fixed never requires handing anyone a working exploit.

‎scripts/pm/dispatch-gates.mjs‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13385,7 +13385,14 @@ export const CONTAINER_MODEL_KEY_LINE = /^[ \t]*(?:>[ \t]*)?(?:[-*][ \t]+)?(?:\*
1338513385
* … · ceiling …`) names every tier without declaring any. A ceiling token owes
1338613386
* a citation ON THE SAME LINE: the word `MANDATORY` — which `--tier` prints,
1338713387
* and prints only for a mandated surface — or a `reason:` naming the per-card
13388-
* ruling. The default and floor tiers owe nothing here: their exits are
13388+
* ruling. The citation is read inside the `model:` SLOT only — from the
13389+
* `model:` key up to the next `effort:` key, or to the end of the line when
13390+
* no `effort:` follows. The template's effort slot carries its own citations
13391+
* (an `xhigh` quotes its timing reading or standing order, spelled like a
13392+
* `reason:`), and a whole-line match let one of them satisfy the tier check
13393+
* by accident. The `model:` slot's reason may itself hold commas and
13394+
* parentheses, so the slot ends at the next key, never at a comma.
13395+
* The default and floor tiers owe nothing here: their exits are
1338913396
* recorded on the line by the skill's rule, and a reader that demanded them
1339013397
* would refuse every ordinary claim over a formatting preference.
1339113398
*
@@ -13403,14 +13410,18 @@ export function readContainerModelLine(body) {
1340313410
const value = String(m[1] ?? '');
1340413411
const model = /\bmodel[ \t]*:[ \t]*(?:\*\*|`|[ \t])*([A-Za-z0-9][A-Za-z0-9_.-]*)?/i.exec(value);
1340513412
const tier = model?.[1] ?? null;
13413+
// The `model:` slot: from its key to the next `effort:` key, or the line's end.
13414+
const afterModel = model ? value.slice(model.index) : '';
13415+
const effortKey = /\beffort[ \t]*:/i.exec(afterModel);
13416+
const slot = effortKey ? afterModel.slice(0, effortKey.index) : afterModel;
1340613417
const ceiling = tier !== null && ceilingTierSpellings().some((word) => word.toLowerCase() === tier.toLowerCase());
1340713418
return {
1340813419
present: true,
1340913420
line: m[0].trim(),
1341013421
tier,
1341113422
ceiling,
13412-
mandateCited: /\bMANDATORY\b/.test(value),
13413-
reasonCited: /\breason[ \t]*:/i.test(value),
13423+
mandateCited: /\bMANDATORY\b/.test(slot),
13424+
reasonCited: /\breason[ \t]*:/i.test(slot),
1341413425
};
1341513426
}
1341613427

‎scripts/pm/dispatch-gates.self-test.mjs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11005,6 +11005,12 @@ export function selfTest({ tier = 'full' } = {}) {
1100511005
t('the key is read at the START of a line, decoration tolerated — and off the line start it is prose, not a declaration', readContainerModelLine('Claim: x\n- **Container & model:** `M`, `mode:cloud`, `model: opus`').tier === 'opus' && readContainerModelLine(`Claim: x\nas said, Container & model: model: ${TIER_CEILING} earlier`).present === false);
1100611006
t('⛔ ABSENCE is nobody\'s refusal: no `Container & model:` line, or a `model:` slot reading no token, declares no ceiling', readContainerModelLine('Claim: x\nSeat: domain:skills#1').present === false && containerModelRefusal('Claim: x') === null && readContainerModelLine(CM('model:')).tier === null && containerModelRefusal(CM('model:')) === null);
1100711007
t('⛔ NOT a claim reader\'s business what a claim is — the reader reads any body; scoping to `Claim:` comments is post-stamped\'s', readContainerModelLine(`Round report\n\nContainer & model: \`M\`, \`mode:subagent\`, \`model: ${CONTRACT_REVIEW_TIER_NAME}\``).ceiling === true);
11008+
// The citation is read inside the `model:` slot only (up to the next `effort:` key): the
11009+
// effort slot carries citations of its own, spelled like the model slot's, and a whole-line
11010+
// match let them satisfy the tier check by accident.
11011+
t('⛔ a ceiling `model:` slot citing nothing, with a `reason:` only in the `effort:` slot after it, is REFUSED', (() => { const body = CM(`\`model: ${CONTRACT_REVIEW_TIER_NAME}\`, \`effort: xhigh, reason: the timing reading, 41 min\``); const r = readContainerModelLine(body); return r.ceiling && r.reasonCited === false && containerModelRefusal(body)?.key === 'Container & model'; })());
11012+
t('⛔ the same with `MANDATORY` only in the `effort:` slot — the mandate is not cited, and the claim is refused', (() => { const body = CM(`\`model: ${CONTRACT_REVIEW_TIER_NAME}\`, \`effort: xhigh (MANDATORY per the standing order)\``); const r = readContainerModelLine(body); return r.ceiling && r.mandateCited === false && containerModelRefusal(body)?.key === 'Container & model'; })());
11013+
t('⭐ the positive twin: a citation INSIDE the `model:` slot, commas and parentheses included, still reads with an `effort:` slot after it', (() => { const mandate = CM(`\`model: ${CONTRACT_REVIEW_TIER_NAME}\` (\`--tier\` at \`abc1234\`: MANDATORY, SKILL.md), \`effort: high\``); const reason = CM(`\`model: ${CONTRACT_REVIEW_TIER_NAME} (reason: ruled on the card, 2026-11-20)\`, \`effort: xhigh, reason: timing\``); return readContainerModelLine(mandate).mandateCited && containerModelRefusal(mandate) === null && readContainerModelLine(reason).reasonCited && containerModelRefusal(reason) === null; })());
1100811014

1100911015
// Hoisted out of the slow sections that used to declare them: a later section reads each one.
1101011016
const CLI = fileURLToPath(ENGINE_URL);

0 commit comments

Comments
 (0)