fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303) - #14644

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier
Sep 2, 2026
Merged

fix(pm): the contract-review tier constant names the served tier and is the only place the tier's value lives (#14303)#14644
os-zhuang merged 1 commit into
mainfrom
claude/issue-14303-contract-review-tier

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#14303

Governed surface (scripts/pm/**, .claude/**) — draft-only, human merge; needs:contract-review rides on the PR. Releases nothing: the diff is scripts/pm/** + .claude/skills/**, both inside scripts/check-empty-changeset.mjs's own release-nothing enumeration (.claude/, skills/, a CI-internal script) — hence skip-changeset.

What changed

Exactly the limb triage queued (issue comment 5503739916): the constant is bumped to the served tier, and every other site under .claude/skills/pm-dispatch/** and scripts/pm/** NAMES CONTRACT_REVIEW_TIER instead of spelling the model. The comparison stays exact — no family/prefix floor anywhere (that widening is the human floor's and is explicitly out of scope). SKILL.md:773's promise 「模型升级只改一行一个文件」 is now true: the model id is spelled as a value on one line of one file.

The diff carries the values; by design this body spells no model identifier. The served-tier get_session readings and the --tier output are on the card, in the flight's report comment.

Acceptance test — hit counts, not strings

git grep -n for the model-family pattern of the triage acceptance test over .claude/skills/pm-dispatch scripts/pm .claude/agents skills/objectstack-pm-dispatch:

treeBEFORE (base a5b95ee6)AFTER (head 2a8afbc0)
.claude/skills/pm-dispatch/SKILL.md3 (:361:591:599)0
scripts/pm/dispatch-gates.mjs131 — the constant's definition line
.claude/agents/**00
skills/objectstack-pm-dispatch/** (published twin)00
total161

Whole-repo git grep -c for the same pattern at head: one file, one hit (the same line).

Per-site: site | before | after (line numbers from base a5b95ee6; LITERAL stands for the spelled model id)

sitebeforeafter
scripts/pm/dispatch-gates.mjs:8091 (now :7955)export const CONTRACT_REVIEW_TIER = LITERAL;, declared AFTER the mandate tablevalue bumped to the served tier; definition and docblock hoisted above MANDATORY_TIER_GLOBS — the rows must read an initialised binding, and a const referenced before its declaration throws at import (import probe after the edit: constant and all three rows resolve to the same value). Docblock now states: one value site, exact comparison, no family/prefix floor
:8064:8069:8074 (mandate rows)tier: LITERAL, three timestier: CONTRACT_REVIEW_TIER — one definition, zero literals
:7970:7980 (header comment, clause ① and clause ②)spells LITERALnames CONTRACT_REVIEW_TIER
:15301:15302:15303:15306:15378 (self-test).tier === LITERAL.tier === CONTRACT_REVIEW_TIER
:15319 (self-test)mandLines.includes(LITERAL)mandLines.includes(CONTRACT_REVIEW_TIER)
:15340 (self-test fixture, ambiguity refusal)tier: LITERAL beside a tier: 'opus' rowtier: CONTRACT_REVIEW_TIER beside the same 'opus' row
:15408 (non-empty model id)untouched
.claude/skills/pm-dispatch/SKILL.md:361 (+ :360):361 opened with LITERAL (the urgent-card triage subagent):360 ends 立即起 \CONTRACT_REVIEW_TIER` 档, :361opens分诊子代理,… — one sentence rebalanced across its own two lines (:361` was 119 bytes against the 120-byte cap; no words dropped)
SKILL.md:591 (+ :590)clause ① model: "LITERAL"一律 \CONTRACT_REVIEW_TIER` 档(`--tier` 输出) — names the constant AND the command whose output the seat types (node scripts/pm/dispatch-gates.mjs --tier, spelled in full in the claim-comment template at :546); ① 凡改moved to the tail of:590` for the byte cap, same paragraph
SKILL.md:599clause ② 一律 LITERAL一律 \CONTRACT_REVIEW_TIER` 档, the form references/lanes/director.md:13` already uses

Line-neutral under the ratchet: SKILL.md is 989 lines before and after (ceiling 1005, headroom 16), widest table row 642 bytes (pin 642, unchanged), max-line-bytes scan 0 offenders; touched lines measure 118 / 101 / 110 / 115 / 85 bytes (:360:361:590:591:599). scripts/pm/check-skill-line-ratchet.mjs untouched.

Self-test assertions rewritten, and what each still proves

  • :15301:15302:15303 — each protocol-semantic file derives a mandate whose tier equals the single-source constant: still an exact string equality, still fails on a missing row or a row spelling any other value.
  • :15306 — a mixed surface is mandatory and its tier equals the constant.
  • :15319 — the mandatory rendering contains the constant's VALUE (the claim comment quotes those lines).
  • :15340 — the ambiguity fixture still mandates two DIFFERENT tiers (the constant vs 'opus'), so the refusal it pins is unchanged.
  • :15378 — every frame-sync-enforced copy derives a tier equal to the constant.
  • :15408 — unchanged (non-empty model id).

Nothing weakened: every comparison remains an exact equality against one concrete string; only the string's source moved from a second literal to the constant.

premise_false (skipped, listed, never forced)

  • references/contract-review.md:51, references/platform-readings.md — name the constant, no literal at this base; untouched (comparison text stays "against the constant"; "floor" never written).
  • scripts/pm/ensure-pm-labels.sh:264, scripts/pm/check-governed-queue-guard.mjs:267 — comments naming the constant/pattern, no value; untouched.
  • .claude/agents/os-dev.md — zero hits at this base; untouched.
  • skills/objectstack-pm-dispatch/** — zero hits at this base; follow-up for objectstack-pm-dispatch: none.
  • Frames: the check:skill-frame-sync COPIES anchors in SKILL.md sit at :880:897; all three edited sites are outside every frame and the other three copies carry no model id — the model name is not part of any frame, so the published twin does not have to move.
  • Verbatim maintainer rulings that mention the model family as prose (SKILL.md:586, references/dispatch-runbook.md:17) are quotations, not values, are not matched by the acceptance pattern, and stay verbatim.

Gates — union derived by node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands at the merge-base (22 commands) plus the PM-named extras, run in order at head 2a8afbc0 under scripts/pm/os-verify-lock.sh (slot issue-14303), each exit code captured before any pipe

#commandexitthe gate's own verdict line
01node scripts/check-ci-filter-parity.mjs0 (0s)OK: all 130 declared cross-package glob(s) (92 unique) are covered by core or crosspkg, every crosspkg entry still covers one, and the test jo
02node scripts/check-cross-package-test-inputs.mjs0 (1s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
03node scripts/check-self-test-wired.mjs0 (1s)✓ check-self-test-wired: every one of the 164 script(s) CI runs that ship a --self-test has that self-test run by CI.
04node scripts/check-shard-attestation.mjs0 (0s)✓ check-shard-attestation: 2 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s).
05node scripts/check-test-completeness.mjs3 (0s)NOT MEASURED — its own text: "Nothing was measured: this gate exited before parsing a single summary line"; prerequisite: a saved turbo run test log, which CI's own run supplies
06pnpm --filter @objectstack/lint run check:doc-formula-expressions3 (2s)NOT MEASURED — its own Fix line: pnpm exec turbo run build --filter=@objectstack/formula; prerequisite: a built @objectstack/formula — CI builds the closure and supplies the reading (a local build attempt was cut by the container command cap and is not a reading)
07pnpm check:agent-test-spelling0 (2s)✓ check-agent-test-spelling: 0 violations — 428 file(s) · 5633 bare -- token(s) · 1380 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-bac
08pnpm check:bash32-floor0 (1s)✓ check-bash32-floor: 26 tracked shell file(s) under scripts/, .claude/hooks/, .githooks/** name no bash 4+ construct outside a comment, a guarded
09pnpm check:cli-command-ids0 (7s)✓ check-cli-command-ids: 315 command-id literal(s) across 112 file(s) outside packages/cli all resolve to a real command path (73 ids derived; 3 decla
10pnpm check:cross-package-test-inputs0 (2s)OK: 25 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
11pnpm check:declared-population-live0 (12s)✓ check:declared-population-live — 158 of 202 famil(ies) declare a path population, and every one of them reaches this tree's 7986 tracked file(s).
12pnpm check:doc-authoring0 (6s)✓ doc authoring guard: sibling-package prose ids hold the baseline — 831 pinned site(s) across 231 file(s), 82730 string(s) read in 1124 parsed source
13pnpm check:entry-guard0 (18s)✓ check:entry-guard: 199 scripts/ file(s) — every entry guard goes through invoked-as.mjs; 150 export bindings, 148 of them inert on import (2 known-u
14pnpm check:parse-guard0 (2s)✓ check:parse-guard: 198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs.
15pnpm check:pm-governed-merges0 (3s)✓ check-governed-merges --self-test: 243 assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 la
16pnpm check:pm-governed-prose0 (1s)✓ check-governed-prose: 2 instruction surface(s) name all 5 registered governed surfaces (docs/adr/** · .claude/** · skills/** · AGENTS.md · CLAUDE.md
17pnpm check:pm-skill-id-lint0 (1s)✓ check-skill-id-lint: 23 file(s) clean (pattern /#[0-9]{3,}/g).
18pnpm check:pm-skill-ratchet0 (1s)✓ check-skill-line-ratchet: CLAUDE.md is 86 lines (ceiling 86; headroom 0).
19pnpm check:pnpm-filter-targets0 (2s)✓ check:pnpm-filter-targets: 142/181 --filter occurrence(s) across 32 file(s) resolve against 79 workspace package(s); 39 not judged (2 foreign, 17
20pnpm check:skill-frame-sync0 (1s)✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
21pnpm check:watch-hint-literal0 (3s)✓ check-watch-hint-literal: 45 declaration(s) across 4 rostered name(s) -- ROOT_DIR_WATCH_HINTS 29, ROOT_FILE_WATCH_HINTS 9, ROOT_WATCH_HINTS 2, DECLA
22pnpm check:skill-frame-freshness0 (3s)✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now).
23pnpm check:nul-bytes0 (2s)check-nul-bytes: OK (scanned 7979 text file(s) -- 7979 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
24node scripts/pm/check-governed-queue-guard.mjs --self-test0 (0s)✓ check-governed-queue-guard self-test: 129 cases pass (register-driven verdicts, the queue/PR event split, latest-decisive approval reduction, the 20
25pnpm check:pm-dispatch-gates0 (309s)✓ dispatch-gates self-test: 1240 cases pass.

Lock wrapper's own VERDICT: command-exit 0 · held the lock 380s (6m20s) · waited 0s. check:pm-dispatch-gates streamed 1241 ✓ / 0 ✗ case lines. The line-ratchet gate was also run standalone right after the edit (self-test 111 cases pass; SKILL.md 989 lines, widest row 642).

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3. Prerequisite: a saved turbo run test log; CI's run supplies it. Not a red, nothing to fix locally.
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions — exit 3. Prerequisite: a built @objectstack/formula (pnpm exec turbo run build --filter=@objectstack/formula); CI builds the closure and supplies the reading. Neither gate reads the two files this PR touches.

Session (durable attribution): https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1

🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

…is the only place the tier's value lives
Bump CONTRACT_REVIEW_TIER in scripts/pm/dispatch-gates.mjs to the tier the
platform serves, hoist its definition above the clause-① mandate table so the
three table rows read the constant instead of spelling the literal, and make
the two header comments, the seven self-test assertions and the three prose
sites in .claude/skills/pm-dispatch/SKILL.md name the constant. The comparison
against the served tier stays exact — no family or prefix floor.
SKILL.md stays line-neutral under the skill line ratchet: two sentences are
rebalanced across their own existing lines so every touched line stays under
the 120-byte cap; no words are dropped.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Sep 2, 2026
@os-litantos-litant added skip-changeset PR has no user-facing published change; bypasses the changeset gate needs:contract-review and removed documentation Improvements or additions to documentation labels Sep 2, 2026 — with Claude
@os-zhuang
os-zhuang marked this pull request as ready for review September 2, 2026 16:54
@os-zhuang
os-zhuang merged commit 20b8839 into mainSep 2, 2026
43 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-14303-contract-review-tier branch September 2, 2026 16:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants

@os-litant@os-zhuang@claude