Skip to content

docs(skills): four automation, query and ui evals spell their own must_contain literals - #33632

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-1e54m4
Nov 15, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-1e54m4

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #33588

domain:skills#1 · os-project-manager · session_01FEkQ5pDNPLKWseNj7nKqBo

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:四个技能 eval 的参考答案(expected_output)改为写出它们自己 must_contain 要求的字面拼写:automation 第 20 例写成 type: 'subflow',automation 集成第 2 例把两个字段写成 { dialect: 'cel', source: … } 信封,query 第 2 例用小写 keyset,ui 分析第 1 例写出 dataset。断言、提示、编号一字未动。
  • 为什么改:这四例的参考答案用散文描述了这些写法,拿自己的评分器去判会失败,所以分不出对的回答和错的回答。四个字面拼写都是 main 上技能正文与 spec 教的写法,错的是参考答案。
  • 风险与回滚:只动 eval 夹具(测量、不计入棘轮)与一个 changeset,不动 SKILL.md、规则文件、schema 或运行时;回滚即还原本 PR。
  • 先看:skills/objectstack-automation/evals/integrations-declared.json 第 17 行(唯一一处多于一个词的改动),其余三处各一个词。
  • 两分钟验证:git diff origin/main -- skills/,预期只见四行 expected_output,每行把散文换成带引号的字面拼写。
  • 需要你做的:受管面 Tier H(skills/**):请批准或合并。

What changes

Four expected_output strings, one per file. No must_contain / must_not_contain entry, prompt or id changes.

  • objectstack-automation/evals/flows-triggers-approvals.json eval 20: "A subflow node" becomes "A type: 'subflow' node".
  • objectstack-automation/evals/integrations-declared.json eval 2: "fields read from the node's answer via CEL (bal.body.available[0].amount / 100.0, isoDatetime(now()))" becomes "... as CEL envelopes ({ dialect: 'cel', source: 'bal.body.available[0].amount / 100.0' }, { dialect: 'cel', source: 'isoDatetime(now())' })".
  • objectstack-query/evals/filters-pagination-search.json eval 2: "Keyset paging:" becomes "Use keyset paging:".
  • objectstack-ui/evals/analytics-inline-vs-dataset.json eval 1: "each widget binds it and selects" becomes "each widget names it in dataset and selects".
  • .changeset/33588-skills-evals-own-literals.md: '@objectstack/skills': patch (the evals ship in the package's dist/skills), with both declaration lines.

Why

Per literal, which side is wrong against main 6e28797 (order ruling: say which). In every case the literal is right and the expected_output is wrong: it named the construct in prose, so the reference answer failed its own grader.

Eval Literal Taught on main at Wrong side
automation flows 20 type: 'subflow' node table row skills/objectstack-automation/SKILL.md:76; node type enum packages/spec/src/automation/flow.zod.ts:69; written so in examples/app-showcase/src/automation/flows/index.ts:775 expected_output
automation integrations 2 dialect: 'cel' the same Stripe recipe, skills/objectstack-automation/references/integration-recipes.md:52-53; the envelope rule, SKILL.md:241 expected_output
query 2 keyset skills/objectstack-query/SKILL.md:247 ("For keyset paging (infinite scroll, ...)"), rules/pagination.md:50-54 expected_output (capitalised "Keyset" only)
ui analytics 1 dataset skills/objectstack-ui/rules/dashboards.md:53 (dataset: 'crm_sales' on the widget); packages/spec/src/ui/dashboard.zod.ts:268 (dataset is required on a widget) expected_output (said only defineDataset)

The query literal is a case-only miss: a case-insensitive grader would have passed the old text. The grader is not in this repository, so the reference answer now matches the literal as written either way.

No must_not_contain literal of these four evals appears in the new text (checked by the script below; integrations-declared eval 2 forbids token:, type: 'http', registerConnector( and Authorization: 'Bearer).

Acceptance notes

  • Shape check over every skills/*/evals/*.json (each eval: must_contain literals missing from expected_output, must_not_contain literals present in it), before on origin/main 6e28797, after on this head:

    Bundle evals misses before misses after must_not_contain hits
    objectstack-automation 25 2 0 0
    objectstack-query 7 1 0 0
    objectstack-ui 29 1 0 1 (see below)
    objectstack-data 37 3 3 0
    objectstack-ai, -api, -formula, -i18n, -platform, -upgrade 59 0 0 0
    objectui 34 17 17 0
  • objectstack-data's three are not touched here: they are PR docs(skills): objectstack-data evals 11, 12 and 14 spell their own must_contain literals #33586 (card skills(objectstack-data): evals 11, 12 and 14 of objects-fields-relationships.json list must_contain literals their expected_output lacks #33404), still open at this head; once it merges the data bundle reads 0.

  • objectui's 17 are that bundle's prose-summary convention (its own ui check:skill-eval-tokens checks tokens against the skill text, not against expected_output), out of the card's scope.

  • New, not in the card: objectstack-ui/evals/views-apps-actions-pages.json eval 2 contains its own must_not_contain literal requiresObject: 'sys_approval_request', in the sentence "(never requiresObject: 'sys_approval_request': that object read answers 404 ...)". A reference answer that warns against the wrong key in the key's own spelling fails its own grader the same way. That file is outside this card's surface and is the target of queued card skills(objectstack-ui, query, automation): stop teaching assigned_to / assignee as the record owner beside owner_id (follow-up of #33506) #33560, so it is reported to the seat, not fixed here. The fix shape has precedent (a reference answer reworded so it names the forbidden form without its literal spelling; packages/skills/CHANGELOG.md line 1017).

  • Shape check as a gate (option, not added). A check that every must_contain literal appears in its own expected_output, and no must_not_contain literal does, over skills/objectstack-*/evals would have stopped this drift and is about 15 lines over the existing JSON. Per the order it is the maintainer's call and is not added here.

Verification

Head 6881273, base origin/main 6e28797.

Shape check before and after

One-off script (scratchpad, not committed) over every skills/*/evals/*.json.

Line and token budget (skills/**)
  • objectstack-automation/evals/flows-triggers-approvals.json: 410 to 410 lines, 24213 to 24221 bytes, 6054 to 6056 tokens.
  • objectstack-automation/evals/integrations-declared.json: 35 to 35 lines, 5519 to 5588 bytes, 1380 to 1397 tokens.
  • objectstack-query/evals/filters-pagination-search.json: 75 to 75 lines, 5409 to 5413 bytes, 1353 to 1354 tokens.
  • objectstack-ui/evals/analytics-inline-vs-dataset.json: 87 to 87 lines, 5516 to 5529 bytes, 1379 to 1383 tokens.
  • Eval fixtures are measured, not ratcheted. Whole package, all skills/*/SKILL.md: 4597 to 4597 lines (no SKILL.md touched).
  • node scripts/pm/check-skill-line-ratchet.mjs: exit 0. node scripts/check-skills-token-ratchet.mjs: exit 0 ("57 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 29 eval fixture(s) measured, not ratcheted").
Derived gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 41 families for the five paths. Each ran on 6881273 with its exit code captured before any pipe, after building @objectstack/formula and @objectstack/lint (and their closure) under the verify lock (VERDICT command-exit 0, 79s):

  • 39 exit 0, among them check-adr-0087-registration (scan and --self-test), check-changeset-no-major, check-closing-keyword-parity, check-comment-mask-corpus, check-empty-changeset (scan and --self-test), @objectstack/lint check:doc-formula-expressions, check:doc-authoring, check:nul-bytes, check:pm-governed-merges, check:published-files, check:skill-compatibility, check:skill-frame-sync, check:skill-identifier-liveness, check:skill-links, check:dts-closure and check:sourcemap-no-sources-content (each over the built packages only).
  • NOT MEASURED, exit 3 PREREQUISITE NOT MET (each reads every package's dist/): check:dual-build-cjs-loads, check:lean-entry-closure. No package source is touched; CI builds and runs them.
  • --ran reconciliation: exit 0, "41 derived famil(ies) accounted for — 39 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".
  • CI families are read from this PR's check-runs, not re-run here.
Tier and governed readings
  • dispatch-gates --tier: MANDATORY claude-fable-5-2 (skills/**, clause ①, the published catalog; no one-line exit for this surface). This change was authored on the session's configured model; the at-tier review is the seat's.
  • node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-1e54m4: exit 3, GOVERNED, landing tier H (人合). 4 of 5 paths hit the register (skills/**); the changeset is not on it. Size +14 / -4, under the 3000 threshold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5pDNPLKWseNj7nKqBo

…t_contain literals

Each reference answer named its literal in prose, so it failed its own
grader. The literal is what the skill teaches in every case; the
expected_output now spells it. No assertion or prompt changes.

Claude-Session: https://claude.ai/code/session_01FEkQ5pDNPLKWseNj7nKqBo
Co-Authored-By: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 68812739150d2da5a88ab3f1eadde78b21d6f2dc
Local-runs: probe — one read-only substring count over the eval JSON at this head and at origin/main 6e28797 through git show, to check the PR body's re-measure table as the brief asks; nothing built, tested or re-run, no gate executed
Scope: skills/objectstack-automation/evals/flows-triggers-approvals.json, skills/objectstack-automation/evals/integrations-declared.json, skills/objectstack-query/evals/filters-pagination-search.json, skills/objectstack-ui/evals/analytics-inline-vs-dataset.json + none

The diff is five files, +14 / -4: one expected_output line in each of the four hits files and one changeset. No file in the diff implements or enforces the evals (no gate, validator or schema is touched), so the implementing set is empty. The changeset is the lane seat's remainder.

① Derived judgments

  • Accept-set: unchanged. No must_contain or must_not_contain entry, prompt or id moves in any of the four files; only the reference answer text does. Right.
  • Public surface: the four eval fixtures ship in @objectstack/skills; no SKILL.md, rule file, schema or runtime path is touched. Right.
  • Each reference answer now passes its own grader, read at the head: flows-triggers-approvals 20 holds all 4 must_contain and none of 3 must_not_contain; integrations-declared 2 holds all 7 and none of 4 (type: 'http', registerConnector(, token:, Authorization: 'Bearer); filters-pagination-search 2 holds all 4 and none of 2 (cursor:, offset: page; the text says query.cursor, which is not cursor:); analytics-inline-vs-dataset 1 holds all 4 and none of 2 (valueField:, categoryField; the text says object/valueField/aggregate, no colon). Right.
  • Re-measure claim, checked against the tree: at origin/main 6e28797 the evals with a missing literal are automation 2, query 1, ui 1, data 3, objectui 17, and one must_not_contain hit (ui views-apps-actions-pages eval 2); at this head the four are gone and data 3, objectui 17 and the one hit are unchanged. Eval totals 25 / 7 / 29 / 37 / 59 / 34 match. The PR body's table is right, with "misses" counted in evals (in literals the data bundle is 6 and objectui 27).

② Semver level

.changeset/33588-skills-evals-own-literals.md declares '@objectstack/skills': patch. The diff publishes reworded eval fixture text only, with no authorable or runtime surface change: patch is the right level. Clause-②: no is on the PR body and the changeset, and is right: nothing narrows, nothing is removed, no accept-set moves.

③ Boundary flags

  • open_questions: empty.
  • Deviation, model tier (authored on an opus session where dispatch-gates --tier mandates the contract tier for skills/**): answered by this record, rendered at CONTRACT_REVIEW_TIER on the whole hits set.
  • Deviation, signature as a plain line and not an HTML comment; no labels sent; model-free commit trailer: process choices with no effect on the tree; accepted.
  • Out-of-scope finding, ui views-apps-actions-pages eval 2 contains its own must_not_contain literal requiresObject: 'sys_approval_request': confirmed at this head; correctly left to card skills(objectstack-ui, query, automation): stop teaching assigned_to / assignee as the record owner beside owner_id (follow-up of #33506) #33560, whose surface the file is.
  • Out-of-scope finding, a shape check as a gate: correctly not added; the card rules it the maintainer's call.
  • Check-runs on this head at read time: 41 runs, none failed or cancelled; 12 still in progress (Test Core 1/8 and 2/8, Live E2E UI, Build Core, Type Check consumer gates / workspace / source gates / debt ledger, Lint docs and code guards / ESLint / repo and tooling gates / CI, release and engine gates). Completed and green: Check Changeset, Check PR Size, Governed Surface Queue Guard, PR-body guards, Lint PM dispatch-gates, the three scoped lints, Test UI, Dogfood Regression Gate. The seat reads the twelve to completion before adopting; this record judges the design, and a red run among them is not covered by it.

④ Design judgment

In all four the developer ruled the literal right and the reference answer wrong. Each ruling holds against main.

  • flows-triggers-approvals.json eval 20, type: 'subflow'. subflow is a member of the flow node type enum (packages/spec/src/automation/flow.zod.ts:69) and the node table row at skills/objectstack-automation/SKILL.md:76 teaches it with bare config.flowName, the dependency closure and outside-closure. A node is written type: 'subflow', so the literal is the authored spelling and the old prose "A subflow node" was the weaker side. The new text is that spelling in place; the rest of the sentence (config: { flowName: 'notify_owner' }, the dependencies entry, the run-time failure) is untouched and still agrees with line 76. Holds.
  • integrations-declared.json eval 2, dialect: 'cel'. The new reference answer is the Stripe recipe at skills/objectstack-automation/references/integration-recipes.md:52-53 verbatim in both envelopes (bal.body.available[0].amount / 100.0, isoDatetime(now())), and the envelope rule at SKILL.md:241 (compute with { dialect: 'cel', source: '…' }; a bare string is literal text) makes the old "via CEL (bare expressions)" reading the one an agent could copy wrongly. The literal is there for the right reason, not pasted: the envelope is what a fields value slot requires. Every other clause (connector, type: 'schedule', runAs: 'system', input: {}, filter, requires) is unchanged and matches the recipe. Holds.
  • filters-pagination-search.json eval 2, keyset. skills/objectstack-query/SKILL.md:247 writes "For keyset paging (infinite scroll ...)" in lower case and rules/pagination.md gives the same where + orderBy + limit pattern the answer describes. The miss was case-only ("Keyset" at sentence start); "Use keyset paging:" fixes it without changing the claim. Holds.
  • analytics-inline-vs-dataset.json eval 1, dataset. skills/objectstack-ui/rules/dashboards.md teaches that a widget binds a dataset and selects named dimensions + values, with dataset: 'crm_sales' on the widget, and the spec says dataset is required on a widget (packages/spec/src/ui/dashboard.zod.ts:268, 1011). The old text held only defineDataset (capital D), so the lower-case key was absent; "each widget names it in dataset" states the widget key truthfully. Holds.

Attempts to break it: a new must_not_contain collision in any of the four (none, listed in ①); a reference answer that contains the literal while teaching something main refuses (none: each literal is in the form the skill or recipe writes); drift between the changeset prose and the diff (none).

Findings:

  • nit — the PR body's re-measure table heads its columns "misses" without a unit; the figures are evals with a miss, not literals (data 3 evals / 6 literals, objectui 17 / 27). The card uses the same unit, so nothing is wrong; prose only.
  • nit — in analytics-inline-vs-dataset.json eval 1 the literal dataset is a plain lower-case word any answer about datasets contains, so it discriminates little even now that the reference answer holds it. The assertion is outside this card's "fix the wrong side" ruling and is unchanged by the diff; a follow-up could tighten it to dataset: '. No effect on this change.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-1e54m4
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T03:29Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

维护者速读

  • 改了什么:四个技能 eval 的参考答案(expected_output)补上它们自己 must_contain 要求的字面:automation flows-triggers-approvals eval 20 的 type: 'subflow'、integrations-declared eval 2 的 dialect: 'cel'、query filters-pagination-search eval 2 的 keyset、ui analytics-inline-vs-dataset eval 1 的 dataset。断言、提示词都没动;@objectstack/skills patch changeset。
  • 为什么改:卡 skills(automation, query, ui): four more evals list must_contain literals their own expected_output lacks #33588。参考答案连自己的断言都过不了,这个 eval 就分不清对错答案。四处都是字面对、参考答案错,已对照技能文字和 spec 核过。
  • 风险与回滚:只改 eval 夹具文字,不动技能正文、不动运行时。回滚即还原本 PR。
  • 先看:integrations-declared.json eval 2(补的是和 Stripe 配方逐字一致的 { dialect: 'cel', source } 信封)。
  • 两分钟验证:git diff origin/main...HEAD --stat,预期 5 个文件、+14/-4。
  • 需要你做的:受管面 Tier H(skills/**)。达档(CONTRACT_REVIEW_TIER,席位已核对实际模型)复审 PASS 评论 6888571022(本 head)已在案,请批准或直接合并。
  • 席位意见:可以合。只有两个措辞小点,不影响结论。

席位核对

Verdict: ACCEPT, held for the maintainer · head 68812739150d2da5a88ab3f1eadde78b21d6f2dc · card #33588 · report 6888532867 · at-tier contract review 6888571022 (PASS on this head, CONTRACT_REVIEW_TIER, served model verified by the seat; Ruling-ref for the in-seat review: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb option A).

  • Shape: draft → main, Fixes #33588. Four skills/** eval files (one expected_output line each) and one changeset (@objectstack/skills patch). GOVERNED, Tier H (skills/**). Clause-②: no; Metadata-protocol: none.
  • Judgment: in all four the literal was right and the reference answer wrong, each checked against the skill text and spec on main (flow.zod.ts node enum, the Stripe recipe in integration-recipes.md, objectstack-query/SKILL.md, dashboard.zod.ts). Every reference answer now holds all its must_contain literals and none of its must_not_contain ones. The re-measure table matches the tree.
  • Gates: 41 derived, 39 exit 0, 2 NOT MEASURED locally (check:dual-build-cjs-loads, check:lean-entry-closure); ratchets exit 0. Check-runs on the head all concluded, none failing.
  • Accepted deviations (nits): the body's re-measure table counts evals without naming the unit; the analytics eval's dataset literal is a plain word and discriminates little (assertion unchanged, outside the card).
  • Follow-up: skills/objectstack-ui/evals/views-apps-actions-pages.json eval 2 carries its own must_not_contain literal; added to skills(objectstack-ui, query, automation): stop teaching assigned_to / assignee as the record owner beside owner_id (follow-up of #33506) #33560's scope (6888544144), which owns that file. The shape check (every must_contain literal in its own expected_output) is named in the body as the maintainer's option, not added.
  • Landing: Tier H. The seat does not flip this PR ready or enqueue it. It needs the maintainer's merge, or an authorised APPROVED review after which the seat lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 15, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 15, 2026 04:47
@os-zhuang
os-zhuang enabled auto-merge November 15, 2026 04:47
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 5abcad0 Nov 15, 2026
50 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-1e54m4 branch November 15, 2026 05:14
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…udges each on a same-head at-tier PASS record (objectstack-ai#33711)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X5SKzXRHQWjMHXgyfyiaqkP)_

Fixes objectstack-ai#33603

Clause-②: no
Metadata-protocol: none

domain:skills#1 · os-project-manager · session_01FEkQ5kXwEA8abP4hMhtodW

## 维护者速读

- 改了什么:合后审计 `check-governed-merges.mjs` 现在对每个 skills 合并,用队列守卫自己的 arm
读法和记录读法再读一遍落地提交。按守卫自己的顺序判:合并前有授权批准或授权入队的,算维护者的合并,留在维护者清单并写明谁放行;其余 arm 判为
Tier S 的合并单独列出,每条再查同 head、达档、PASS、出自守卫信任的作者、合并前已存在且未再编辑的复核记录,且该 PR
确实以这个提交落地(`merge_commit_sha`),缺了就标 ⛔ BREACH。另外修了 objectstack-ai#33616 评审留下的三处:校验器比对
`advisorModel`、拒收把复核交给子代理的转录,post-stamped 对校验器自测的 spawn 加超时并转出子进程的失败行。
- 为什么改:AGENTS.md 第 14 条把合后审计定为座位落地的补偿控制,但它按路径分类,arm 落地看起来和「Tier H
无批准」一模一样(卡 objectstack-ai#33603,评审 6886787995 N3);objectstack-ai#33616 的复核记录把校验器残项挂到本卡。
- 风险与回滚:只动三个 `scripts/pm/` 工具文件,审计仍是只报告;读不到时记 NOT MEASURED、整轮
INCOMPLETE(退出 2),不会把未读的合并报成干净。校验器更严:复核会话里调用过 Agent / Task / Workflow /
SendMessage 的转录现在被拒,要传子代理自己的输出。回滚即还原本 PR。
- 先看:`scripts/pm/check-governed-merges.mjs` 的
`readArmLanding`(新,读法全部来自队列守卫)和 `renderReport`
的分列;`scripts/pm/verify-review-tier.mjs` 的 `SUB_AGENT_TOOLS` 判断。
- 两分钟验证:`node scripts/pm/check-governed-merges.mjs --since-ref
objectstack=b937b75f --repos objectstack`,预期 objectstack-ai#33668、objectstack-ai#33555、objectstack-ai#33632 三条
skills 合并都留在维护者清单,各带一行「cleared by an authorized enqueue (os-zhuang)」;没有
BREACH。
- 需要你做的:定合后审计的周期执行人(本 PR 建议:定时 workflow,由席位立卡交你,见下文 Owner);本 PR
本身无,席位落地。

## What changes

**Part 1, the audit (`scripts/pm/check-governed-merges.mjs`).**

- `readArmLanding` reads every skills landing in the sweep again with
the queue guard's own readers on the landed commit (the commit the merge
group judged): `decomposeGovernedWork`, `readLowRiskTier` (the
register's `lowRiskArmVerdict`), `landsOnLowRiskArm`, then
`recordAuthorTrusted`, `recordVerdict` and `lowRiskRecordVerdict`. One
reader: no predicate is restated here; the guard is imported lazily
(`loadArmReaders`, `ARM_READER_EXPORTS`), and a missing export or failed
load is NOT MEASURED.
- Five states. `pass`: the arm reads Tier S and a same-head record that
stands at the tier and reads PASS exists. `breach`: the arm reads Tier S
and no such record exists. `cleared`: the arm reads Tier S, and an
authorized approval or enqueue cleared it first. `tier-h`: the arm reads
H (its reasons are printed under the row), or the landing crosses the
3,000-line human-merge line. `not-measured`: the pull, the timeline or a
comment thread could not be read.
- The legs run in the guard's own order (`entrySatisfied`): an
authorized approval (`authorizedApprovalVerdict` on `makeReviewReader`),
then an authorized enqueue (`enqueuerFromTimeline`,
`authorizedEnqueueVerdict` on the timeline already fetched), then the
record. A landing cleared by either of the first two is `cleared`: the
maintainer's merge, kept on the maintainer's list with who cleared it,
never a BREACH.
- Each leg reads only what existed before the landing. Reviews and
timeline events count strictly before `merged_at`: on a queue merge the
`removed_from_merge_queue` event shares the merge's instant (measured on
objectstack-ai#33555, objectstack-ai#33632 and objectstack-ai#33616), so the post-merge timeline would always read
the enqueuer as undetermined. Comments count only from an author the
guard trusts (`recordAuthorTrusted` on `recognisers.trustedAuthors`, the
objectstack-ai#33687 binding: the relay's identity and `GOVERNED_APPROVERS`), and only
when created and last edited (`updated_at`) at or before the landing. So
a record any commenter posted cannot excuse a landing, an untrusted row
cannot shadow a trusted one, and a record written or edited after the
landing cannot excuse it; a BREACH whose only record was edited after
the landing names that comment.
- The record's head is tied to the landed commit: the attribution read
now carries `merge_commit_sha`, and a pull GitHub says is not merged (no
`merged_at`) or merged as another commit is a BREACH with that reason,
never `pass`. A failed attribution read is NOT MEASURED. Reads ride the
channel that attributed the row (`makePullReader`, `makeTimelineReader`,
`makeCommentReader`), and each one counts in the API lookup total.
- The report lists arm landings (`pass` and `breach`) apart, after the
maintainer's list, under their own contract lines; the head counts them
and their breaches. `cleared`, `tier-h` and `not-measured` rows stay on
the maintainer's list with an arm cell. A `not-measured` row makes the
sweep INCOMPLETE (exit 2) and the banner names it. `--json` carries the
reading as `entries[].arm`.
- Neither dispatch awaits at module scope any more (`main().then`,
`selfTest().then`): the guard imports this file at module scope, so an
awaiting dispatch deadlocks the lazy import (exit 13). The two comments
that said the lazy door is shut here were corrected.
- The register header's arm section says what the sweep now does and its
limit: it reads the record, not the run that wrote it. At the seat's
request, the line that called the relay's review plan path-only now says
the plan is not path-only from objectstack-ai#33540: `governedReviewPlan`
(`scripts/pm/fleet-write/execute.mjs`) reads the arm with its readers.
objectstack-ai#33686 has since merged, so the line holds on main.

**Part 2, the owner.** Proposed below; no workflow and no rule line in
this PR.

**Part 3, the verifier residuals (PR objectstack-ai#33616's records 6888257144 N5 and
6888534276 N7 and N10).**

| Residual | Verdict | Where |
|:--|:--|:--|
| `advisorModel` not compared | Fixed. Present and not null, it must
equal the tier. Measured present on every assistant entry of a real
session transcript, equal to the served model. |
`verify-review-tier.mjs`, 2 pin rows |
| A model value with a context suffix refuses an at-tier run | Closed.
Fails closed by design, and measured unreachable here: a session
configured with `[1m]` records `message.model`, `requestedModel`,
`advisorModel` and the identity attachment without the suffix (129
turns). Accepting a suffix would widen the accept set on an unseen
shape. The header says so. | header only |
| A nested sub-agent's transcript is not followed | Fixed by refusing
instead of following: an assistant turn that calls `Agent`, `Task`,
`Workflow` or `SendMessage` (`SUB_AGENT_TOOLS`) refuses, naming the tool
and asking for the transcript of the agent that ran the review, one that
called no other agent (a seat that reviewed in-seat beside unrelated
agents passes the review's own sub-agent file). Following would need the
child's file, which the transcript does not name. |
`verify-review-tier.mjs`, 3 pin rows |
| A delegating session passing its own transcript passes whatever served
its sub-agent | Fixed by the same refusal (a session that spawned its
reviewer is refused). | 1 pin row |
| A cleanly truncated transcript prefix passes | Closed. No honest run
writes a prefix: the record is the final turn's text, so a prefix
without that turn is a copy the seat cut, the dishonest route the card
leaves to the audit. A completeness test would rest on `stop_reason`,
which this session cannot measure for a sub-agent output; a wrong guess
would refuse every at-tier record. Named in the header's boundary. |
header only |
| The verifier self-test spawn has no timeout and hides the child's
failure lines | Fixed. `timeout: 120000`, and `childRunDetail` puts the
timeout or signal, the exit and the child's own failing case lines into
the case's detail. | `post-stamped.mjs`, 1 pin row |
| A raw relay `comment` / `comment_edit` op is not judged for tier | Not
here: it lives in `scripts/pm/fleet-write/` (the relay's door), outside
this card's file surface and on the same files as objectstack-ai#33540. Belongs on its
own card. | report |

## Owner of the weekly audit

Proposed owner: **a scheduled workflow**, filed by the seat for the
maintainer (this PR adds none). Reasons:

- The audit is the compensating control for seat landings, and the
skills seat lands most of the arm's PRs. A seat patrol would have the
audited party run its own audit.
- A workflow runs whether or not a seat is staffed; seats go off duty
and a patrol stops with them.
- It needs only an objectstack checkout with history, `--repos
objectstack`, a topological `--since-ref` from the last run's printed
tip (or `--since 8d` for overlap), and a read token. A ⛔ BREACH or
`not-measured` row can be surfaced in the job summary; making the job
red on `entries[].arm.state === 'breach'` would be a reader of `--json`,
not a change here.

The interim, until the workflow lands: the skills seat's patrol runs
`node scripts/pm/check-governed-merges.mjs --since 8d --repos
objectstack` weekly and posts the arm section to the seat post. That
line does not fit
`.claude/skills/pm-dispatch/references/lanes/skills.md`: 35 lines
against a ceiling of 35, headroom 0 (`check-skill-line-ratchet`), so it
is reported here and not added.

## Tests

- `node scripts/pm/check-governed-merges.mjs --self-test`: 728
assertions. New battery `⚖️ objectstack-ai#33603: ...` (38 cases, floor 38; roster
floor 37 to 38). It loads the REAL guard through `loadArmReaders` and
drives `readArmLanding` with fake fetchers and a fake git: pass on the
PR thread and on the card; breach for no record, a FAIL record, a record
on another head, a record below the tier, an unsigned record, a record
from an untrusted author, a record posted after the landing, a record
edited after it (the reason names the edited comment), a pull merged as
another commit and a pull closed unmerged; an untrusted FAIL after a
trusted PASS does not shadow it (and a trusted one does); cleared for an
authorized approval and an authorized enqueue on the measured
queue-merge timeline, with controls that a seat-account enqueue, a
post-landing approval and an unauthorized approval clear nothing; tier-h
for a `security` label, `Clause-②: yes`, a path outside the allowlist in
the same commit and an oversized landing; not-measured for an unread
pull, review list, timeline, comment thread or merge, and for readers
that did not load; null without a catalog row or a PR number; the
report's head count, its apart section and a cleared row staying on the
maintainer's list; the INCOMPLETE banner; and a structural pin that
neither dispatch awaits at module scope.
- `node scripts/pm/verify-review-tier.mjs --self-test`: 27 cases across
6 batteries (new battery: advisor, sub-agent spawn, and the refusal's
advice naming the reviewing agent).
- `node scripts/pm/post-stamped.mjs --self-test`: 787 cases across 29
batteries (record-tier battery floor 15 to 16).
- A live sweep on this head, read-only, from `b937b75f`: 8 governed
merges. The three skills landings, objectstack-ai#33668, objectstack-ai#33555 and objectstack-ai#33632, read Tier
S on the arm and were each enqueued by `os-zhuang` before the merge, so
each is `cleared` and stays on the maintainer's list; nothing is listed
apart and nothing is a BREACH; exit 0. (Before the review fix, objectstack-ai#33555
and objectstack-ai#33632 were listed apart as PASS.)

<details><summary>Ablations, each restored and `git diff` checked empty:
the first five on the first commit, the next six on the first review-fix
commit, the last two on the second</summary>

```text
the merge-time filter on comment rows removed      -> ✗ a-PASS-record-posted-AFTER-the-landing-is-a-BREACH
the apart filter in renderReport removed           -> ✗ arm-landings-are-listed-AFTER-the-maintainers-list-never-in-it
any non-unreadable record read as pass             -> ✗ no-record / FAIL-record / record-on-another-head is a BREACH
the sub-agent spawn refusal disabled               -> ✗ 3 verifier cases (nested reviewer, delegating session, other tool names)
the advisorModel comparison disabled               -> ✗ an advisor model off the tier refuses
the authorized-approval leg disabled               -> ✗ 1 case (an approval before the landing clears it)
the authorized-enqueue leg disabled                -> ✗ 1 case (an enqueue clears it)
timeline events counted AT merged_at, not before   -> ✗ 1 case (the measured queue-merge timeline)
the merge_commit_sha tie disabled                  -> ✗ 1 case (a pull merged as another commit)
the not-merged check disabled                      -> ✗ 1 case (a pull closed unmerged)
the updated_at filter disabled                     -> ✗ 1 case (a record edited after the landing)
the author binding disabled                        -> ✗ the untrusted-author cases
the edited-after note disabled                     -> ✗ 1 case (the BREACH names the edited comment)
```

</details>

## Acceptance notes

- An arm landing the maintainer's account enqueued is the maintainer's
merge by the guard's own reading, whoever prepared it; the sweep follows
that reading and does not second-guess it.
- The record's existence is all the audit adds; it cannot tell a record
from the run that served it (the verifier's boundary). Body and labels
are read as they are now; a removed `security` label is still caught by
the timeline.
- The arm reads today's register, so a skills landing from before the
arm existed (objectstack-ai#33632 landed 05:14Z, the arm at 05:57Z) is listed apart
when it qualifies. It had its PASS record, so it is not a breach.
- `contract-review.md`'s rule line on session evidence (「卡线程或席内复核」) does
not yet say that a session which spawned or messaged a sub-agent is
refused; the refusal text says what to pass. Carrier: the skills seat
(the file is at its 63-line ceiling).
- Raw relay `comment` / `comment_edit` ops not judged for tier: carrier,
the skills seat, as its own card (relay files).

## Verification

Gate list `dispatch-gates --commands` on this diff: 35 families, all run
locally; results below. `dispatch-gates --tier`: no path-derived mandate
(floor sonnet, default opus, ceiling fable); 449 changed lines, under
3,000. `check-governed-merges --branch claude/project-thread-sgww6y`:
NOT governed (0 of 3 paths on the register).

On head c48e9f1 (rebased on main `48e69596`, which carries objectstack-ai#33686 and
objectstack-ai#33687), every derived family ran and exited 0: `dispatch-gates --ran`
reconciles 35 derived, 35 run, 0 NOT-MEASURED. One gate went red on the
first pass of the first round and was fixed in its own commit:
`check:pm-dispatch-gates` refused a helper named like a compound
self-test (`childSelfTestDetail`, not in `COMPOUND_ANCHOR_LEDGER`); it
is now `childRunDetail`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5kXwEA8abP4hMhtodW -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…o 1 s before merged_at as the merge's (objectstack-ai#38896)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB1hPSUXVWWaX4kvGfBzBT7q)_

Fixes objectstack-ai#38863
Refs objectstack-ai#34178
Clause-②: no
Metadata-protocol: none

## 维护者速读
- 用户无感:每周治理合并审计不再把维护者本人经合并队列落地的改动,误报成席位违规。
-
为治理审计这一车队工具消除误报:合并队列在合并前一秒记下“移出队列”,旧读法把它当成最新的队列事件,读不出是谁把改动放进队列;现在只对队列机器人在合并前一秒之内的那一次移出放行,一秒是十二条误报上全部实测到的间隔。
- 出错只会让审计报告漏报或继续误报,不影响任何合并;可直接撤回本次改动恢复旧读法。
- 要你做的:这是须由维护者批准的治理面改动,批准一次即可。

## What changes

`scripts/pm/check-governed-merges.mjs` only (Tier H: an always-H
instrument).

- New `timelineAsQueued(events, landed, { enqueueEvent, dequeueEvent })`
feeds the enqueue leg of `readLandingClearance`. It keeps the events
strictly before `merged_at`, as before. It also drops the merge's own
terminal `removed_from_merge_queue`, but only when all three hold: it is
the **last** queue event the cut keeps, its actor is
`github-merge-queue[bot]` (`MERGE_QUEUE_BOT`), and it is at most
`MERGE_QUEUE_REMOVAL_WINDOW_MS` before `merged_at`. The guard's
`enqueuerFromTimeline` then reads the actor of the
`added_to_merge_queue` before it. The guard is not edited.
- `MERGE_QUEUE_REMOVAL_WINDOW_MS = 1000`. Its docblock cites the
readings: 0 s on objectstack-ai#33555, objectstack-ai#33632 and objectstack-ai#33616, and 1 s on all twelve BREACH
rows of objectstack-ai#34178 (table below). GitHub stamps whole seconds, so 1 s is the
narrowest window the readings support. No gap over 1 s was measured.
- Unchanged readings: a removal by any other actor, a removal further
out (an ejection the queue made first), and an earlier removal followed
by a re-add (the newest queue event is then the add). If the guard's
event names stop being strings, nothing is dropped and the leg stays
undetermined. It never clears on that path.
- Both callers of the landing half pick this up: the low-risk arm leg
and the `.claude/**` split leg.
- The two docblocks (the `readArmLanding` header and the self-test
fixture comment) now state the measured window instead of "shares the
merge's instant".

## Tests

Self-test pins, under `node scripts/pm/check-governed-merges.mjs
--self-test` (1017 assertions, exit 0 on `062ea49f4`):
- objectstack-ai#33603 battery, 71 → 77:
  - the one-second shape clears on the enqueue leg;
- the equal-instant control still clears, and a fleet-bot enqueue on the
one-second shape does not;
  - a removal 2 s or 60 s out stays undetermined;
  - a removal inside the window by another actor stays undetermined;
- after an earlier ejection, the re-add's enqueuer decides (the objectstack-ai#33355 /
objectstack-ai#33394 shape);
  - the pure reader, including a queue-bot removal that an add follows.
- objectstack-ai#35612 split battery, 35 → 36: the one-second shape on the split leg,
with another actor's removal and the fleet bot as controls.

<details><summary>Ablation (fix committed first; every mutation via
scripts/ablation-replace.mjs, restored to the HEAD blob)</summary>

- Enqueue leg back to the plain cut: red on 3 pins (the one-second
shape, the re-add after an ejection, the split leg's one-second shape).
The controls stay green, as expected, because the old reading was
already undetermined for them.
- Actor binding removed: red on the another-actor pin and on the split
pin. A first attempt was a no-op: the tool refused because the
replacement text already existed elsewhere. It was re-run with a unique
replacement.
- Window widened to 60 s: red on the outside-the-window pin and the
pure-reader pin.
- Last-event binding removed: green at first, which exposed a gap. Added
the pin for a queue-bot removal that an add follows (commit
`062ea49f4`). Re-ablated: red.

</details>

## Re-run on objectstack-ai#34178's rows

Enqueue leg, read on each PR's **live** timeline and `merged_at` through
the real guard, before (strict cut) and after (`timelineAsQueued`):

| PR | queue events (UTC) | gap | before | after |
|---|---|---|---|---|
| objectstack-ai#37072 | add os-zhuang 19:16:14 · rem bot 19:34:41 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#36775 | add os-zhuang 22:00:38 · rem bot 22:21:05 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#36067 | add os-zhuang 17:33:58 · rem bot 18:06:13 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#35673 | add os-zhuang 22:28:18 · rem bot 23:03:52 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#35709 | add os-zhuang 04:52:39 · rem bot 05:21:36 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#33355 | add · rem 09:52:16 · re-add os-zhuang 11:13:10 · rem bot
11:50:11 | 1 s | undetermined | authorized (os-zhuang) |
| objectstack-ai#33577 | add os-zhuang 02:51:26 · rem bot 04:44:21 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#33589 | add os-zhuang 02:50:20 · rem bot 04:44:21 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#33394 | add · rem 21:48:10 · re-add os-zhuang 22:52:01 · rem bot
00:44:32 | 1 s | undetermined | authorized (os-zhuang) |
| objectstack-ai#32841 | add os-zhuang 01:28:50 · rem bot 02:13:54 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#32839 | add os-zhuang 23:39:46 · rem bot 00:33:14 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#32313 | add os-zhuang 23:44:14 · rem bot 00:13:08 | 1 s |
undetermined | authorized (os-zhuang) |
| control objectstack-ai#33555 | removal == merged_at | 0 s | authorized (os-zhuang) |
authorized (os-zhuang) |
| control objectstack-ai#33632 | removal == merged_at | 0 s | authorized (os-zhuang) |
authorized (os-zhuang) |
| control objectstack-ai#33616 | enqueued by objectstack-fleet[bot] | 0 s |
unauthorized | unauthorized |

End-to-end sweep, the real CLI on both trees with `--since
2026-11-24T19:30:00Z --repos objectstack --json`. Both runs complete,
228 entries each:
- objectstack-ai#37072 goes from `breach` (stage) on `197e3ff3b` to `cleared` by
enqueue (os-zhuang) on `062ea49f4`.
- One more entry moved, outside the 12: **objectstack-ai#38233**, from `pass` to
`cleared` by enqueue. Its timeline has the same shape: added by
os-zhuang 09:48:54, removed by the bot 10:20:32, merged 10:20:33. It was
listed as a seat landing on a record, but it was the maintainer's
enqueue.
- No other entry changed state.

NOT MEASURED: the end-to-end sweep row for the other eleven PRs. A
window back to 2026-11-10 timed out at 570 s, and a 7-day window already
takes about 8 minutes per tree, so this container's 10-minute foreground
limit cannot fit it. Their enqueue-leg reading is in the table above.
The weekly audit job will read them on its next run.

## Smaller finding: recommendation for the seat to route

Recommendation: **enforce the record template where the record is
written. Do not widen the reader.** This PR changes no recogniser
(`record-recognisers.mjs` is outside the claimed surface).

- Evidence: the template the reviewer is handed already spells both
forms the 8 rows missed (`scripts/pm/record-recognisers.mjs` lines
2555–2559 on `197e3ff3b`): a clean round is written `No must-fix, no
should-fix.`, and the delta record names what it closes as `S1: closed`.
The rows wrote `must-fix 0 · should-fix 0`, `S1 closed.` and `F1
(must-fix on SHA): fixed.`, which are off-template.
- Reason: the audit reads records through the queue guard's own reader,
so the audit and the queue agree on what a record says. Widening the
reader alone would make them disagree. Widening it for both changes what
the queue accepts, a contract we own on both ends (AGENTS.md Prime
Directive objectstack-ai#12: reject off-spec input at authoring, never accept a
dialect). A check when the record is written tells the reviewer at once,
while the record can still be fixed.
- After this PR, those 12 rows clear on the enqueue leg, so the phrasing
gap no longer decides them. It matters only for seat landings, where the
queue already refuses the same phrasing.

## Acceptance notes

- `origin/main` moved one commit past the base (`3c617a28e`,
`packages/spec` and `ui/` only, nothing under `scripts/pm/`). It was not
merged in, because the diff does not overlap it.
- For the live sweep, this container's shallow clone was deepened with
`git fetch --shallow-since=2026-11-02 origin main` (additive).

## Verification

Read first:
1. `timelineAsQueued` and `MERGE_QUEUE_REMOVAL_WINDOW_MS` (the risk
hunk: the three conditions that drop an event).
2. The one-line change in `readLandingClearance`.
3. The `WINDOW` pins in the objectstack-ai#33603 battery.

Two-minute check: run `node scripts/pm/check-governed-merges.mjs
--self-test`. Expected: `✓ check-governed-merges --self-test: 1017
assertions`, exit 0.

<details><summary>Local gates on 062ea49</summary>

- The derived set is `node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack`, 63 commands. Reconciled with
`--ran`: `63 derived, 61 run, 2 NOT-MEASURED, 0 UNRUN`.
- NOT MEASURED, both left to CI:
- `pnpm check:i18n-coverage`: exit 3, PREREQUISITE NOT MET (no CLI or
examples build in this worktree).
- `pnpm check:pm-dispatch-gates`: killed by timeout at 200 s and again
at 280 s on the shared box, so it never reached a verdict.
- `node scripts/check-self-test-workflow-commands.mjs` first failed when
its spawn timed out (`spawnSync node ETIMEDOUT`) while the box was
loaded. Re-run alone: exit 0.
- Every other command: exit 0.
- No changeset: `scripts/pm/**` is not published (`skip-changeset`).

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzfWWgrLkABDvbRjhAk)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills(automation, query, ui): four more evals list must_contain literals their own expected_output lacks

3 participants