Skip to content

docs(skills): name the injected owner_id as the record owner in ui, query and automation examples - #33720

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-s3x4uf
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-s3x4uf

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #33560

Clause-②: no
Metadata-protocol: none

Signed: domain:skills#1 · os-project-manager · session_01FEkQ5m9ZMjU7EYnzJH8T6s

维护者速读

  • 改了什么:objectstack-ui(列表视图、动作、仪表盘)、objectstack-query(expand 示例)、objectstack-automation(notify 收件人)里把「负责人」写成 assigned_to / assignee 字段的示例,全部改成平台注入的 owner_id;删掉把 assigned_to 列标成 "Owner" 的那一列;「我的」筛选旁加一处指向 objectstack-data § Relationship Patterns 的交叉引用。eval 同步:ui 视图 eval 1、12 与 query eval 4 期望 owner_id;ui eval 2 的参考答案不再含有它自己 must_not_contain 禁止的字面量。
  • 为什么改:PR docs(skills): an owner, assignee or 负责人 in a request is the injected owner_id #33555 已在 objectstack-data 里规定负责人 / 处理人 = owner_id,其它技能还在教另造一个负责人字段,同时加载的 agent 会拿到互相矛盾的教学,建出两个「负责人」列,而「我的记录」视图和按负责人可见性只读 owner_id。
  • 风险与回滚:只改技能示例文字、eval 与一个 patch changeset,不碰 schema 与运行时;回滚即还原本 PR。五个文件 token 都没超上限、上限未动(automation 6861/6861 字节数不变)。
  • 先看:skills/objectstack-ui/rules/list-views.md 第 53、60、101 行;skills/objectstack-ui/evals/views-apps-actions-pages.json eval 1、2、12。
  • 两分钟验证:git grep -nE "assigned_to|\bassignee\b" -- 'skills/*.md',预期只剩 objectstack-data 的规则本身(SKILL.md 313、441 行)和 examples-objects.md 88 行的注释,以及 objectui protocol.md 300 行的 assignee 到 owner_id 映射。
  • 需要你做的:受管面 Tier H(skills/**),席位的达档契约复审 PASS 记录在案后,请合并。

What changes

Every published example that used assigned_to / assignee as the record owner beside the injected owner_id now names owner_id. Measured on main @ 6ff3eee (the card's line numbers were taken on 8e63ed8; all still hold except dashboards, now line 269):

File Line Was Now
skills/objectstack-ui/rules/list-views.md 53 simple columns with 'assigned_to' 'owner_id'
same 60 { field: 'assigned_to', label: 'Owner' }, a second field carrying the injected owner's label { field: 'owner_id' } (its injected label is already Owner)
same 101 "mine" rule on assigned_to, comment glossing {current_user_id} rule on owner_id; the comment now reads "mine: the record owner (objectstack-data § Relationship Patterns)", the one cross-reference this PR adds
same 265, 270 kanban columns with 'assignee' 'owner_id'
same 321 gantt columns with 'assigned_to' (not cited by the card, same pattern) 'owner_id'
skills/objectstack-ui/rules/actions.md 44 Reassign Lead params: [{ field: 'assigned_to' }] owner_id: reassigning a lead changes its owner
skills/objectstack-ui/rules/dashboards.md 269 metric filter: { assignee: '{current_user_id}' } owner_id
skills/objectstack-query/SKILL.md 290, 292 fields and expand on assignee owner_id, spelled as the spec's own expand example (packages/spec/src/data/query.zod.ts:392, expand: { owner_id: { object: 'user', ... } })
skills/objectstack-automation/SKILL.md 115 notify recipients record.assignee record.owner_id (node tell_owner, label "Notify Owner")

No separate handler field was kept anywhere: in every site the example meant the owner, so no "grants no access" sentence was owed. The rule itself is not restated; the list-view comment points at objectstack-data § Relationship Patterns (the Record owner row PR #33555 added, skills/objectstack-data/SKILL.md:313).

Evals

  • skills/objectstack-ui/evals/views-apps-actions-pages.json eval 1: the owner column and the my_open filter are owner_id; must_contain gains owner_id, must_not_contain gains 'assigned_to' (quoted, so the "never an assigned_to field" prose does not trip it).
  • Eval 12: the "mine" rule is owner_id; same two assertion additions.
  • Eval 2 (scope add 6888544144): the assertion is right and the reference prose was wrong. rules/navigation.md:39 teaches the approvals inbox gated by requiresService: 'approvals', so requiresObject: 'sys_approval_request' in must_not_contain is correct; the expected_output spelled that literal inside its own "never ..." warning. It now says "never a requiresObject gate on sys_approval_request".
  • skills/objectstack-query/evals/filters-pagination-search.json eval 4 (outside the order's named surface; covered by the ruling "any other eval answering owner with assigned_to"): its prompt asks for the task's assignee, which the objectstack-data rule maps to owner_id; it answered with an assignee field and would contradict the query SKILL.md example this PR changes. Now owner_id, must_contain gains owner_id.
  • Self-check over both eval files: every must_contain literal occurs in its own expected_output, and no must_not_contain literal does (before: ui eval 2 hit requiresObject: 'sys_approval_request'; after: 0 hits).

Token budget, paid in place

File Tokens before / after / ceiling Bytes before / after Lines
objectstack-ui/rules/list-views.md 3446 / 3444 / 3451 13783 / 13776 334 / 334
objectstack-ui/rules/actions.md 2453 / 2452 / 2453 9810 / 9807 185 / 185
objectstack-ui/rules/dashboards.md 6230 / 6230 / 6232 24918 / 24918 475 / 475
objectstack-query/SKILL.md 4596 / 4596 / 5547 18403 / 18403 439 / 439
objectstack-automation/SKILL.md 6861 / 6861 / 6861 27464 / 27464 463 / 463

The cross-reference is paid for in list-views.md by the swaps (assigned_to to owner_id is 3 bytes shorter), the dropped redundant label: 'Owner', and the ({current_user_id} = the signed-in user) gloss, whose home is skills/objectstack-ui/SKILL.md:205 (the token vocabulary). No ceiling moved. Package total, all eleven skills/*/SKILL.md: 4588 lines and 236197 bytes before and after. Eval JSON is measured, not ratcheted.

Tests

Skill text and evals only: no package is touched, so no package test, typecheck or ablation is owed. The five edited os:check blocks type-check: pnpm --filter @objectstack/spec check:skill-examples exit 0 ("346 prose examples type-check across 3 surface(s)").

Acceptance notes

  • Remaining assignee / assigned_to in published skills are correct and untouched: the objectstack-data rule itself (SKILL.md:313, :441), references/examples-objects.md:88 (// assignee: the injected owner_id), objectui rules/protocol.md:300 (maps assignee to owner_id), and the evals whose must_not_contain forbids assigned_to (data, platform, automation). ui/skills/**: no hit.
  • The order's surface listed skills/objectstack-query/SKILL.md but not its eval file; the eval edit is declared above.

Verification

  • dispatch-gates --tier: MANDATORY contract-review tier (skills/**, clause ①, no one-line exit). This thread ran on the default tier; the at-tier contract review is the seat's.
  • check-governed-merges.mjs --branch claude/project-thread-s3x4uf: GOVERNED, landing tier H, skills/** ×7, +30 / -20 over 8 files, under the human-merge threshold. The low-risk arm reads NOT MEASURED from a branch (no PR to read); --pr reading in the report.
  • Ratchets on head 10f2b24: check-skills-token-ratchet exit 0; check-skill-line-ratchet exit 0.
  • Derived gates (dispatch-gates --commands), run on head 10f2b24 after turbo run build --filter=@objectstack/lint... --filter=@objectstack/formula... --filter=@objectstack/client-react... under the verify lock (VERDICT command-exit 0): 47 derived, 46 exit 0, 1 exit 3 NOT MEASURED (check:dual-build-cjs-loads reads every package's dist; no package is touched, CI runs it). dispatch-gates --ran: 47 accounted for, 46 run, 1 NOT-MEASURED, 0 UNRUN.
47 derived gates plus skill-examples, each with its exit code
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
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-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm --filter @objectstack/spec run check:skill-docs :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: 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:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 3
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:published-files :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-links :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm --filter @objectstack/spec check:skill-examples :: exit 0
  • Every family CI runs beyond the derived list: read off this PR's check-runs.

Generated by Claude Code

…uery and automation examples

The ui list-view, action and dashboard examples, the query expand example
and the automation notify recipients used assigned_to / assignee as the
owner beside the injected owner_id, contradicting objectstack-data's
record-owner rule. Point them at owner_id, link the "mine" filter to the
objectstack-data rule once, and update the evals that answered the owner
with assigned_to / assignee. Views eval 2's reference answer no longer
contains its own must_not_contain literal.

Claude-Session: https://claude.ai/code/session_01FEkQ5m9ZMjU7EYnzJH8T6s
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@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: 10f2b24bfd08460bb1237e0cd57f11ffd446e2af
Local-runs: none
Scope: skills/objectstack-automation/SKILL.md, skills/objectstack-query/SKILL.md, skills/objectstack-query/evals/filters-pagination-search.json, skills/objectstack-ui/evals/views-apps-actions-pages.json, skills/objectstack-ui/rules/actions.md, skills/objectstack-ui/rules/dashboards.md, skills/objectstack-ui/rules/list-views.md + none

Inputs read: card #33560 body and its four comments (triage 6886839461, scope add 6888544144, claim 6890844730, os-dev-report 6891036053); PR #33720 body, file list (8 files) and the net diff against merge-base 6ff3eee7 (+30 / -20); the check-runs on the head. The remainder of the diff is one changeset, the lane seat's ACCEPT at TIER_DEFAULT.

Check-runs on the head at review time: 15 success, 16 skipped, 0 failed, 10 still in progress (Build Core, Test Core 1/8 and 2/8, Type Check workspace / consumer gates / debt ledger, Lint ESLint / docs and code guards / CI, release and engine gates / repo and tooling gates). Completed and green: Check Changeset, Lint PM dispatch-gates, Governed Surface Queue Guard, PR-body guards, Dogfood Regression Gate, the three scoped Lint jobs, Test UI. This PASS is a design verdict; the gate verdicts of the ten running jobs are not yet answered and the seat reads them before merge.

① Derived judgments

  • Accept-set: unchanged. No schema, validator, gate or runtime file is in the diff; every hunk is skill prose, an os:check example or an eval JSON. Right.
  • Public surface: @objectstack/skills published text only. Nine example sites move from assigned_to / assignee to owner_id; one column ({ field: 'assigned_to', label: 'Owner' }) loses its colliding label; one comment gains a cross-reference. Right.
  • Eval assertions tightened: ui evals 1 and 12 gain owner_id in must_contain and 'assigned_to' (quoted) in must_not_contain; query eval 4 gains owner_id in must_contain. Each new literal occurs in its own expected_output and no forbidden literal does (read on the head). Right.
  • ui eval 2 (scope add 6888544144): the assertion side is the correct one. skills/objectstack-ui/rules/navigation.md lines 36 to 39 teach the inbox gated by requiresService: 'approvals' and say why not requiresObject; the reference prose now avoids the forbidden literal. Right.
  • Surface breach, query eval 4 (outside the order's file list): owed. The card's "What lands" says "Evals updated to match"; the prompt asks for the task's assignee, which skills/objectstack-data/SKILL.md:313 maps to owner_id; left as it was, the eval would expect an assignee field that the query SKILL.md example in this same PR no longer teaches. Declared in the dev report and the PR body. Right.
  • Gantt columns at list-views.md 321 (not cited by the card, same file, same pattern): right, and declared.

② Semver level

Clause-②: no

.changeset/33560-skills-owner-id-not-assigned-to.md is '@objectstack/skills': patch, which matches what the diff publishes: corrected example text and evals, no accept-set change, nothing narrowed. The changeset and PR body both carry bare Clause-②: no and Metadata-protocol: none. Check Changeset is green on the head.

③ Boundary flags

  • Dev deviation 1 (query eval 4 outside the named surface): accepted, see ①.
  • Dev deviation 2 (gantt columns): accepted, see ①.
  • Dev deviation 3 (thread ran on the default tier): answered by this at-tier record.
  • Dev deviation 4 (seat-signed HTML comment in the PR body): PR-body guards check-run is green; not a contract matter.
  • open_questions: empty. security_findings: none.
  • Tier S vs Tier H: no security label is owed. The diff teaches no access rule. The one security-relevant sentence (a handler field grants no access; owner-scoped visibility reads owner_id) lives in objectstack-data on main and is cross-referenced, not restated. Each edit moves an example ONTO the column the access model already reads; none adds a field that grants or appears to grant access. skills/objectstack-ui/SKILL.md:216 (a {current_user_id} filter is never the access gate) is untouched. The low-risk arm reading stands.

④ Design judgment

Tried against main, the cited code read at the head:

  • Does owner_id exist with the Owner label on the objects the examples use? Yes. OWNER_FIELD_DEF (packages/spec/src/data/injected-system-column-provenance.ts) is { type: 'lookup', reference: 'sys_user', label: 'Owner', readonly: false, system: true }, injected by applySystemFields (packages/objectql/src/registry.ts, if (wantOwner && !schema.fields?.owner_id)) under ownership: 'user' and when ownership is omitted. support_case, task, project_task and lead in the examples declare no other ownership tier. The zh-CN label 负责人 is the served translation the duplicate-label lint (packages/lint/src/lint-duplicate-field-labels.ts) already names.
  • skills/objectstack-ui/rules/list-views.md: holds. { field: 'owner_id' } with no label inherits Owner, so the second-Owner-label shape of AI 搭建新增的「负责人」字段与系统字段 owner_id 同名,表格出现两列「负责人」、看板卡片重复显示 #33506 is gone. The "mine" rule { field: 'owner_id', operator: 'equals', value: '{current_user_id}' } is character for character the form the spec's own conversion fixtures use (packages/spec/src/conversions/entries/18/page-component-filter-record-to-rule-array.ts, object-grid-default-filters-removed.ts). The cross-reference target exists: ### Relationship Patterns at skills/objectstack-data/SKILL.md:302, the Record owner row at 313. It is the one cross-reference, and the rule is not restated. The dropped {current_user_id} gloss has its home at skills/objectstack-ui/SKILL.md:205.
  • skills/objectstack-ui/rules/actions.md: holds. params: [{ field: 'owner_id', required: true }] on Reassign Lead: owner_id is not readonly, so a field-backed param inherits a writable user lookup, and reassignment is the by-id owner_id update the data skill describes (allowTransfer / modifyAllRecords). The lint's field resolution counts injected columns (packages/lint/src/system-fields.ts), so the reference is not a false finding.
  • skills/objectstack-ui/rules/dashboards.md: holds. The record-shaped filter: { owner_id: '{current_user_id}', ... } is the spelling of packages/spec/src/data/context-tokens.zod.ts:27 and of rules/navigation.md:27.
  • skills/objectstack-automation/SKILL.md: holds. recipients: { dialect: 'cel', source: 'record.owner_id' } yields one user id, the first accepted form; node id tell_owner and label "Notify Owner" now agree with the expression. Byte count unchanged against a ceiling with zero headroom.
  • skills/objectstack-query/SKILL.md: holds. fields keeps the FK and expand keys on it, the spelling of the spec's own prescription (packages/spec/src/data/query.zod.ts:392 and :433).
  • skills/objectstack-ui/evals/views-apps-actions-pages.json evals 1, 2, 12 and skills/objectstack-query/evals/filters-pagination-search.json eval 4: each prompt word (owner; the signed-in user's tasks; assignee) is answered the way the skills on this head teach, and nothing the skills teach is contradicted by an eval. Eval 1 no longer names a support_case.assigned_to the data template does not declare. No remaining assigned_to / assignee under skills/** means the owner: the survivors are the data rule itself (313, 441), examples-objects.md:88, objectui/rules/protocol.md:300 (a param named assignee mapped to owner_id) and must_not_contain lists.
  • No handler field is kept anywhere in the diff, so no "grants no access" sentence was owed.

Findings:

  • nit — skills/objectstack-query/SKILL.md:292 and query eval 4 write owner_id: { object: 'user', ... }, while the injected owner_id references sys_user. No effect on correctness: expandRelatedRecords (packages/objectql/src/engine-summaries-and-expansion.ts) never reads the nested object; it resolves the target through referenceTargetOf(fieldDef), and name / email exist on the user object. It is also the spec's own prescribed spelling (query.zod.ts:392). Before this PR the key was a hypothetical assignee, so the mismatch was invisible; now it sits beside a field whose target is known. Accepted deviation, or a follow-up card that settles the spelling in the spec message and the skill together.
  • nit, outside the diff, follow-up card only — skills/objectstack-data/references/data-hooks.md:304 still filters task on { owner: uid }, a hand-named owner field of the same family the card retires. Not on the card's list and not in this PR.

No must-fix, no should-fix. Nits alone end the round.

Implemented-by: claude/project-thread-s3x4uf
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T07: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

席位核对

Verdict: ACCEPT, seat lands (low-risk skills arm, Tier S) · head 10f2b24bfd08460bb1237e0cd57f11ffd446e2af · card #33560 · report 6891036053 · at-tier contract review 6891083453 (PASS, nits only, 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 #33560. Seven skills/** files (ui rules list-views/actions/dashboards, ui and query evals, query and automation SKILL.md) and one changeset (@objectstack/skills patch). Clause-②: no; Metadata-protocol: none.
  • Tier: GOVERNED (skills/**), read Tier S by the low-risk skills arm on this head (check-governed-merges --pr 33720: modified skill files and prose only, one bare Clause-②: no and Metadata-protocol: none, clean changesets, no security label ever, no catalog path named for it, no fork). Ruling-ref: Leehom 「同意 把低风险的 Tier H 放权给座位」 (2026-11-14), 「标签和路径都读」 and 「先补三项再合并」 (card pm: land low-risk governed PRs on the seat review (Tier S arm for skills wording and docs), per the 2026-11-14 delegation ruling #33501 comment 6888245932). The record judges no security label owed: the diff teaches no access rule, it moves examples onto the column the access model already reads.
  • Judgment (from the record): every owner example now uses the injected owner_id (a sys_user lookup, label Owner, injected under ownership: 'user' or omitted); the "mine" filter matches the spec's own fixtures; no support_case.assigned_to remains; evals agree with the teaching both ways; one cross-reference to the data rule, no restatement. Query eval 4 (outside the order's file list) was owed by the card's "evals updated to match".
  • Gates: 47 derived, 46 exit 0, 1 NOT MEASURED locally (check:dual-build-cjs-loads, no package touched); token ratchet green, no ceiling moved. Check-runs on the head: 44 total, 28 success, 16 skipped, none failing or pending.
  • Accepted deviation (nit): the query example writes owner_id: { object: 'user', ... } where the injected field references sys_user; the expander never reads the nested object, and it is the spec's own spelling.
  • Follow-up: skills/objectstack-data/references/data-hooks.md still filters on a hand-named owner: carded as skills(objectstack-data): the data-hooks reference still filters task on a hand-named owner, not owner_id (follow-up of #33560) #33722.
  • Pre-landing check: ① same-head PASS 6891083453. ② check-runs as above. ③ K = 13 on the merge base; no commit on main since touches these files; mergeable_state clean.
  • Landing: pr_ready + automerge_enable in the same relay round.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 07:42
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 412fbf7 Nov 15, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-s3x4uf branch November 15, 2026 08:21
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…n open must-fix or should-fix (objectstack-ai#33736)

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

Fixes objectstack-ai#33604

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

Clause-②: no
Metadata-protocol: none

## 维护者速读

- **改了什么**:合并队列守卫对 Tier S 的复核记录多读三件事:记录虽写 PASS 但同时列着未结的 must-fix 或
should-fix,不放行;记录别处(任一标题、小写/列表/表格/标题里的 verdict 行、单独一行 FAIL)写着
FAIL,不放行;题头之上的 `VERDICT:` 行也计数。同一 head 上后一条把它们关掉的 delta
记录才放行(引用前一条记录的等级、写明 closed 的不算未结)。规则文字的一句(contract-review.md ①)由 objectstack-ai#33731
带,本 PR 不碰该文件。
- **为什么改**:规则说 should-fix 要先做 delta 复核再落地,守卫却只认 PASS 这个词,带着未结 should-fix
的 PASS 记录能直接入队(卡 objectstack-ai#33604,加上 objectstack-ai#33687 复核记录 6890532571 的 N2、N3)。
- **风险与回滚**:只收紧放行面,不放宽:原来清不了的照样清不了。读不懂的等级一律不放行(fail closed),复核者要按 `S1
(should-fix)` 或 `No must-fix, no should-fix.` 的写法落记录,简报模板已同步写明。回滚即
revert。
- **先看**:`scripts/pm/check-half-states.mjs` 的
`contractReviewRecordReading`(唯一读法);`scripts/pm/check-governed-queue-guard.mjs`
的 `recordPassVerdict`;`record-recognisers.mjs` 的
`BRIEF_GRADE_LINES`(教复核者的写法)。
- **两分钟验证**:`node scripts/pm/check-governed-queue-guard.mjs --self-test
&& node scripts/pm/check-half-states.mjs --self-test && node
scripts/pm/record-recognisers.mjs --self-test`,预期三个全绿(526 / 5268 / 389
例)。
- **需要你做的**:无,席位落地(非受管面)。

## What changes

1. **One reader, `contractReviewRecordReading`**
(`scripts/pm/check-half-states.mjs`, beside
`contractReviewVerdictLines`, on the same regexes; ⛔ no second parser).
For a comment with a `## Contract review` heading it returns:
- `verdicts`: every explicit `VERDICT:` line's word, over the WHOLE
comment (N3: lines above the heading count).
`contractReviewVerdictLines` is now a view of this.
- `failSpellings`: lines that read FAIL outside the explicit form (N2),
in every verdict-bearing shape measured: a caps FAIL anywhere in any `##
Contract review` heading's tail; a `verdict` key in any case under a
heading mark, quote, bullet or emphasis, after up to two words (`Overall
verdict:`), with a parenthetical (`Verdict (delta):`), with `:`, a dash,
`=` or `is`, reading FAIL, FAILED or FAILS; a table row with a verdict
cell and a FAIL cell in either order; a bare `FAIL` line followed only
by a separator, a full stop or `!`. Prose that merely mentions FAIL (`-
Newest FAIL over an older PASS`, `FAIL, none or two refuse`) is not one.
- `findings`: per mention of the hyphenated grade word: `open` (named
with its grade at the line's lead: `**S1 (should-fix) — …**`, `- **S2
(should-fix) — …**`, `M1 (must-fix, …)`, `- should-fix: …`); `closed` (a
named finding whose line goes on to say closed and ENDS there: only
closing emphasis, `.`, `;` or `on this head` / `at this head` / `here`
may follow, and a full stop that closes the bold title may lead a new
sentence: `- **S1 (should-fix): closed.**`); `none` (`must-fix: none`,
same terms); a title that merely opens with either word (`closed in
part`, `Closed PRs …`, `none of …`) stays OPEN; `cited` (inside `(record
ID: …)`, the measured delta preamble); negated (`No must-fix, no
should-fix.`, `No new should-fix.`, `Neither must-fix nor should-fix.`,
`0 must-fix`, a second grade carried by `or` or `/`; after a comma or
`and` the second grade needs its own `no`); or `unreadable` (any other
mention, e.g. `Two should-fix, both …` or `No must-fix, should-fix S1
and S2 below.`).
2. **The guard decides** (`recordPassVerdict`, every Tier S leg
including the low-risk arm): after the existing one-PASS-line rule, a
record also refuses (`not-pass`, naming the comment id) when it carries
a FAIL spelling, names an open must-fix or should-fix, has an
unattributable grade, or its reading lacks the grade fields (fail
closed). The recogniser loader now requires `reading` (re-exported by
`record-recognisers.mjs`) in place of `verdictLines`. A later same-head
delta record that cites the prior record's grades, names what it closes
(`S1: closed`, `S1 (should-fix): closed`) and raises nothing new clears,
because the locator already reads the newest same-head record. The
unattributable refusal names the shapes the reader takes; it never asks
for a sentence the record may already carry.
3. **The brief teaches the grammar** (`record-recognisers.mjs`
`BRIEF_GRADE_LINES`, +3 lines): spell a finding `S1 (should-fix) — …`, a
clean round `No must-fix, no should-fix.`, and close by id alone.

## Acceptance notes

- **Round 3 (review 6892305129, S1 and N2).** S1: the round-2
closed/none reading took the first word after the grade, so `S1
(should-fix): closed in part, still open for X`, `**S2 (should-fix) —
Closed PRs are still read as merged…**`, `- **S2 (should-fix) — none of
the three ablations ran…**`, `S1 (should-fix) — closed on the prior
head, reopened by this delta` and `- should-fix: none of S1, S2 is
fixed` cleared; the state word must now end the finding, and each of
those six refuses again (pinned, with a control that `closed here.`, a
closed bold title followed by a sentence, and `closed;` still clear). N2
(cheap ones taken): `Verdict: FAILED`, `Verdict is FAIL`, `Verdict
(delta): FAIL`, `| FAIL | Verdict |`, `FAIL!` and a late FAIL in a
heading tail (`— PASS withdrawn, FAIL`) now refuse. Not taken: a verdict
column carried by a header row (needs table state). Accepted nits N1,
N3, N4 unchanged; N3's `- Leg verdict: fail-closed …` refusal stands
(fail closed).
- **Round 2 (review 6891926185, S1 and S2).** S1: the clean delta
6891542450 (objectstack-ai#33711's final record, nits only) was refused for its
preamble `(record 6891274033: PASS, should-fix S3, nits N7 and N8)`;
citations, named-and-closed lines and `No new should-fix.` now read
clean, pinned on the measured preamble. S2: `### VERDICT: FAIL`, `##
Verdict: FAIL`, `| Verdict | FAIL |`, `Overall verdict: FAIL`, `Verdict
— FAIL`, `FAIL.` and `**FAIL.**` now refuse beside one PASS line, and
`No must-fix, should-fix S1 and S2 below.` is unreadable (fail closed),
one pin each. Nits taken: N1 (`Neither … nor`, `0 must-fix`, `must-fix:
none`, `- should-fix: none` read clean), N3 (every heading's tail is
read). Not taken: N2 (the grade is read off the hyphenated word only;
the brief spells it and every measured record uses it), N4 (a prose
bullet opening `- FAIL — …` refuses; fail closed, a repost cures it).
- **Grammar measured, not assumed.** Read on the real records of PRs
objectstack-ai#33686 (6890432656), objectstack-ai#33687 (6890532571), objectstack-ai#33688 (6890622635 round 1,
6890939010 delta) and objectstack-ai#33711 (6890932729) with the new reader, plus the
review's own measurement of objectstack-ai#33711's deltas 6891274033 and 6891542450,
objectstack-ai#33720 (6891083453) and objectstack-ai#33726 (6891576194):
- objectstack-ai#33686, objectstack-ai#33687: one PASS, no FAIL spelling, no open grade, nothing
unreadable → still clear.
- objectstack-ai#33688 round 1: S1, S2 should-fix open → refused (correct: they earned
a delta).
- objectstack-ai#33688 delta 6890939010: S1, S2, N1 closed (`- **S1: closed.**`, no
grade word), but it raises **S3 (should-fix, the seat's, no head
change)** on the PR body → refused. If objectstack-ai#33688 is still queued when this
lands, it needs a later same-head record closing S3.
- objectstack-ai#33711 round 1: S1, S2 should-fix open plus the count line `No
must-fix. Two should-fix, both …` (unreadable) → refused; delta
6891274033 raises S3 → refused; delta 6891542450 (cites the prior
grades, closes S3, `No must-fix. No should-fix.`) → clears.
  - objectstack-ai#33720, objectstack-ai#33726: nits only → clear.
- **Rule sentence owed, carried by PR objectstack-ai#33731.** The seat moved
`contract-review.md` to objectstack-ai#33718 (PR objectstack-ai#33731) mid-round, so this PR leaves
it untouched. The sentence the rule owes, measured to fit line 51 in
place (63/63 lines, 119/120 bytes, paid by dropping 「两条」 and the second
「Tier」): `- 请审/求批与落地前检,过则 Tier S 入队、H 等人批:① 现 head 同形达档 PASS 在案,无前两级。`
(前两级 = must-fix/should-fix, the term line 45 already uses).
`check-skill-line-ratchet` was green with it on an earlier head
(148b0ce6, dropped).
- **Fail closed costs a wording rule.** A record that quotes the grade
word in prose (`the should-fix rule says …`) is refused as unreadable.
The brief now names the two shapes the reader accepts; a seat can always
repost a clean record.
- **Not changed:** the H43 patrol (`contractReviewVerdictOf`, first
match under the heading) and `check-owed-reviews.mjs` still read no
grades; that is follow-up F1 of record 6890532571, not this card.
- Ablation, round 3 (on 38cc292, guard self-test, restored, `git diff
HEAD` empty): the state-word tail reverted to `(closed|none)\b` → the r3
titled-open row red (all six CLEARED); the heading-tail caps FAIL
deleted → the r3 N2 row red.
- Ablation, round 2 (each reader branch mutated on 7c2fb52, guard
self-test run, restored, `git diff HEAD` empty): citation off → the
measured-delta row red; closed/none state off → 2 rows red; table-cell
regex off → the S2 FAIL-forms row red; comma carrying the denial → the
S2 comma row red.
- Ablation, round 1 (each guard branch mutated with
`scripts/ablation-replace.mjs`, run, restored; `git diff HEAD` empty
after each): open-grade branch off → 3 objectstack-ai#33604 rows red; FAIL-spelling
branch off → 2 N2 rows red; unattributable branch off → 1 row red;
reading below the heading only → the N3 row red.

## Verification

- `dispatch-gates --tier`: no path-derived model mandate (floor sonnet,
default opus); built on the claim's default.
- `check-governed-merges --branch claude/project-thread-78jrbs`: **NOT
governed** (0 of 3 paths on the register; `scripts/pm/**` is not a row);
190 changed lines, under 3000. Ordinary queue landing.
- Self-tests on the final head 38cc292: `check-governed-queue-guard
--self-test` 526 pass; `check-half-states --self-test` 5268 pass (11 new
H43 rows); `record-recognisers --self-test` 389 pass (1 new cross-tool
pin: the brief's shapes are the guard's).

<details><summary>Derived gate list on head 38cc292: 49 derived, 49 run
green, 0 NOT MEASURED</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` on head 38cc292 (round 3, after merging
`origin/main` again at 34c6eec; main's nine new commits touch none of
the three files), each exit captured before any pipe; `--ran`
reconciliation: "49 derived famil(ies) accounted for — 49 run, 0
NOT-MEASURED". `check:doc-formula-expressions` ran after `pnpm --filter
"@objectstack/lint..." build` under the verify lock. The two
`check-closing-keyword-parity` runs overlapped a five-second ablation
window of the reader, a file they do not read; both were re-run on the
restored tree, exit 0.

```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-issue-citations.mjs :: exit 0
node scripts/check-platform-checklist-watchdog.mjs :: exit 0
node scripts/check-platform-checklist-watchdog.mjs --self-test :: exit 0
node scripts/check-release-section-coverage.mjs :: exit 0
node scripts/check-release-section-coverage.mjs --strict :: 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/ci/scheduled-full-run.mjs --self-test :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
node scripts/pm/board-snapshot.mjs --self-test :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/sweep-closed-cards.mjs --self-test :: exit 0
node scripts/render-release-coverage-anchor.mjs --self-test :: 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:closing-target-claim :: exit 0
pnpm check:commit-card-trailers :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:issue-citations :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:partof-closing-keyword :: exit 0
pnpm check:platform-checklist :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
pnpm check:pm-half-states :: exit 0
pnpm check:pm-post-stamped :: exit 0
pnpm check:pm-record-recognisers :: 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:single-claim-paths :: exit 0
pnpm check:watch-hint-literal :: exit 0
```

- Rounds 1 and 2 ran the same 49 on bbe4fba and 7c2fb52, all green; an
earlier pass on 148b0ce6 (with the `contract-review.md` line, since
dropped) was stopped at 41 of 55, all green.
</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_01FEkQ5pJkb8Rbcrj6yEXfiA)_

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

---------

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 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(objectstack-ui, query, automation): stop teaching assigned_to / assignee as the record owner beside owner_id (follow-up of #33506)

1 participant