diff --git a/docs/qa/platform-checklist/RUNNER.md b/docs/qa/platform-checklist/RUNNER.md index 11e3d1d8ac5..db058d12fcf 100644 --- a/docs/qa/platform-checklist/RUNNER.md +++ b/docs/qa/platform-checklist/RUNNER.md @@ -91,7 +91,10 @@ selector handed you has a verdict; planned ids are listed, not chased. message, and keeps it nowhere else; a runner with no such channel keeps it in its own session and reports the hand-off as blocked, without the reproduction. **That dispatching PM session** decides the fix and dispatches it through `pm-dispatch`: an - in-seat `os-dev` subagent at `xhigh` whose dispatch prompt alone carries the + in-seat `os-dev` subagent at the effort that skill's security rule sets + (`.claude/skills/pm-dispatch/references/execution-duties.md`: a high-severity advisory + fix is built at `high` with one read-only `xhigh` review of the diff, a medium-severity + one at `high`, anything else by difficulty), whose dispatch prompt alone carries the reproduction, and whose PR, commit and changeset describe a hardening without the exploit steps. A finding that needs a contract decision first goes to the maintainer instead. Getting a defect fixed never requires handing anyone a working exploit. diff --git a/scripts/pm/dispatch-gates.mjs b/scripts/pm/dispatch-gates.mjs index 0ad201f4406..7c13f4d4001 100644 --- a/scripts/pm/dispatch-gates.mjs +++ b/scripts/pm/dispatch-gates.mjs @@ -13385,7 +13385,14 @@ export const CONTAINER_MODEL_KEY_LINE = /^[ \t]*(?:>[ \t]*)?(?:[-*][ \t]+)?(?:\* * … · ceiling …`) names every tier without declaring any. A ceiling token owes * a citation ON THE SAME LINE: the word `MANDATORY` — which `--tier` prints, * and prints only for a mandated surface — or a `reason:` naming the per-card - * ruling. The default and floor tiers owe nothing here: their exits are + * ruling. The citation is read inside the `model:` SLOT only — from the + * `model:` key up to the next `effort:` key, or to the end of the line when + * no `effort:` follows. The template's effort slot carries its own citations + * (an `xhigh` quotes its timing reading or standing order, spelled like a + * `reason:`), and a whole-line match let one of them satisfy the tier check + * by accident. The `model:` slot's reason may itself hold commas and + * parentheses, so the slot ends at the next key, never at a comma. + * The default and floor tiers owe nothing here: their exits are * recorded on the line by the skill's rule, and a reader that demanded them * would refuse every ordinary claim over a formatting preference. * @@ -13403,14 +13410,18 @@ export function readContainerModelLine(body) { const value = String(m[1] ?? ''); const model = /\bmodel[ \t]*:[ \t]*(?:\*\*|`|[ \t])*([A-Za-z0-9][A-Za-z0-9_.-]*)?/i.exec(value); const tier = model?.[1] ?? null; + // The `model:` slot: from its key to the next `effort:` key, or the line's end. + const afterModel = model ? value.slice(model.index) : ''; + const effortKey = /\beffort[ \t]*:/i.exec(afterModel); + const slot = effortKey ? afterModel.slice(0, effortKey.index) : afterModel; const ceiling = tier !== null && ceilingTierSpellings().some((word) => word.toLowerCase() === tier.toLowerCase()); return { present: true, line: m[0].trim(), tier, ceiling, - mandateCited: /\bMANDATORY\b/.test(value), - reasonCited: /\breason[ \t]*:/i.test(value), + mandateCited: /\bMANDATORY\b/.test(slot), + reasonCited: /\breason[ \t]*:/i.test(slot), }; } diff --git a/scripts/pm/dispatch-gates.self-test.mjs b/scripts/pm/dispatch-gates.self-test.mjs index 38f5eeb04b9..6f25e740840 100644 --- a/scripts/pm/dispatch-gates.self-test.mjs +++ b/scripts/pm/dispatch-gates.self-test.mjs @@ -11005,6 +11005,12 @@ export function selfTest({ tier = 'full' } = {}) { 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); 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); 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); + // The citation is read inside the `model:` slot only (up to the next `effort:` key): the + // effort slot carries citations of its own, spelled like the model slot's, and a whole-line + // match let them satisfy the tier check by accident. + 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'; })()); + 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'; })()); + 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; })()); // Hoisted out of the slow sections that used to declare them: a later section reads each one. const CLI = fileURLToPath(ENGINE_URL);