Skip to content

docs(skills): the data-hooks query example filters on owner_id, not a hand-named owner - #33726

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

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

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #33722

Clause-②: no
Metadata-protocol: none

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

维护者速读

  • 改了什么:objectstack-data 的 hooks 参考(references/data-hooks.md)里 ctx.api.object('task').find(...) 示例按负责人过滤时用的是自造的 owner 字段,改成平台注入的 owner_id;顺带把同一技能 eval 6 里「owner 是持有工单的人」这个自造负责人字段改名为 reviewer(与负责人无关的另一个角色),其考点 deleteBehavior 不变。
  • 为什么改:PR docs(skills): an owner, assignee or 负责人 in a request is the injected owner_id #33555 已规定负责人 = owner_id、不另造负责人字段;这个示例还在教另一套写法。实测:在没有 owner 字段的对象上,旧写法被拒(400 INVALID_FILTER),新写法正确返回。
  • 风险与回滚:只改技能示例文字、一个 eval 与一个 patch changeset,不碰 schema 与运行时;回滚即还原本 PR。token 上限未动(data-hooks.md 10004/10011)。
  • 先看:skills/objectstack-data/references/data-hooks.md 第 304 行;skills/objectstack-data/evals/objects-fields-relationships.json eval 6。
  • 两分钟验证:git grep -nE "owner: uid|is the agent who holds" -- skills/objectstack-data,预期零命中(退出码 1)。
  • 需要你做的:受管面(skills/**),席位的达档契约复审 PASS 记录在案后,按其档位落地(Tier H 请合并;低风险臂读作 Tier S 则由席位入队)。

What changes

File Where Was Now
skills/objectstack-data/references/data-hooks.md line 304, the ctx.api.object(name) query-shape block find({ where: { $and: [{ done: false }, { owner: uid }] } }) { owner_id: uid }
skills/objectstack-data/evals/objects-fields-relationships.json eval 6 prompt and expected_output owner "is the agent who holds it", a hand-named record owner as a required user field reviewer "is the lead who signs it off", a role apart from the owner
.changeset/33722-skills-data-hooks-owner-id-filter.md new '@objectstack/skills': patch

The data rule is not restated; the example only stops contradicting it (skills/objectstack-data/SKILL.md:313, Record owner row).

Sweep of skills/objectstack-data/** (order ruling 3)

git grep -nE "\b(owner|assigned_to|assignee)\b" over the bundle on main @ 48e6959, every hit read:

  • Fixed, data-hooks.md:304: the card's site.
  • Fixed, evals/objects-fields-relationships.json eval 6: the prompt named owner as "the agent who holds" the ticket, and the reference answer made it a required user field. That is the hand-named owner family: a model following SKILL.md:313 ("also when the request says assignee ... never a hand-added owner field") answers owner_id and contradicts this eval. The eval tests deleteBehavior on a user field, so the field is now reviewer, a handler the request names apart from the owner. Its assertions name no field and are unchanged; self-check: every must_contain literal is still in its expected_output, no must_not_contain literal is.
  • Correct, untouched: SKILL.md 77-87 (sharing-model prose about "the owner"), 296, 312-313, 373-378 (package owner of an extension), 406-442 (owner_id, queue claim, the assigned_to prohibition); examples-objects.md:88 (// assignee: the injected owner_id); rules/relationships.md 85-108, 369 ("never an owner field copied by hooks", owner_id); rules/security.md 84-85, 111-199 (owner_id policies, the owner membership tier); references/seeds.md:141; data-hooks.md 769-771 (owner_id); evals that forbid assigned_to/assignee: or expect owner_id (README:9; hooks-security-seeds-datasources 37, 57, 77-81, 127, 167, 177-191; objects-fields-relationships 123, 229-233, 298, 334-342).

Tests

Skill text and eval only: no package is touched, so no package test, typecheck or ablation is owed. The order asked for the filter shape the hook API on main really accepts, read off the runtime rather than the skill:

  • Code path: ctx.api.object(name).find(q) is ObjectRepositoryFacet.find (packages/objectql/src/engine-object-repository.ts:55), which spreads q into engine.find(objectName, { ...q, context }); where with $and is the engine's filter DSL.
  • Throwaway probe, deleted before commit (memory recipe: real ObjectQL, SqlDriver better-sqlite3, QuickJSScriptRunner, bindHooksToEngine, hook passed through HookSchema.parse; task rows u1/open, u1/done, u2/open), run with pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/sandbox/zz-probe-33722.test.ts after turbo run build --filter=@objectstack/runtime^... under the verify lock (VERDICT command-exit 0): exit 0, 2/2.
    • New line find({ where: { $and: [{ done: false }, { owner_id: uid }] } }) in a beforeInsert body: found = 1 (the one open u1 task).
    • Old line { owner: uid } on the same task (no owner field): the write is refused, mapDataError answers 400 INVALID_FILTER ("A filter on object 'task' names a column the database could not resolve ...").

Acceptance notes

  • uid stays an unbound name, as the block's other lines use bare id; binding it (ctx.user?.id) was not ordered and an undefined comparand is its own question.
  • Eval JSON is measured, not ratcheted.

Verification

  • Line and token budget: data-hooks.md 892 / 892 lines, 40013 / 40016 bytes, 10004 / 10004 tokens (ceiling 10011, untouched). Eval file 348 / 348 lines, 21847 / 21862 bytes. Package total, all skills/*/SKILL.md: 4588 lines and 236182 bytes before and after. check-skills-token-ratchet exit 0; check-skill-line-ratchet exit 0.
  • dispatch-gates --tier: MANDATORY claude-fable-5-2 (skills/**, clause ①, no one-line exit). This thread ran on the configured session model; the at-tier contract review is the seat's.
  • check-governed-merges.mjs --branch claude/project-thread-0h6njx: GOVERNED, skills/** ×2, +13 / -3 over 3 files, under the human-merge threshold; low-risk arm NOT MEASURED from a branch (fail closed to Tier H). The --pr reading is in the os-dev-report.
  • Derived gates (dispatch-gates --commands) on head 5744090, after turbo run build --filter=@objectstack/lint... --filter=@objectstack/formula...: 46 derived, 45 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: 46 accounted for, 45 run, 1 NOT-MEASURED, 0 UNRUN.
46 derived gates, 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-refs :: 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: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
  • Every family CI runs beyond the derived list: read off this PR's check-runs.

Generated by Claude Code

🤖 Generated with Claude Code

… hand-named owner

The ctx.api.object query-shape example in objectstack-data's data-hooks
reference filtered task on { owner: uid }, a hand-named owner field beside
the injected owner_id. It now filters on owner_id. The objectstack-data eval
on a required user field with deleteBehavior restrict named that field
owner (the agent holding the ticket); it now names a reviewer, a role apart
from the record owner.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nj2HhB4M8Anj58gqj
@github-actions github-actions Bot added 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: 574409099fb54ff329e8f8e3b274e27230f2ea63
Local-runs: none
Scope: skills/objectstack-data/evals/objects-fields-relationships.json, skills/objectstack-data/references/data-hooks.md + none

Inputs read: card #33722 (body and its three comments: triage, claim, os-dev-report), PR #33726 (body, file list of 3, net diff +13/-3 against main), the check-runs on the head. The diff holds no file that implements or enforces the two hits paths; the changeset is the lane seat's remainder. Code outside the diff was read, not reviewed: packages/objectql/src/engine-object-repository.ts, packages/drivers/driver-sql/src/sql-driver-read-exit-fault.ts, packages/spec/src/data/object.zod.ts (ownership), skills/objectstack-data/SKILL.md (lines 296-313, 406-442).

Check-runs on the head at review time, 39 listed: every completed run is success or skipped, none failed. Still in_progress when this record was written: Test Core (1/8), Test Core (2/8), Live E2E UI, Lint · CI, release & engine gates, Lint · ESLint, Lint · docs & code guards, Lint · repo & tooling gates, Type Check · debt ledger, Type Check · consumer gates, Type Check · workspace, Type Check · source gates. Completed green and relevant here: Check Changeset, Lint · PM dispatch-gates, Governed Surface Queue Guard, PR-body guards, Check PR Size. This PASS is the design verdict; it does not stand in for the runs still in flight, which the merging seat reads at their conclusion.

① Derived judgments

  • Accept-set: no change. The diff touches no schema, validator, gate or runtime file; nothing the platform accepts or refuses moves. Right.
  • Public surface: the published text of @objectstack/skills changes in two places. (a) references/data-hooks.md line 304, the last line of the ctx.api.object(name) query-shape block, filters task on { owner_id: uid } where it read { owner: uid }. (b) evals/objects-fields-relationships.json eval 6 names the required user field reviewer where it read owner, in the prompt and the expected output; its seven assertion literals are unchanged. Both right: each removes a hand-named owner that the Record owner row on main (SKILL.md line 313) forbids.
  • No other eval, rule or reference in the bundle changes; token and line budgets are answered by the ratchet check-runs, not re-measured here.

② Semver level

.changeset/33722-skills-data-hooks-owner-id-filter.md is '@objectstack/skills': patch, and the diff publishes skill prose and one eval fixture only: patch is the right level. The changeset body states what changed and no more; its 400 INVALID_FILTER sentence agrees with the SQL driver's refusal (unresolvableFilterColumnError, a filter naming a column the table lacks is refused, not answered empty).

Clause-②: no — the line is on the PR body and on the changeset, bare, and is right: no published schema, no accept-set or runtime behaviour changes, and nothing is narrowed.

③ Boundary flags

④ Design judgment

skills/objectstack-data/references/data-hooks.md — holds.

  • Against the hook API on main: ctx.api.object(name).find(q) is ObjectRepositoryFacet.find, which spreads q into engine.find(objectName, { ...q, context }); where with $and of two equality objects is the engine filter DSL the block's heading names. owner_id is the column ownership: 'user' (the default) injects, so on a default task the filter names a real column, where owner named none unless an author hand-added a second owner. The line now agrees with SKILL.md line 313 and with lines 769-771 of the same file.
  • Tried to break it: an object with ownership: 'org' or 'none' has no owner_id and the filter would be refused there; the example names a plain task and the skill teaches the default, so the example is true for what it shows. No finding.
  • The data rule is not restated, as the card ordered.

skills/objectstack-data/evals/objects-fields-relationships.json — holds.

  • Does eval 6 still test what its prompt asks: yes. The prompt asks for a required single-user field whose user cannot be deleted while referenced, and a multi-user field that drops a deleted member. The expected output answers type: 'user', required: true with deleteBehavior: 'restrict', and multiple: true with deleteBehavior: 'set_null'; every must_contain literal is in the expected output and no must_not_contain literal is. The subject under test (deleteBehavior on a user field) is unchanged.
  • Against the rule on main: a reviewer is the rule's own example of a person apart from the owner (SKILL.md lines 294-296 and the Approval row: "model only the people it references (approver, reviewer), as user fields beside the owner"). "Must always be set" is the request saying otherwise, so required: true is right. A model following the Record owner row no longer has a reason to answer owner_id and fail the eval, which was the old prompt's fault.
  • Label collision: none. reviewer and watchers collide with no injected label (Owner / 负责人, 创建人, 更新人, 创建时间, 更新时间) and not with each other.

Findings:

  1. nit — data-hooks.md line 304: uid is an unbound name. The dev left it as found, and the block's other lines use bare names too, so the diff introduces nothing. Now that the line reads "owned by the current user", binding it to ctx.user?.id (and saying what an absent user means) would make it copyable. Follow-up card or accepted deviation; not a correctness fault of this change.
  2. nit — eval 6 expected_output does not say the reviewer field grants no access. The Record owner row describes a handler field as one that grants no access; it states a property of the field, it does not oblige every answer that declares a user field to recite it, and eval 6's prompt asks nothing about access (eval 19 carries that sentence where the prompt is about the owner). No assertion depends on it. Left as an accepted deviation.
  3. nit, outside this diff and outside the card's bundle, a follow-up card — skills/objectstack-query/rules/filters.md line 179 on main still reads where: { owner: '{current_user_id}', ... }, the same hand-named-owner family. It is not in this PR's surface (skills/objectstack-data/**) and not in the file list of PR docs(skills): name the injected owner_id as the record owner in ui, query and automation examples #33720 either, so nothing in flight removes it. The dev report's out_of_scope_findings is empty; this one belongs there.

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

Implemented-by: claude/project-thread-0h6njx
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T08:16Z · 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 objectstack-fleet Bot mentioned this pull request Nov 15, 2026
2 tasks
@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 574409099fb54ff329e8f8e3b274e27230f2ea63 · card #33722 · report 6891539893 · at-tier contract review 6891576194 (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 #33722. skills/objectstack-data/references/data-hooks.md, skills/objectstack-data/evals/objects-fields-relationships.json, 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. 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 finds no access teaching in either hunk.
  • Judgment (from the record): the hook example filters on the injected owner_id through engine.find's real filter shape (the developer's probe: the new filter answers, the old { owner: uid } is refused 400 INVALID_FILTER); eval 6 still tests deleteBehavior on a user field, now named reviewer, with no label colliding with the injected Owner.
  • Gates: 46 derived, 45 exit 0, 1 NOT MEASURED locally (check:dual-build-cjs-loads, no package touched). Check-runs on the head: 44 total, 28 success, 16 skipped, 0 other.
  • Accepted deviation (nit): eval 6's expected output does not restate that reviewer grants no access.
  • Follow-ups: skills/objectstack-query/rules/filters.md still filters on a hand-named owner, and uid is unbound in the hook example: the one checklist card review follow-ups of PR #33726 #33730 (ruling B on pm/skills: one checklist card per reviewed PR for its review follow-ups, p3 copy nits into area loose-ends cards, and a dedupe step for retro reviews #33718).
  • Pre-landing check: ① same-head PASS 6891576194. ② check-runs as above. ③ K = 4 on the merge base; no commit on main since touches the PR's 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 08:32
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 8b6c145 Nov 15, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-0h6njx branch November 15, 2026 08:57
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>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…r id in the hook find example (objectstack-ai#34125)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JvBUHu5JZehUFbNWsJ7EFW)_

Fixes objectstack-ai#33730
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:两个已发布技能文档里的查询示例。filters.md 的会话令牌示例从 `owner` 改为平台的归属列
`owner_id`;data-hooks.md 的 `find` 示例先从钩子上下文取 `ctx.session?.userId` 绑定到
`uid`,取不到就提前返回,不再用未定义的变量。
- 为什么改:PR objectstack-ai#33726 复审指出这两个示例照抄会出错:`owner` 列平台并不提供,`uid` 是个未定义变量。
- 风险与回滚:只改文档示例和一个 patch changeset,不动代码;回滚就是 revert 本 PR。
- 先看:`skills/objectstack-data/references/data-hooks.md` 第 298–300
行,`skills/objectstack-query/rules/filters.md` 第 166 与 176 行。
- 两分钟验证:`node
scripts/check-skills-token-ratchet.mjs`,预期两个文件都在上限内(filters.md
2469/2473,data-hooks.md 10003/10011)。
- 需要你做的:无,席位落地。

## What changes

- `skills/objectstack-query/rules/filters.md`: the session-token example
now filters `owner_id: '{current_user_id}'`. `owner_id` is the
platform's provisioned ownership column
(`packages/objectql/src/registry.ts:1643-1649`, auto-added and stamped
to the acting user on insert by SecurityPlugin; the doc block at
`registry.ts:1334-1338` names it the canonical reassignable owner). The
tokens' own source uses the same example
(`packages/spec/src/data/context-tokens.zod.ts:27`). The surrounding
"Session tokens" paragraph still reads true and is unchanged.
- `skills/objectstack-data/references/data-hooks.md`: the `find`
example's unbound `uid` is now bound from the hook context before the
read: `const uid = ctx.session?.userId;` then `if (!uid) return;`, and
the `find` line itself is unchanged. The hook context names the caller's
id `HookContext.session.userId`
(`packages/spec/src/data/hook.zod.ts:1411-1412`: `session: z.object({
userId: z.string().optional(), …`), and the retired-roles prescription
at `hook.zod.ts:1617` says "read `ctx.session.userId` /
`ctx.session.isSystem`". Optional chaining because the same file teaches
that `ctx.session` is absent on system writes; the example returns early
when there is no id.
- `.changeset/33730-skills-query-hook-examples.md`:
`@objectstack/skills` patch.

## Tests

Docs-only diff; no test file is touched and no forced test edit exists.
No eval prompt is added: both edits correct an existing example and add
no new teaching.

Readings on origin/main `f81e4b6c` (before) and this head (after):

| File | Lines | Bytes | Tokens / ceiling |
|:--|:--|:--|:--|
| `skills/objectstack-query/rules/filters.md` | 209 → 208 | 9892 → 9876
| 2473 → 2469 / 2473 |
| `skills/objectstack-data/references/data-hooks.md` | 893 → 895 | 39960
→ 40011 | 9990 → 10003 / 10011 |
| Whole package, sum of all `SKILL.md` | 4596 → 4596 | — | — |
| Whole shipped bundle (ratchet total) | — | — | 246787 → 246796 |

No ratchet row moved. filters.md sat at zero headroom, so the 3 bytes of
the `owner_id` rename are paid in place: the Parameterised-tokens bullet
drops its third restatement of `{30_days_ago}` (the token keeps its
homes at line 71 and in the code example at line 157 of the same file).
Net, filters.md is 16 bytes smaller (9892 → 9876). data-hooks.md's two
new lines fit its existing headroom; nothing was cut there.

## Acceptance notes

- Authored by an isolated os-dev subagent pinned to the contract-review
tier on this branch, because this thread is served below the tier
`dispatch-gates --tier` mandates for `skills/**`; the thread did the
push, gates and relay. The seat agreed this route before the claim.
- The changeset body opens with the two declaration lines and carries no
title line.
- Review round 1 (contract review record 6900946687): the hook example
now reads the id first and returns early without one. A security item is
with the owner seat.

## Verification

All local readings are on head `2d1bc82e` (the round-1 commit on top of
`d057b5bc`, which is author commit `0c58bfe6` merged with origin/main
`385ea1cc`; origin/main has not moved since). Build closure under
`os-verify-lock`: `pnpm build` VERDICT command-exit 0 (13m14s), then the
packages main moved and their consumers (`...@objectstack/objectql`,
`...@objectstack/metadata-protocol`) rebuilt, VERDICT command-exit 0;
the round-1 commit touches only a skills file.

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derives the same 46 families on this head;
all 46 plus `check:skill-docs` and `check:skill-examples` ran, every one
exit 0. `--ran` reconciles: "46 derived famil(ies) accounted for — 46
run, 0 NOT-MEASURED (a DERIVED zero)".

<details><summary>Gate run on 2d1bc82 (48 commands, exit codes captured
before any pipe)</summary>

```text
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-refs :: 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 0
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: 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 run check:skill-docs :: exit 0
pnpm --filter @objectstack/spec run check:skill-examples :: exit 0
```

</details>

CI families are not re-run locally; read the PR's check-runs.

<!-- signed: domain:skills#2 · os-steve ·
session_01ADHkmPNsfEF3TsQJfFdSGv -->

---------

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-data): the data-hooks reference still filters task on a hand-named owner, not owner_id (follow-up of #33560)

1 participant