Skip to content

docs(skills): a stored computed field reads only its own row; name the cross-record and volatile-input warnings - #33589

Merged
os-zhuang merged 3 commits into
mainfrom
claude/project-thread-exyzbi
Nov 15, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/project-thread-exyzbi

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #32703

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

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:三处教 AI「把 formula 的 expression 挪到存储字段上」的技能文字,补上存储计算字段只能读本行字段:读关联记录的值(record.product.unit_price)停在本行上次写入时的值,会收到 stored-expression-cross-record-input 警告,应保持 formula(读时计算,不能汇总)或由关联对象上的 flow 写快照,留作存储的字段用 os migrate stored-expressions --object OBJECT --field FIELD --changed --apply 修复漂移;时钟(now()、today()、daysFromNow()、daysAgo())、当前用户、can()、hasCapability() 定格在写入时刻,收到 stored-expression-volatile-input 警告,要保持当前只能用 formula(时钟也可用定时 flow)。主句住 relationships.md → Computed column,另两处各一句指过去。
  • 为什么改:A stored field's expression that reads another record (record.lookup.field) goes stale silently when that record changes, and authoring does not warn (#32443 follow-up) #32529 / A stored field's expression that reads now() / today(), the current user or can() keeps the value of the write moment, while the same formula recomputes on read; authoring does not say so (#32443 follow-up) #32554 已经让平台在编写时对这两类输入发警告,技能文字没讲,AI 照着写出来就是警告后再改。
  • 风险与回滚:纯技能文字加一个 @objectstack/skills patch changeset,不动 schema、不动运行时;token 在同文件内删重复内容付清,没有抬任何上限;回滚即还原本 PR。
  • 先看:skills/objectstack-data/rules/relationships.md 的 Computed column 条目;其次 skills/objectstack-ui/rules/dashboards.md 的 Total over a computed value 条目(顺手把「existing rows stay empty … no hosted backfill yet」这句过时说法换成:发布没有填充的行用填充命令)。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,预期三个文件都绿(relationships 4127/4127、field-types 3206/3208、dashboards 6230/6232)。
  • 需要你做的:受管面 Tier H(skills/**):请批准或合并。

What changes

  • skills/objectstack-data/rules/relationships.md, Inline Editing, the "Computed column" bullet (the owner sentence): the stored computed field reads only its own row. A related record's value (record.product.unit_price) keeps what it held at this row's last write (warning stored-expression-cross-record-input), so it stays a formula (read time, not totallable) or a snapshot a flow on the related object writes; a field left stored is repaired with os migrate stored-expressions --object OBJECT --field FIELD --changed --apply (the command recomputes a stored expression; a flow-written snapshot declares none, and the backfill refuses it as --field). The clock (now(), today(), daysFromNow(), daysAgo()), the acting user, can() and hasCapability() are fixed at the write (warning stored-expression-volatile-input): a formula keeps them current, and for the clock a scheduled flow does too. The bullet's own "the engine computes a stored field's expression from the row the write stores and stores the result" is shortened to "the engine computes it from the row the write stores" so the new sentence can lean on it.
  • skills/objectstack-data/rules/field-types.md, the formula row: the stored field it points to is now "a stored field of its return type with the same expression (...) that reads only its own row (relationships.md → Computed column)".
  • skills/objectstack-ui/rules/dashboards.md, "Total over a computed value": "(computed and stored on write, from its own row only: objectstack-data → Relationships → Computed column; rows a publish did not fill: os migrate stored-expressions --apply)".
  • .changeset/32703-skills-stored-expression-input-warnings.md: '@objectstack/skills': patch, with both declaration lines.

One owner sentence plus two short pointers, not three full sentences, as the order allows (#31112, the lane does not duplicate rules).

Why

Read on origin/main 4bba8b8:

  • packages/lint/src/stored-expression-inputs.ts: STORED_EXPRESSION_CROSS_RECORD_INPUT = 'stored-expression-cross-record-input' and STORED_EXPRESSION_VOLATILE_INPUT = 'stored-expression-volatile-input', both severity: 'warning'. The cross-record message names three ways forward: make the field a formula (computed on every read, cannot be totalled), a snapshot field written by a flow on the related object, and the scoped repair os migrate stored-expressions --object OBJECT --field FIELD --changed --apply. The volatile message names the clock (now(), today(), daysFromNow(), daysAgo()), the acting user (current_user, user, ctx.user, os.user) and permissions (can(), hasCapability()).
  • packages/lint/src/rule-explanations.ts (both rules' os explain text): a warning, not a refusal; unscoped, --changed writes every row whose stored value differs (and a clock-reading field always does), which is why the skill spells the scoped command.
  • packages/cli/src/commands/migrate/stored-expressions.ts: fills stored computed fields on rows no write has computed since the field was declared (they hold NULL until each row is next written); --changed also recomputes values that differ. This is what made the dashboards bullet's "existing rows stay empty until rewritten, no hosted backfill yet" stale. A publish-mode save, a publish and a package publish fill existing rows at the change (packages/metadata-protocol/src/protocol-stored-expression-fill.ts; content/docs/deployment/cli.mdx says the command is for a definition changed in a repository and booted), so the bullet names the command for rows a publish did not fill, never "every existing row stays NULL".
  • Card pointer from domain:spec#3 (comment 6837754404): the platform warns, no 422; teach the warning, not a refusal. The text says "warning" at both rule ids and never "refused".

Acceptance notes

  • Token payment, in the same files, no ceiling moved. relationships.md was 4127/4127 and the Computed column bullet grew 377 to 979 bytes (+602, about 150 tokens); paid by deleting text an adjacent line or heading already says: in the line-item example the comments → drag-reorder, persisted (auto-hidden col) (the Sort field bullet), → catalog typeahead and the two ← auto-filled from product.* (the Catalog auto-fill bullet), computed, read-only, live (the Computed column bullet), and the parent's server roll-up of the line subtotal (the Computed column bullet's "so the parent summary can roll it up"); in the related-list section // title of the detail-page list (the relatedListTitle sentence under it), "(the same source the lookup picker uses)" and "(ADR-0085)"; in Incorrect vs Correct the // ObjectStack does not have native many-to-many type comment (its heading and the ❌ Not a valid field type comment say it); in the master_detail example // Delete line items when invoice deleted (the Delete Behaviors cascade row); the junction example's // Junction: Project Assignment between project and employee and the tree example's // Self-reference (their headings). field-types.md was 3208/3208: paid with the blockquote's "Source of truth: node_modules/@objectstack/spec/src/data/field.zod.ts." (home: skills/objectstack-data/references/_index.md line 13 carries that pointer). dashboards.md had 6 headroom: paid with three ADR-0021 asides ("(ADR-0021)", "(ADR-0021 single-form cutover)", "ADR-0021 D2" twice). No eval expected_output under skills/objectstack-{data,ui}/evals/ names any deleted fact (grepped). The → live Subtotal/Tax/Total stack comment stays: objectstack-ui/SKILL.md points to this section as the home of that behaviour.
  • The dashboards bullet's existing-rows clause is corrected in the same edit because this PR rewrites that parenthetical; it now names the fill command for rows a publish did not fill instead of saying there is no backfill.
  • No eval added: the order lists an eval as optional and the token budget is spent; the warning text itself ships in the lint finding and os explain.

Verification

Head d6f5eda4, base origin/main 4bba8b8. Review rounds: at-tier PASS 6887741759 on 68194c4 (S1 and nits fixed at 34db3fa), delta PASS on 34db3fa (S2 and N4 fixed at d6f5eda).

Line and token budget (skills/**)
  • skills/objectstack-data/rules/relationships.md: 399 to 406 lines, 16508 to 16507 bytes; token ratchet 4127 to 4127 (ceiling 4127, headroom 0).
  • skills/objectstack-data/rules/field-types.md: 247 to 246 lines, 12829 to 12821 bytes; 3208 to 3206 (ceiling 3208, headroom 2).
  • skills/objectstack-ui/rules/dashboards.md: 474 to 475 lines, 24902 to 24918 bytes; 6226 to 6230 (ceiling 6232, headroom 2).
  • Whole package, all skills/*/SKILL.md: 4597 lines, unchanged (no SKILL.md touched). Bundle total (whole shipped tree) 245076 tokens after (245074 before).
  • node scripts/check-skills-token-ratchet.mjs: exit 0. No ceiling raised.
Derived gates: 44 derived, 42 run green, 2 NOT MEASURED

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 44 families for the four paths; each was run with its exit code captured before any pipe, after pnpm exec turbo run build --filter=@objectstack/formula... --filter=@objectstack/lint... under the verify lock (VERDICT command-exit 0). Rerun on each head (68194c4, 34db3fa, d6f5eda) with the same verdicts; records /mnt/project-files/pm-orders/skills/32703-gates-ran.txt, -r2.txt, -r3.txt.

  • 42 exit 0, among them check-adr-0087-registration, check-empty-changeset, check-changeset-no-major, check-skills-token-ratchet (scan and --self-test), @objectstack/lint check:doc-formula-expressions, check:doc-authoring, check:nul-bytes, check:pm-governed-merges, check:pm-skill-id-lint, 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 exit 0 over the built packages only.
  • NOT MEASURED, exit 3 PREREQUISITE NOT MET (every package's dist/): check:dual-build-cjs-loads, check:lean-entry-closure. No package source is touched, so no full build was paid; CI builds and runs them.
  • --ran: "44 derived famil(ies) accounted for — 42 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 contract-review tier, skills/** under clause ① (the published catalog); no one-line exit for this surface.
  • node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-exyzbi: exit 3, GOVERNED, landing tier H (人合). 3 of 4 paths on the register (skills/**); the changeset is not. Size +42 / -25, under the 3000 threshold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5kq962ZC9pPopL7fjJ

…e cross-record and volatile-input warnings

Relationships -> Computed column owns the sentence: a related record's value
keeps what it held at the row's last write (stored-expression-cross-record-input),
so it stays a formula or a flow-written snapshot, repaired with
os migrate stored-expressions --changed --apply scoped by --object/--field;
now(), today(), the acting user and can() are fixed at the write
(stored-expression-volatile-input). field-types.md's formula row and
dashboards.md's total-over-a-computed-value bullet point to it; the
dashboards bullet names the existing-rows fill command. Paid in-file by
deleting example comments and asides that restate an adjacent bullet,
heading or references/_index.md.

Claude-Session: https://claude.ai/code/session_01FEkQ5kq962ZC9pPopL7fjJ
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: 68194c4da5b55969088ee7f43d6560582cf70f1d
Local-runs: none
Scope: skills/objectstack-data/rules/field-types.md, skills/objectstack-data/rules/relationships.md, skills/objectstack-ui/rules/dashboards.md + none

The diff is four files: the three hits and one changeset. No file in it implements or enforces the taught rules; the lint, its os explain text and the CLI were read on the PR base 4bba8b8f02f, not reviewed. The changeset is the lane seat's ACCEPT.

① Derived judgments

  • Accept set: unchanged. No schema, lint, runtime or CLI file is in the diff; nothing an author can write is newly accepted or refused. Right.
  • Public surface: the published skill text of @objectstack/skills changes in three rule files. One owner sentence (relationships.md, Computed column) and two pointers; no SKILL.md, no eval, no reference index touched. Right.
  • Severity taught: warning at both rule ids, never a refusal. Agrees with packages/lint/src/stored-expression-inputs.ts (both issues severity: 'warning') and with the card pointer 6837754404. Right.
  • Token ceilings: no ceiling file is in the diff, so none moved. Lint · docs & code guards, Lint · repo & tooling gates, Lint · ESLint, Check Changeset, Check PR Size, Governed Surface Queue Guard, PR-body guards, Build Core, Type Check · source gates, Type Check · workspace and Lint · CI, release & engine gates concluded success on this head.
  • Still in progress when this record was written, so not yet verdicts: Test Core (1/8), Test Core (2/8), Type Check · consumer gates. The seat reads them before it adopts this record; a text-only diff gives none of them a path to judge, but their conclusions are theirs.

② Semver level

'@objectstack/skills': patch matches what the diff publishes: teaching text for behaviour that already shipped, no new capability and nothing withdrawn. The package name resolves (packages/skills/package.json).

Clause-②: no. Holds: the diff changes no accept set and no served shape. Metadata-protocol: none holds for the same reason.

③ Boundary flags

  • open_questions: empty. Nothing to answer.
  • Deviation, one owner sentence plus two pointers instead of three full sentences: accepted. The card asks for the content in each place; a pointer to one owner delivers it and the lane does not duplicate rules.
  • Deviation, the dashboards existing-rows clause rewritten: judged in ④, holds.
  • Deviation, token payment by deleting restating comments and asides: judged in ④, no rule lost.
  • Deviation, no eval added: accepted, the order lists it as optional. The card has no eval prompt, so ④ judges the text against the card's ask and the code on main.
  • Deviations on the PR trailer and commit trailer are process, not contract; not judged here.
  • No escalation.

④ Design judgment

skills/objectstack-data/rules/relationships.md (the owner sentence). Read against stored-expression-inputs.ts, rule-explanations.ts (both explanations) and packages/cli/src/commands/migrate/stored-expressions.ts with packages/objectql/src/stored-expression-backfill.ts.

  • Holds: "keeps what it held at this row's last write" is the lint's own consequence. record.product.unit_price is a counted read (one hop through a lookup the example declares, not the hop's id). The two forward routes, a formula (read time, not totallable) and a snapshot a flow on the related object writes, are the finding's first two ways forward, in its words. The command line is the finding's third, flag for flag: --field depends on --object, --changed recomputes differing values, --apply writes. now(), today(), the acting user and can() are all counted volatile inputs and "fixed at the write" is the finding's consequence.
  • Tried to break it: "It reads only that row" is a rule for the author, not the engine's behaviour (the engine does read one hop, which is why the warning exists); the next clause says what happens when the rule is broken, so the sentence does not mislead. The bullet's standing advice "keep it stored so the parent summary can roll it up" does not collide: the example's amount reads record.unit_price, the line's own column, which Catalog auto-fill copies from the product.
  • should-fix (S1). "...or is a snapshot a flow on the related object writes; repair drift with os migrate stored-expressions --object OBJECT --field FIELD --changed --apply." The nearest reading is that the command repairs the snapshot's drift. It does not: a flow-written snapshot declares no expression, and the backfill refuses a --field that "is not a stored computed field" before it reads a row. The command repairs one thing only, a stored expression that already reads a related record and was kept, which is the lint's separate third way forward. The sentence has just told the agent not to keep that shape, so the repair clause has no subject. Name the subject, for example "a field left stored: repair its drift with ...". Five tokens of headroom remain in the file; the fix fits or pays in-file.
  • nit (N1). The volatile list is a subset: daysFromNow(), daysAgo() and hasCapability() are counted too. The sentence does not claim to be complete and it is the card's own list; the finding names the exact spelling when it fires.
  • nit (N2). No remedy is given for a volatile input (the finding says: a formula to show the current value, a scheduled flow to keep a stored one current). The card did not ask for it.
  • Cuts: the six example comments, the relatedListTitle comment, "(the same source the lookup picker uses)", "(ADR-0085)" and the many-to-many comment. Each fact still stands in the file or its named home: the Sort field, Catalog auto-fill and Computed column bullets; the relatedListTitle sentence; objectstack-data/SKILL.md line 97 for the lookup picker; the heading and the remaining comment for many-to-many. "typeahead" now lives only in objectstack-ui/SKILL.md, which is the section this one already defers to. No rule lost.

skills/objectstack-data/rules/field-types.md. The formula row's added "that reads only its own row (relationships.md → Computed column)" is a pointer to the owner and says nothing the owner does not. It holds. The cut "Source of truth: ...field.zod.ts" has its home at skills/objectstack-data/references/_index.md line 13. No rule lost.

skills/objectstack-ui/rules/dashboards.md.

  • "existing rows: os migrate stored-expressions --apply" is true of main: the command exists, its default run (no --changed) fills exactly the rows that hold a NULL the expression gives a value, and --apply is what writes. It is also the remedy rule-explanations.ts gives for this very pair ("until each is written again or os migrate stored-expressions --apply fills them"). The dropped "no hosted backfill yet" was stale and is a separate concern the new text does not claim: a save in publish mode or a publish now fills at the change (protocol-stored-expression-fill.ts, content/docs/deployment/cli.mdx), and the command is for a definition changed in a repository and booted.
  • The phrase "computed and stored on write" that VIRTUAL_FIELD_AGGREGATE_REMEDY carries is kept. The days_count example reads the row's own date fields, so it agrees with "from its own row only".
  • nit (N3). The clause no longer says the existing rows are empty until filled, so a total reads low; the command's presence implies it. And the command needs the database URL, while a publish-mode save needs nothing; neither is said. Follow-up material, not a defect.
  • Cuts: four ADR-0021 asides. Citations, not rules; the heading "Server-side date bucketing ... (ADR-0021)" and the example comment still carry the ADR. No eval expected_output names a deleted fact.

Findings: S1 should-fix; N1, N2, N3 nits. No must-fix. S1's fix moves the head and earns a delta review of the Computed column sentence.

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

VERDICT: PASS

Adopted by the seat 2026-11-15T02:08Z · 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

…latile input list and its remedy

Review should-fix: the repair command recomputes a field left stored that
reads a related record, never a flow-written snapshot (which declares no
expression). The volatile list names all four clock functions and
hasCapability(), and says a formula or a scheduled flow keeps it current.
The dashboards clause says existing rows stay NULL until the fill. Paid
with three example comments that restate their heading or table row.

Claude-Session: https://claude.ai/code/session_01FEkQ5kq962ZC9pPopL7fjJ
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: 34db3fa5a0f46bc335ee0da09c49f1f529334a2e
Local-runs: none
Scope: skills/objectstack-data/rules/field-types.md, skills/objectstack-data/rules/relationships.md, skills/objectstack-ui/rules/dashboards.md + none

At-tier delta review of 68194c4d to 34db3fa5 (the head that holds record 6887741759, PASS with S1 should-fix and nits N1 to N3). The delta touches relationships.md, dashboards.md and the changeset; field-types.md is byte-identical to the reviewed base, so its judgment in 6887741759 stands. The PR is still four files: the three hits and one changeset. No file in it implements or enforces the taught rules; the lint, its os explain text, the CLI and the metadata doors were read on the PR base 4bba8b8f02f, not reviewed. The changeset is the lane seat's ACCEPT.

① Derived judgments

  • Accept set: unchanged. No schema, lint, runtime or CLI file is in the diff. Right.
  • Public surface: published skill text of @objectstack/skills in two rule files moves again (one owner sentence, one parenthetical, three example comments removed). No SKILL.md, eval or reference index touched. Right.
  • Severity taught: warning at both rule ids, unchanged from the base and in agreement with packages/lint/src/stored-expression-inputs.ts. Right.
  • Token ceilings: scripts/check-skills-token-ratchet.mjs is not in the diff, so no ceiling moved (relationships 4127, field-types 3208, dashboards 6232). Lint · docs & code guards, Lint · repo & tooling gates, Lint · ESLint, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Check Changeset, Check PR Size, Governed Surface Queue Guard, PR-body guards, Build Core, Type Check · source gates, Type Check · consumer gates, Type Check · workspace and Type Check · debt ledger concluded success on this head.
  • Still in progress when this record was written, so not yet verdicts: Test Core (1/8) and Test Core (2/8). The seat reads them before it adopts this record.

② Semver level

'@objectstack/skills': patch still matches what the diff publishes: teaching text for behaviour that already shipped. The delta rewrote the changeset's prose only; the frontmatter and both declaration lines are unchanged.

Clause-②: no. Holds: no accept set and no served shape changes. Metadata-protocol: none holds for the same reason.

The changeset prose now carries the dashboards claim judged in ④ S2 ("they stay NULL until os migrate stored-expressions --apply fills them"); it lands in the package CHANGELOG and should follow whatever S2's fix says.

③ Boundary flags

  • open_questions: empty.
  • The dev report's deviations were answered in 6887741759; the delta adds none beyond the three further comment cuts, judged in ④.
  • The PR body still describes head 68194c4d (its What-changes text, its token readings 4122 and 6226, and its "Verification: Head 68194c4" line). Process, not contract; the tree is what was judged.
  • No escalation.

④ Design judgment

skills/objectstack-data/rules/relationships.md. Read against stored-expression-inputs.ts, both entries in rule-explanations.ts, packages/cli/src/commands/migrate/stored-expressions.ts and packages/objectql/src/stored-expression-backfill.ts.

  • S1, closed. "...or a snapshot a flow on the related object writes; repair a field left stored with os migrate stored-expressions --object OBJECT --field FIELD --changed --apply." The repair clause now has its subject: the stored expression that was kept, which is the lint's third way forward and the only thing the command accepts (the backfill refuses a --field that "is not a stored computed field"). It can no longer be read as repairing the flow-written snapshot. Flags agree with the CLI: --field depends on --object, --changed recomputes differing values, --apply writes.
  • N1, closed. The volatile list against the lint's own sets, member for member: CLOCK_FUNCTIONS is now, today, daysFromNow, daysAgo, all four named; PERMISSION_METHODS is can, hasCapability, both named; the acting user is named as a kind, which covers its four spellings (current_user, user, ctx.user, os.user) without listing them. Nothing named that the lint does not count, nothing counted that the sentence leaves out. os.org and label(), which the lint excludes, are not named.
  • N2, closed with one nit. "a formula or a scheduled flow keeps it current" is the finding's own remedy pair, and a scheduled flow is real (type: 'schedule' in flow.zod.ts, taught in objectstack-automation); an update by id recomputes every stored field of the row.
    • nit (N4). The lint scopes the second remedy: "to keep a stored value current as time passes, recompute it with a scheduled flow". That answers the clock. For the acting user and for can() / hasCapability() a scheduled write stores the flow's own identity (a schedule run has no trigger user and runs as system), never the reader's; only the formula answers those. The sentence attaches both remedies to all four inputs. The finding prints the scoped wording when it fires, and the formula half is right for every input, so no author is led to a wrong field. "it" also has no singular antecedent in its own sentence. Prose-face fix or follow-up.
  • Tried to break it: "stays a formula ... or a snapshot" now shares one verb where the base had "or is a snapshot"; it still reads as two alternatives. The command is spelled without --yes, which a non-interactive --apply needs; the lint and os explain spell it the same way and the CLI answers "Re-run with --yes", so it corrects itself.
  • Cuts in this delta, three example comments. // Delete line items when invoice deleted: the type table row ("Coupled (cascade delete)") and the Delete Behaviors table ("cascade | Delete all child records | Invoice → Line Items") carry it. // Junction: Project Assignment between project and employee: the heading "Many-to-Many: Junction Object" and the object's own name and two lookups carry it. // Self-reference: the heading "Hierarchical: tree (Self-Reference)" and the type table's tree row carry it. No eval or other skill file names any of the three strings. No rule lost.

skills/objectstack-data/rules/field-types.md. Not in the delta. Its pointer "that reads only its own row (relationships.md → Computed column)" still resolves to the owner sentence, which still opens with that rule. Holds.

skills/objectstack-ui/rules/dashboards.md.

  • should-fix (S2). "existing rows stay NULL until os migrate stored-expressions --apply". The N3 edit turned a pointer (the base read "existing rows: os migrate stored-expressions --apply") into a universal claim, and the claim is false on main for two of the three ways a row gets its value:
    • A save in publish mode, a publish and a package publish fill existing rows at the change, not opt-in (packages/metadata-protocol/src/protocol-stored-expression-fill.ts: PUT /api/v1/meta/:type/:name, POST .../publish, POST /api/v1/packages/:id/publish-drafts; the answer carries stored-expression-filled). content/docs/deployment/cli.mdx says so in the command's own row: the command "is for a definition changed in a repository and booted". On that door no row stays NULL.
    • A row is also filled by its own next write. The platform's wording keeps that half everywhere it states this limit: "hold no value until each is written again or os migrate stored-expressions --apply fills them" (rule-explanations.ts, and VIRTUAL_FIELD_AGGREGATE_REMEDY's jsdoc). The text on main before this PR had it too ("until rewritten").
    • Why it is more than a nit: the published skills also serve agents that author through the metadata door (objectstack-platform teaches PUT /api/v1/meta/...), and for a hosted tenant the command is not available at all (it needs the database URL). This PR removed "no hosted backfill yet" because it was stale; the replacement now tells that same reader the rows stay NULL until a command they cannot run, when the door has already filled them. The sentence is right only for a definition changed in a repository and booted.
    • Fix on the prose face, paid in-file (2 tokens of headroom): say which change the command is for, or restore the pointer shape. For example "existing rows a publish did not fill: os migrate stored-expressions --apply", or "after a repo change, existing rows stay NULL until rewritten or os migrate stored-expressions --apply". The changeset sentence follows.
  • "NULL" itself is right for a newly declared field or a former formula (the CLI description: "they hold NULL until each row is next written").
  • The rest of the bullet is unchanged from the reviewed base: "computed and stored on write" is kept, the days_count example reads the row's own fields.

Findings: S1 closed; N1, N2 closed; N3's fix opens S2 should-fix; N4 nit. No must-fix. S2's fix moves the head and earns a delta review of the dashboards parenthetical (and the changeset sentence that repeats it).

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

VERDICT: PASS

Adopted by the seat 2026-11-15T02:23Z · 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

…eps the acting user current

Review should-fix: a publish-mode save, a publish and a package publish fill
existing rows at the change, so the dashboards clause names the fill command
for rows a publish did not fill instead of saying every existing row stays
NULL. The volatile remedy says a formula keeps them current and a scheduled
flow answers only the clock.

Claude-Session: https://claude.ai/code/session_01FEkQ5kq962ZC9pPopL7fjJ
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: d6f5eda4935fd2ef683c848c459303699a788473
Local-runs: none
Scope: skills/objectstack-data/rules/field-types.md, skills/objectstack-data/rules/relationships.md, skills/objectstack-ui/rules/dashboards.md + none

At-tier delta review of 34db3fa5 to d6f5eda4 (the base holds record 6887893557, PASS with should-fix S2 and nit N4). The delta is five lines in three files: the volatile tail of the owner sentence in relationships.md, the existing-rows clause of the dashboards parenthetical, and the changeset's prose. field-types.md is byte-identical to the reviewed base, so its judgment stands. The PR is still four files: the three hits and one changeset. No file in it implements or enforces the taught rules; the lint, its os explain text, the CLI, the engine backfill and the metadata doors were read at this head, not reviewed. The changeset is the lane seat's ACCEPT.

① Derived judgments

  • Accept set: unchanged. No schema, lint, runtime or CLI file is in the diff. Right.
  • Public surface: published skill text of @objectstack/skills moves in two rule files (one clause each). No SKILL.md, eval or reference index touched. Right.
  • Severity taught: warning at both rule ids, untouched by the delta, in agreement with packages/lint/src/stored-expression-inputs.ts (both findings severity: 'warning'). Right.
  • Token ceilings: scripts/check-skills-token-ratchet.mjs is not in the PR's file list, so no ceiling moved (relationships 4127, field-types 3208, dashboards 6232). The ratchet runs in lint.yml, and every Lint job on this head concluded success (Lint · docs & code guards, Lint · repo & tooling gates, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Lint · ESLint, the three scoped Lint jobs, Lint & Repo Gates), so relationships at 4127 of 4127 is at the ceiling and not over it. Right.
  • Also success on this head: Check Changeset, Check PR Size, Governed Surface Queue Guard, PR-body guards, Build Core, the four Type Check jobs, TypeScript Type Check, Test Core (2/8), Test UI, Dogfood Regression Gate, Live E2E UI.
  • Still in progress when this record was written, so not yet verdicts: Test Core (1/8) and a second Check Changeset run (the first concluded success). The seat reads them before it adopts this record.

② Semver level

'@objectstack/skills': patch matches what the diff publishes: teaching text for behaviour that already shipped. The delta rewrote two sentences of the changeset's prose; the frontmatter and both declaration lines are unchanged.

Clause-②: no. Holds: no accept set and no served shape changes. Metadata-protocol: none holds for the same reason.

The changeset follows both fixes: "a formula keeps them current, and for the clock a scheduled flow does too" (N4) and "rows a publish did not fill are filled by os migrate stored-expressions --apply" (S2). Neither sentence says more than the skill text it summarises; the "stay NULL until" claim is gone from it.

③ Boundary flags

  • open_questions: empty.
  • The delta adds no deviation. It cuts nothing: every changed line is a rewording in place, so no rule could be lost to a token payment in this round.
  • The PR body now describes this head (What-changes text, readings 4127 and 6230, "Head d6f5eda"); the process note in 6887893557 is closed.
  • No escalation.

④ Design judgment

skills/objectstack-ui/rules/dashboards.md. Read against packages/metadata-protocol/src/protocol-stored-expression-fill.ts, packages/cli/src/commands/migrate/stored-expressions.ts, packages/objectql/src/stored-expression-backfill.ts and the command's row in content/docs/deployment/cli.mdx.

  • S2, closed. "(computed and stored on write, from its own row only: objectstack-data → Relationships → Computed column; rows a publish did not fill: os migrate stored-expressions --apply)". The universal claim is gone and the pointer shape is back, now scoped. Sentence against code:
    • A publish does fill: a save in publish mode, publishMetaItem and publishPackageDrafts fill existing rows at the change, not opt-in, including the bullet's own case ("turns a formula into one"). The clause no longer tells that reader the rows stay NULL.
    • Rows a publish did not fill exist, and the command is their remedy: a definition changed in a repository and booted (no door sees it), and rows the door reported under stored-expression-fill-incomplete, whose own remedy text names this command. Both are covered by the wording.
    • The flag set is right for the bullet's case. A field that was a formula has no column value, so existing rows are holes; --apply without --changed writes holes (owesWrite: a hole always, a stale value only under changed). A row its own next write already filled is not a hole and is left alone, so the clause is safe for the half the old text overclaimed.
    • "hosted" is no longer asserted either way. Right: the command needs the database, and the hosted author's rows are the ones the door filled.
  • Tried to break it. (a) "a publish" compresses three authoring doors (a publish-mode save is one of them) plus the history and delete doors that also fill; the clause is conditioned on the outcome (rows not filled), not on which door ran, so it stays true whichever door did or did not fill. (b) A repo author who never publishes: no publish filled their rows, so the clause applies, and the boot warns naming the field when a sample holds NULL. (c) An agent that runs the command after a door already filled: a dry run by default, nothing listed. No wrong field and no wrong action follows from any reading.
  • nit (N5). The clause is terse enough that a repo-only author has to infer that "no publish at all" is a case of "a publish did not fill". The headroom is 2 tokens and the boot warning and os explain carry the long form; accepted deviation or a follow-up, no fix owed on this head.
  • Outside the diff, read only: the cli.mdx row says a rollback or revert "does not fill", while protocol-stored-expression-fill.ts says those doors now fill (metadata-protocol: a rollback or revert that changes a stored computed field leaves existing rows unfilled (the save/publish doors fill since #32527) #32700). The skill sentence is true under either; the docs row is another lane's.

skills/objectstack-data/rules/relationships.md. Read against stored-expression-inputs.ts and the stored-expression-volatile-input entry in rule-explanations.ts.

  • N4, closed. "...are fixed at the write (warning stored-expression-volatile-input): a formula keeps them current (the clock: a scheduled flow too)." The lint's remedy pair, with its own scoping: "make it a formula field (not summable); to keep a stored value current as time passes, recompute it with a scheduled flow". The formula answers all four inputs; the scheduled flow is attached to the clock alone, which is the only input a system-run write can keep current (for the acting user and can() / hasCapability() a stored value is the writer's, per the explanation text). "them" now has its plural antecedent.
  • The rest of the owner sentence is byte-identical to the reviewed base: own-row rule, cross-record warning id, formula or flow-written snapshot, the scoped repair --object OBJECT --field FIELD --changed --apply, the six volatile names. Judgments S1, N1 and N2 in 6887893557 stand.
  • Token ceiling: the tail grew by a line and the file sits at 4127 of 4127, paid by nothing new in this delta (the base stood at 4122). No headroom is left; the ratchet's success on this head is the verdict that it is not over.
  • Tried to break it: "(the clock: a scheduled flow too)" could be read as "the clock is a scheduled flow"; the colon-pointer shape is the file's own idiom and the preceding clause fixes the subject. Not a finding.

skills/objectstack-data/rules/field-types.md. Not in the delta. Its pointer "that reads only its own row (relationships.md → Computed column)" still resolves to the owner sentence, which still states that rule first. Holds.

Findings: S2 closed; N4 closed; N5 nit (accepted deviation or follow-up). No must-fix, no should-fix. Nits alone end the round.

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

VERDICT: PASS

Adopted by the seat 2026-11-15T02:37Z · 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, held for the maintainer · head d6f5eda4935fd2ef683c848c459303699a788473 · card #32703 · report 6887682969 · at-tier contract review 6887741759 (PASS with should-fix S1 on 68194c4d), at-tier delta 6887893557 (PASS with should-fix S2 on 34db3fa5) and at-tier delta 6888043840 (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 #32703. Three skills/** rule files and one changeset (@objectstack/skills patch). GOVERNED, Tier H (skills/**). Clause-②: no; Metadata-protocol: none.
  • Should-fix closure: S1, the repair command now has its subject ("a field left stored is repaired with ..."), so it no longer reads as repairing a flow-written snapshot, which the backfill refuses as --field. S2, dashboards no longer says existing rows "stay NULL until migrate": it names the command for "rows a publish did not fill", true against protocol-stored-expression-fill.ts (a publish-mode save, a publish and a package publish fill at the change). N4, the volatile remedy matches the lint's scoping (a formula for every input; a scheduled flow for the clock).
  • Gates: 44 derived, 42 exit 0, 2 NOT MEASURED locally (check:dual-build-cjs-loads, check:lean-entry-closure, no dist/); token ratchet green, no ceiling moved (relationships 4127 of 4127). Check-runs on the head all concluded, none failing.
  • Accepted deviations (nits): N1 the volatile list in the sentence is the card's subset; N3 the dashboards clause does not say a total reads low until filled; N5 a repo-only author must infer that "no publish at all" counts as "a publish did not fill" (the boot warning and os explain carry the long form).
  • Follow-up: content/docs/deployment/cli.mdx still says a rollback or revert "does not fill", stale since metadata-protocol: a rollback or revert that changes a stored computed field leaves existing rows unfilled (the save/publish doors fill since #32527) #32700; carded as docs(cli): the os migrate stored-expressions row still says a rollback or revert does not fill (stale since #32700) #33612 (outside this diff, another lane).
  • 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 02:50
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 25febd3 Nov 15, 2026
54 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-exyzbi branch November 15, 2026 04:44
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…owner_id (objectstack-ai#33555)

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

Fixes objectstack-ai#33506

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

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:objectstack-data 技能的「Record owner」规则写明:需求里的负责人、处理人、assignee、owner
就是平台注入的 `owner_id`,不另建字段;只有需求明确区分「负责人」和另一位处理者时才加一个 `user`
字段,且标签不得与对象上任何可见字段重名(点名注入列 `owner_id` Owner/负责人、`created_by`
创建人、`updated_by` 更新人、`created_at`、`updated_at`),并说明它不授予访问权。快速模板里的工单示例去掉了
`assigned_to` 字段,新增 eval 19(工单应用 + 负责人)。
- 为什么改:staging 上 AI 搭建的工单应用多建了一个标签也叫「负责人」的 `assignee`
字段,表格两列「负责人」、看板重复显示,而只有 `owner_id` 决定记录可见性。技能里的快速模板正好教了一个 `assigned_to`
用户字段。
- 风险与回滚:只改对外发布的技能文字和一条 eval,无代码、无契约改动;`@objectstack/skills` patch。回滚即还原本
PR。
- 先看:`skills/objectstack-data/SKILL.md` 的 Record owner
行;`references/examples-objects.md` 快速模板的 `// assignee`
行;`evals/objects-fields-relationships.json` 的 id 19。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs | grep
objectstack-data/SKILL.md`,预期 `6657 tokens (ceiling 6665; headroom 8)`。
- 需要你做的:审阅并合并(`skills/**` 属 Tier H,需你亲手合并或授权批准)。

## What changes

All in `skills/objectstack-data/` (one owner file for the rule, two
cross-references, one eval):

- **`SKILL.md`, Relationship Patterns → Record owner row (the rule).**
The row already said "never a hand-added owner / person in charge
lookup". It now says the same `owner_id` answers a request's assignee,
负责人 or 处理人, and that a handler the request names apart from the owner is
a `user` field that grants no access, with a label no other visible
field carries, the injected columns included: `owner_id` (Owner, 负责人),
`created_by` (创建人), `updated_by` (更新人), `created_at` (创建时间),
`updated_at` (更新时间). The Field Type Selection bullet drops `assignee`
from its `user`-field examples so the two places no longer disagree.
- **`references/examples-objects.md`, Quick-Start Template
(cross-reference 1).** The `support_case` template declared
`assigned_to: { type: 'user' }` beside the injected `owner_id`: the
exact shape the staging build produced. It is replaced by the comment
`// assignee: the injected owner_id`.
- **`rules/field-types.md`, `user` row (cross-reference 2).** The
example list reads `(reviewer, watchers)` instead of `(assignee,
watchers)`; same byte count.
- **`evals/objects-fields-relationships.json`, eval 19** (and one README
phrase). The prompt asks, in Chinese, for a ticket app whose 负责人 can be
reassigned. It expects `owner_id` reused and must not contain
`assignee:`, `assigned_to:` or `label: '负责人'`.

The label set is measured, not guessed:
`packages/spec/src/data/injected-system-column-provenance.ts` defines
the injected columns (`owner_id` label `Owner`, not hidden;
`created_at`, `created_by`, `updated_at`, `updated_by` not hidden;
`organization_id`, `owning_business_unit_id`, `queue` hidden), and
`SYSTEM_FIELD_LABELS` in `packages/spec/src/system/i18n-resolver.ts`
serves their zh-CN labels (`owner_id` → 负责人, `created_by` → 创建人,
`updated_by` → 更新人, `created_at` → 创建时间, `updated_at` → 更新时间).

## Acceptance notes

- **No build check exists today.** `git grep` over `packages/lint/src`,
`packages/spec/src`, `packages/objectql/src` and `packages/cli/src` for
a duplicate- or colliding-label rule has no hit. The check is split to
objectstack-ai#33545 and is not touched here.
- **The objectstack-ui skill still teaches `assigned_to` as the owner
column.** `skills/objectstack-ui/rules/list-views.md` has `{ field:
'assigned_to', label: 'Owner' }` and a "mine" filter on `assigned_to`
(lines 53, 60, 101, 321), `rules/actions.md:44` uses it as a param, and
`evals/views-apps-actions-pages.json` eval 1 answers a prompt's "owner"
column with `assigned_to`. That is outside this order's surface (two
cross-references); reported to the seat as a follow-up.
- **Token payment, no ceiling raised.** `SKILL.md` is 6657 tokens
against its 6665 ceiling (6606 on the original base `e3f0cfd4`; 6665 on
today's `main`, after objectstack-ai#33458's `aiReadable` row spent the headroom round
1 had used). The new text costs about 82 tokens, all paid by deleting
restatement in the same file: the `(maintainer ruling 2026-08-13)`
aside; the `(ADR-0113)`, `(ADR-0061)`, `ADR-0120` and `(ADR-0146 D10)`
asides; the line "Toggle system behaviours per object:" that restates
its heading; the `ObjectExtensionSchema` and
`PermissionSetSchema.objects.*` schema pointers (`references/_index.md`
already points at `object.zod.ts` and `permission.zod.ts`); the internal
constant name `BASE_FIELD_DISPLAY_WHITELIST`; "See rules/validation.md
for all types and examples." (the Quick Reference list links it); and a
shorter new sentence. No eval expects any of the deleted text.
- **Round 2 merge (`4fccfc87`, `origin/main` `7f0e38a2`).** objectstack-ai#33586 added
its own eval 18 to `objects-fields-relationships.json`; main's file is
kept whole and this PR's eval follows unchanged as id 19. objectstack-ai#33589's
`field-types.md` lines are intact; this PR's diff there is still only
the `user` row's example word.

## Verification

Changed: 6 files, +40 / -19 (head `a2d3008d`). `dispatch-gates --tier`:
`Model tier — MANDATORY: claude-fable-5-2` (`skills/**`, no one-line
exit). `check-governed-merges --branch`: GOVERNED, Tier H (5 of 6 paths
on the register; the changeset is not), 59 changed lines, under 3000.
Changeset: `.changeset/33506-skills-owner-id-for-assignee.md`,
`'@objectstack/skills': patch` (`skills/**` ships in `dist/skills`).

Readings against today's `main` `7f0e38a2` (lines, then tokens; the
gate's count, which leaves out the release-stamp line):

| File | Lines before → after | Tokens before → after (ceiling) |
|:--|:--|:--|
| `skills/objectstack-data/SKILL.md` | 478 → 473 | 6665 → 6657 (6665) |
| `skills/objectstack-data/references/examples-objects.md` | 191 → 191 |
1723 → 1724 (1728) |
| `skills/objectstack-data/rules/field-types.md` | 246 → 246 | 3206 →
3206 (3208) |
| `skills/objectstack-data/evals/objects-fields-relationships.json` |
332 → 348 | eval fixture, not ratcheted |
| All `skills/*/SKILL.md` together | 4593 → 4588 | 59058 → 59050
(`ceil(bytes / 4)`, stamp lines included) |

<details><summary>47 derived gate families on a2d3008 (round 1 on
0249dda, same list and verdicts): 46 exit 0, 1 NOT MEASURED; `--ran`
reconciliation 47 / 47</summary>

Closure built first under the verify lock: `turbo run build
--filter=@objectstack/lint... --filter=@objectstack/client-react...`,
`VERDICT command-exit 0`.

```
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/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: 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:gitlink-declared :: 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:watch-hint-literal :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm --filter @objectstack/spec run check:skill-docs :: exit 0
pnpm --filter @objectstack/spec run check:skill-refs :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 3
pnpm check:lean-entry-closure :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
```

`check:dual-build-cjs-loads` exit 3 is PREREQUISITE NOT MET (it reads
every package's `dist/`; no package is touched, so no full build is
owed): NOT MEASURED here, CI runs it. Outside the derivation, the edited
`os:check` block was verified with `pnpm --filter @objectstack/spec run
check:skill-examples` :: exit 0.

</details>

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

https://claude.ai/code/session_01FEkQ5ocBJgBm6Bz2yqoibS

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

---------

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

3 participants