Repository navigation
Commit 828204e
pm-dispatch: contract-review states the session-evidence limit; the record templates carry the SQL push-down check (#34029)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9FE2ETZnEBiEUWZaRytnhdF)_
Fixes #33716
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:契约复核细则写明「本会话转录作达档证据」的限制:卡线程或席内复核的会话只要起过别的
agent、给别的线程发过消息或调过技能,`verify-review-tier.mjs` 就拒收,改在子代理里重跑;复核简报和记录模板的 ③
加上 SQL 下推检查(SQL 能下推处新增 id 物化或应用内 join 而无理由即记发现),模板还写明无复核面的 PR
由席位自读、发现记在席位的 ACCEPT 评论里。
- **为什么改**:规则文字落后于工具:校验器早已这样拒收,而 SQL 下推检查只写进了规则,只拿简报干活的复核子代理看不到。
- **风险与回滚**:只改内部规则文字和模板打印文字,不碰产品代码;`contract-review.md` 仍是 63/63
行,上限没抬;回滚即 revert 本 PR。
- **先看**:`contract-review.md` 第 36–38
行;`scripts/pm/record-recognisers.mjs` 的 `PUSH_DOWN_CHECK` 常量与
`--template` 的 ③ 图例。
- **两分钟验证**:`node scripts/pm/record-recognisers.mjs --brief-template |
grep -A2 '③ Boundary'`,预期 ③ 下面多出两行 SQL push-down 检查;`--self-test` 403
例全绿。
- **需要你做的**:无,席位落地(Tier S,等达档复核 PASS)。
## What changes
1. **`.claude/skills/pm-dispatch/references/contract-review.md`**, the
`Served-tier:` evidence bullet (lines 35–38). The session route now
carries the limit `verify-review-tier.mjs` enforces: a card thread or an
in-seat review passes its own session transcript only when that session
started no other agent, sent no message and called no Skill; otherwise
the review re-runs in a sub-agent and passes that sub-agent's output
file. The refusal sentence now says where to re-run (拒即子代理重跑). Paid in
place: 63 → 63 lines, no ceiling moved.
2. **`scripts/pm/record-recognisers.mjs`**, template and brief regions
only:
- `PUSH_DOWN_CHECK`: the ③ SQL push-down check in one wording, the
English PR #33693 gave its ③ line (a new id materialisation or in-app
join where SQL could push down is a finding unless a reason is given),
pointing at AGENTS.md Prime Directive 5.
- `--brief-template`: the ③ line gains the check, on every face, the
declaration face included (the rule says 恒查, so it is face-neutral).
- `--template` legend: a new ③ entry (dev flags and `open_questions`
answered or escalated, plus the push-down check), and the carrier on a
PR no face touches: no record is owed there, so the seat's self-read
runs the same check and the finding goes in `FACELESS_FINDING_CARRIER`,
the seat's ACCEPT comment on the PR.
- Self-test: three new pins, battery floors raised template 30 → 32 and
brief 23 → 24.
## Tests
- `node scripts/pm/record-recognisers.mjs --self-test`: exit 0, 403
cases across the declared batteries.
- New pins: the ③ legend carries `PUSH_DOWN_CHECK` between the ③ and ④
entries on every face (bare, schema, rules, narrowing, declaration); the
legend names the faceless-PR carrier; every face's brief carries the
check inside the copyable region.
- Mutation legs on fd9a7fa through `scripts/ablation-replace.mjs`, each
restored to the HEAD blob with `git diff HEAD` empty:
- brief lines deleted: exit 1, the brief pin red;
- legend lines deleted: exit 1, the legend pin red;
- carrier sentence rewritten: exit 1, the carrier pin red.
- No forced test edits.
## Acceptance notes
- **What the verifier refuses, measured on bc6b7ff**
(`handsWorkToAnotherAgent`): true for `Agent`, `Task`, `Workflow`,
`SendMessage`, `Skill`, and connector tools such as `message_thread`,
`message_coordinator`, `send_message`, `start_remote_control`,
`create_trigger`; false for `post_message`, `update_progress_checklist`,
`Read`, `Bash`. So a card thread that has told its seat its branch, or
loaded a skill, already fails the session route; in practice its
evidence is a review sub-agent's output file. The bullet says this in
place of the old unconditional "card thread or in-seat review gives this
session".
- **Line payment.** Lines 36–38 are re-flowed inside the same three
lines (no line bought): `贴:` moves up one line, "(调用显式传该档 model)"
becomes "(显式传该档 model)" and "给其输出文件" becomes "给输出文件" (same meaning).
Byte lengths 118/118/119/118, all within 120.
- **Faceless-PR carrier lives in the `--template` legend only.** The ③
line in `contract-review.md` sits at exactly 120 bytes, so naming the
carrier there costs a line paid by a cut elsewhere; and the brief is
written only for a reviewer, which a faceless PR never has. Raised in
the report as an open question.
- **Concurrency.** The diff stays in the template, brief and self-test
regions of `record-recognisers.mjs` (two constants defined just above
`contractReviewTemplateLines`, two battery-roster rows, two batteries);
the mailbox `readMailboxComment` region is untouched.
- No issue numbers in the operative skill text (`check:pm-skill-id-lint`
green).
## Verification
- Governed tier: `check-governed-merges --branch HEAD` → Tier S
(`.claude/**` ×1; `scripts/pm/record-recognisers.mjs` not on the
register); 51 changed lines, under 3000. Stays draft until a
`CONTRACT_REVIEW_TIER` PASS record names the head.
- `dispatch-gates --tier`: no path-derived mandate.
<details><summary>Derived gates on fd9a7fa: 38 derived, 38 run, all
exit 0</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`, each exit captured before any pipe; `--ran`
reconciliation: "38 derived famil(ies) accounted for — 38 run, 0
NOT-MEASURED (a DERIVED zero)". Before the gates: `turbo run build
--filter=@objectstack/formula... --filter=@objectstack/lint...` under
the verify lock, VERDICT command-exit 0, for
`check:doc-formula-expressions`.
```text
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs --self-test :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
node scripts/pm/check-harness-current.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-record-recognisers :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:pm-skill-ratchet :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:ratchet-remedy-authority :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:scripts-symbol-anchors :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:watch-hint-literal :: exit 0
```
</details>
- Every family CI runs beyond the derived list: read off this PR's
check-runs.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmSZHK7Um3TifRRbuLE)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent ee90935 commit 828204e
2 files changed
Lines changed: 46 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1976 | 1976 | | |
1977 | 1977 | | |
1978 | 1978 | | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
1979 | 2006 | | |
1980 | 2007 | | |
1981 | 2008 | | |
| |||
2034 | 2061 | | |
2035 | 2062 | | |
2036 | 2063 | | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2037 | 2069 | | |
2038 | 2070 | | |
2039 | 2071 | | |
| |||
2257 | 2289 | | |
2258 | 2290 | | |
2259 | 2291 | | |
| 2292 | + | |
2260 | 2293 | | |
2261 | 2294 | | |
2262 | 2295 | | |
| |||
2425 | 2458 | | |
2426 | 2459 | | |
2427 | 2460 | | |
2428 | | - | |
| 2461 | + | |
| 2462 | + | |
2429 | 2463 | | |
2430 | 2464 | | |
2431 | 2465 | | |
2432 | 2466 | | |
2433 | | - | |
| 2467 | + | |
| 2468 | + | |
2434 | 2469 | | |
2435 | 2470 | | |
2436 | 2471 | | |
| |||
3259 | 3294 | | |
3260 | 3295 | | |
3261 | 3296 | | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
3262 | 3302 | | |
3263 | 3303 | | |
3264 | 3304 | | |
| |||
3302 | 3342 | | |
3303 | 3343 | | |
3304 | 3344 | | |
| 3345 | + | |
3305 | 3346 | | |
3306 | 3347 | | |
3307 | 3348 | | |
| |||
0 commit comments