Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/qa/platform-checklist/RUNNER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 14 additions & 3 deletions scripts/pm/dispatch-gates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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),
};
}

Expand Down
6 changes: 6 additions & 0 deletions scripts/pm/dispatch-gates.self-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading