Skip to content

fix(spec,lint): os lint reports an omitted cbp master required on the default defineStack door - #34020

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-76da2l
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-76da2l

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #33940
Clause-②: yes
Metadata-protocol: none

维护者速读

  • 改了什么:默认(strict)defineStack 解析时,如果作者在 controlled_by_parent 对象的 master_detail 上没写 required,spec 会在解析后的字段上悄悄记一笔“作者省略了”;os lint 的 relationship/master-detail-required 读这笔记录,在默认写法下也报 error。
  • 为什么改:裁决 A(controlled_by_parent admits an optional master (1/3): spec, lint and the read owner branch: a null-master detail row is readable by its owner only #30905,记录 6687830530)放行可选主字段,同时承诺 os lint 对省略写法报错;但默认 strict 解析先把省略填成 false,lint 永远看不到,迁移说明那句话在最常见的写法下是假的。
  • 风险与回滚:解析结果不变(仍是 required: false,可选主字段),栈照常加载,os validate / os build 不变;只是 os lint 在这一种写法上多报一条 error。回滚即 revert 本 PR。
  • 先看:packages/spec/src/data/master-detail-required-omission.ts(记录与读取),packages/spec/src/stack.zod.ts 中 recordMasterDetailRequiredOmissions 的调用,packages/lint/src/data-model-rules.ts 中 optionalMaster 那一行。
  • 两分钟验证:在示例应用副本的默认 defineStack({ … }) 里加一个 cbp 对象,唯一的 master_detail 不写 required,跑 os lint --json:应 exit 1,报 relationship/master-detail-required 在 .required;改成 required: false 后应 exit 0。
  • 需要你做的:无,席位落地。

What changes

  • @objectstack/spec — new module src/data/master-detail-required-omission.ts. After a strict defineStack parse succeeds, recordMasterDetailRequiredOmissions(normalized.objects, data.objects) stamps a non-enumerable, non-writable Symbol.for('objectstack.field.masterDetailRequiredOmitted') on each parsed master_detail field of a controlled_by_parent object whose authored definition writes no required. The one published reader is masterDetailRequiredOmitted(field) (@objectstack/spec/data); the stamp is internal (not re-exported), mirroring stack-provenance.ts. The parsed value is untouched (required: false), so the ruled reading (option A: the omission is admitted as the optional master) holds at every runtime reader, and nothing refuses the stack.
  • @objectstack/lint — cbpMasterReferenceFinding (R2) treats a sole master_detail as the optional master only when required === false AND the field does not carry the record. On the default door the omitted spelling now gets the same finding, path and fix it already got on { strict: false } and on a raw config.
  • Why on the field, not the stack: loadConfig (packages/cli/src/utils/config.ts) spreads the default export into a new object, which drops a stack-level symbol (that is why it reads stackConversionsOf before the spread). The objects array and each field reach lintDataModel by reference, so a field-level record needs no packages/cli change and no second load of the user's module. Measured: composeStacks (error / override / merge) keeps the record on the composed field too.
  • Regenerated: packages/spec/api-surface/data.json, packages/spec/export-origins/data.json (one added export each).
  • Fix of text this change made false: docs/qa/platform-checklist/areas/cli.json, item cli.validate-v18-authoring-verdicts. Revision 4 (PR docs(qa): name the strict:false door for the os lint arm of cli.validate-v18-authoring-verdicts #33929, merged into main while this card was in flight) moved the item's os lint arm to { strict: false } and said the default strict door gives os lint exit 0 with no finding. That is no longer true, so revision 6 (stacked on main's revision 5, PR docs(qa): cover the #33761 ledger gaps and name --reporter=tree for per-file pin scoring #34068, which only adds --reporter=tree to acceptance[0].verify) moves steps[2] and acceptance[3] back to the default door, states that the default door reports only relationship/master-detail-required (not security-controlled-by-parent-no-relation, because the parsed field is the optional master the runtime derives access from) and keeps { strict: false } as the second door. No other clause changed.
  • Docblocks touched: data-model-rules.ts (R2 header), controlled-by-parent-master.ts (module header). The semantic entry cbp-optional-master-admitted is unchanged: its sentence "os lint reports the omission at error" is now true on the default door, which was the seat's call (fix the reach, not the prose).

Why

The maintainer ruling on #30905 (record 6687830530), option 「A 放行为可选主字段(推荐)」, keeps the omitted required readable as the optional master at the parse and pairs it with the lint: "os lint errors on the omitted spelling". The published entry repeats that promise. On the ordinary authoring door it did not hold (measured on #33842 / PR #33929).

Tests

New, no existing assertion edited (no forced test edits):

  • packages/spec/src/data/master-detail-required-omission.test.ts (7 cases): strict defineStack records an omitted required on the sole master and on a second master_detail beside a required one; nothing for explicit false / true, for another sharing model, for a lookup, for { strict: false }, or for a bare ObjectSchema.safeParse; the record is invisible to Object.keys, JSON.stringify and FieldSchema, and a copy drops it.
  • packages/lint/src/data-model-rules.master-detail-required.test.ts, new top-level describe (4 cases) over stacks a real defineStack built: omitted → one error at .required with both spellings; CONTROLS explicit false and true → clean; { strict: false } → the same finding as before; a copied field → clean (the pre-record reading).

Ablations (each committed first, mutated through scripts/ablation-replace.mjs, rebuilt, ablation-dist-preflight hit, then restored with blob == HEAD and rebuilt with the marker absent from dist):

  • A1, lint stops reading the record: lint unit the sole master_detail without required turns red (1 failed / 33 passed); the CLI on the default door reads os lint exit 0, passed true, 0 R2 findings (the defect).
  • A2, defineStack stops stamping: spec unit 3 failed / 4 passed (src), lint unit 1 failed / 33 passed (spec dist), CLI default door os lint exit 0 with 0 R2 findings.

Acceptance notes

  • Clause-②: yes differs from the claim's expected no: the diff adds one public export, masterDetailRequiredOmitted on @objectstack/spec/data, and the spec lane charter counts any widening of the public surface as Clause ②. No parse accept set moves, so Metadata-protocol: none and patch changesets.
  • On the default door only R2 fires; security-controlled-by-parent-no-relation does not, because the stack the runtime loads really does derive the optional master from the parsed false. On { strict: false } both fire, as before.
  • Not reached by design: the save door and a bare ObjectSchema.safeParse record nothing (neither runs os lint); ObjectSchema.create() still forces an omitted required to true.
  • The record lives in packages/spec as a declared producer record beside the provenance mark, not as business logic: it states what the author wrote and nothing reads it at runtime.
  • pnpm --filter @objectstack/spec check:generated exits 1 at Node's default heap in this container: its check:test-typecheck leg's tsc dies without diagnostics. At NODE_OPTIONS=--max-old-space-size=6144 (the heap lint.yml sets for the ledger re-measure) it exits 0 with all 14 artifacts current, and check:test-typecheck alone reads OK (52 files / 240 errors / 131 pinned signatures held).

Verification

Verification head: 7e6f3db1 (main ea6de745 merged in via scripts/pm/os-regen-merge.sh). That merge had one conflict, docs/qa/platform-checklist/areas/cli.json item cli.validate-v18-authoring-verdicts: PR #34068 had meanwhile taken revision 5 on the same item. Resolution: main's revision 5 row and its acceptance[0] edit are kept as written; this PR's row is renumbered to revision 6 and the item's revision set to 6. Apart from those two numbers the PR's diff is byte-identical to the one verified at 6e1439cc (per-file hunks of git diff e71ecc1b d468bb80 and git diff ea6de745 7e6f3db1 match in 10 of 11 files; cli.json differs only in "revision": 5 → 6 on the item and the row). Re-read at 7e6f3db1 after pnpm install --frozen-lockfile, rm -rf packages/runtime/.objectstack and a full ./packages/** rebuild under the verify lock: check:generated exit 0 at heap 6144 (all 14 artifacts current), spec test 844 files / 26973 tests passed, lint test 212 files / 9030 tests passed, check:platform-checklist exit 0 (16 areas, 433 items). The readings below were verified at 6e1439cc (main b4ce310b merged in via scripts/pm/os-regen-merge.sh; no conflict, the regen chain found nothing to rewrite). Re-read at 6e1439cc after pnpm install --frozen-lockfile, rm -rf packages/runtime/.objectstack and a full ./packages/** rebuild under the verify lock: check:generated exit 0 (all 14 artifacts current), spec test 843 files / 26968 tests passed, lint test 212 files / 9030 tests passed, the four end-to-end readings below unchanged, and the 96 derived gates all exit 0 at heap 6144 (--ran: 96 run, 0 NOT-MEASURED). CI on 6e1439cc: every check-run completed, all required contexts success. The readings below were first taken at eb7616fe (main 0ac112fc merged in), with the same results.

End to end: the #33929 reproduction and its controls (scratch copy of examples/app-todo, CLI from the tree)
=== sole master_detail, required omitted, default strict defineStack
os lint --json exit 1   passed false
   error relationship/master-detail-required at objects[2].fields.hdr.required
os validate --json exit 0
os build exit 0
=== required: false, default door
os lint --json exit 0   passed true
os validate --json exit 0
os build exit 0
=== required: true, default door
os lint --json exit 0   passed true
os validate --json exit 0
os build exit 0
=== required omitted, defineStack(..., { strict: false })
os lint --json exit 1   passed false
   error relationship/master-detail-required at objects[2].fields.hdr.required
   error security-controlled-by-parent-no-relation at objects[2].sharingModel
os validate --json exit 0
os build exit 0

Base reading (#33929, at 895783a): the first case gave os lint --json exit 0 with no finding. The shipped examples app-crm and app-todo lint with no R2 finding (their cbp masters are built by ObjectSchema.create(), which writes required: true); app-showcase's config could not load here (its connector-slack dist is not in the CLI closure), and its two cbp masters are ObjectSchema.create() with required: true in source.

Package tests and typecheck (under the verify lock)
pnpm --filter @objectstack/spec test        Test Files 843 passed (843)   Tests 26968 passed | 1 todo
pnpm --filter @objectstack/lint test        Test Files 212 passed (212)   Tests 9030 passed
pnpm --filter @objectstack/spec typecheck   VERDICT command-exit 0
pnpm --filter @objectstack/lint typecheck   VERDICT command-exit 0
pnpm --filter @objectstack/cli exec vitest run --project unit   Test Files 422 passed (422)   Tests 6002 passed

The cli integration layer is declared to CI (no spawn entry or integration file touched).

Derived gates (dispatch-gates --commands at eb7616f, re-run at 6e1439c)

96 derived families, 96 run, reconciled with --ran: "96 run, 0 NOT-MEASURED (a DERIVED zero)". 95 exited 0 at the default heap; check:generated exited 1 there (the out-of-memory tsc above) and 0 at the CI heap of 6144, which is the line reconciled. check:platform-checklist exit 0 (16 areas, 429 items). check:dev-prereqs (local-only family): NOT MEASURED, 34 ui/ packages unbuilt in this container.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic (the record is a producer stamp beside the provenance mark; nothing reads it at runtime).
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint is CI's.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.

… default defineStack door

defineStack records, on the parsed field it returns, that the author
omitted `required` on a controlled_by_parent object's master_detail
(the parse writes `false` there first). relationship/master-detail-required
reads the record, so the omitted spelling is reported on the default strict
door as it already was on { strict: false } and raw configs. The parsed
value and every runtime reading are unchanged.

Claude-Session: https://claude.ai/code/session_01ADHkmSUpRcnYp68V8zPYaB
Co-authored-by: Claude <noreply@anthropic.com>
… back to the default defineStack door

The omitted required on a cbp object's sole master_detail is now
reported by os lint on the default strict door; rev 4 said it was not.

Claude-Session: https://claude.ai/code/session_01ADHkmSUpRcnYp68V8zPYaB
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:data tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/lint, @objectstack/spec, touching 8 documentable anchor(s). ⚠️ 4 changed file(s) yielded no anchor (packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, packages/spec/src/data/controlled-by-parent-master.ts, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

16 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 0d1443d0bf7560a6be9a1a7be8012db26159baa4.

⛔ 11 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 4 changed file(s) yielded no anchor (packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, packages/spec/src/data/controlled-by-parent-master.ts, …) — pages documenting those are invisible to this run
  • 1 anchor(s) matched too much of the corpus to be a work list: master_detail (literal, 45 pages)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 0d1443d0bf7560a6be9a1a7be8012db26159baa4 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 97f6814cf6fe5158d5204430de53c07504d9f88c — the merge of head 7e6f3db193e37290d890a922c478eb687ad709f5 into base 0d1443d0bf7560a6be9a1a7be8012db26159baa4, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 97f6814cf6fe5158d5204430de53c07504d9f88c && git checkout 97f6814cf6fe5158d5204430de53c07504d9f88c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0d1443d0bf7560a6be9a1a7be8012db26159baa4 7e6f3db193e37290d890a922c478eb687ad709f5 && git checkout -B drift-repro 0d1443d0bf7560a6be9a1a7be8012db26159baa4 && git merge --no-ff 7e6f3db193e37290d890a922c478eb687ad709f5

node scripts/docs-audit/affected-docs.mjs --json 0d1443d0bf7560a6be9a1a7be8012db26159baa4

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 0d1443d0bf7560a6be9a1a7be8012db26159baa4 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract-review-claim: session_01ADHkmQjrEpxMVxEiDUJHqC · head eb7616f · 2026-11-15T16:30Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: eb7616fe92454e0f91fbeabddb36e457ce2cc8de
Local-runs: none
Scope: packages/spec/src/data/controlled-by-parent-master.ts, packages/spec/src/data/index.ts, packages/spec/src/data/master-detail-required-omission.ts, packages/spec/src/stack.zod.ts + packages/lint/src/data-model-rules.ts

Read: card #33940 (body and all 6 comments, dev report 6897644993), ruling record 6687830530 on #30905, closed card #31470 and merged PR #31523, PR #34020 (body, 11 files, net diff against the merge base), and the head's check-runs. The ledgers packages/spec/api-surface/data.json and packages/spec/export-origins/data.json were read as the surface the hits files move. The remainder (two test files, the changeset prose, docs/qa/platform-checklist/areas/cli.json) is the lane seat's ACCEPT at TIER_DEFAULT.

Check-runs on this head at review time. Completed, success: Check Changeset, Lint · repo & tooling gates, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · ESLint, Lint · PM dispatch-gates, the three scoped Lint runs, Lint & Repo Gates, Type Check · source gates, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Check Documentation Links, Dogfood Regression Gate, Build UI Deps. Still in progress, so NOT yet a verdict: Build Core, Test Core 1/8 to 8/8, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Type Check UI, Test UI 1/16 to 16/16, Build & E2E UI, Live E2E UI. This PASS is the design verdict; it does not stand in for those runs, and the seat lands only on their green.

① Derived judgments

  • One new public export, masterDetailRequiredOmitted (function) on @objectstack/spec/data: RIGHT. Both ledgers gain exactly that one row, and data/index.ts uses a named re-export, so the stamper recordMasterDetailRequiredOmissions stays off the published surface (the package exports map offers no deep path into src/data).
  • Parse accept set: UNCHANGED, right. The stamp is applied after ObjectStackDefinitionSchema.safeParse succeeds; no schema, refinement or refusal moves. required stays the parsed false, so controlledByParentMasterOf, the security plugin, os validate, os build and the compiled artifact read the optional master exactly as ruling A has it.
  • A non-enumerable, non-writable, non-configurable Symbol.for('objectstack.field.masterDetailRequiredOmitted') property on parsed fields: RIGHT as a derived surface. It is invisible to Object.keys, JSON.stringify, structured clone, spread and the strict FieldSchema; no source under packages/*/src walks symbol keys (Reflect.ownKeys, getOwnPropertySymbols: zero hits), so no data reader sees a new key.
  • os lint accept set: NARROWS on one spelling, right and intended. A default strict defineStack stack whose cbp master_detail omits required on the sole master now gets relationship/master-detail-required at error (exit 1) where it got exit 0. That is the verdict ruling record 6687830530 states ("os lint errors on the omitted spelling") and the published entry cbp-optional-master-admitted already promises; explicit false and true still lint clean. lintDataModel has one caller (packages/cli/src/commands/lint.ts), so no publish verdict moves.

② Semver level

patch on @objectstack/spec and @objectstack/lint is right: both packages are moved by the diff, and AGENTS.md ships a non-protocol change, widening included, as patch. Clause-②: yes is right (one added public export; the claim was corrected to yes in 6897655754 and 6897667140) and carries no arm, which is well formed. Metadata-protocol: none is right: nothing an author can write is added, refused or re-read by the parse; the new finding is a lint verdict the entry already declared, and the changeset body states it in plain words for a project whose CI runs os lint. Both lines are in the PR body and the changeset, and Check Changeset is green on this head.

③ Boundary flags

  • open_questions, the reader's public name: answered, A, masterDetailRequiredOmitted as shipped. The record is stamped only on master_detail fields of controlled_by_parent objects, and the name carries that scope; B and C would read as a general per-field fact the producer does not record.
  • Deviation, Clause-②: yes where the claim expected no: accepted, correct (see ②).
  • Deviation, the checklist row cli.validate-v18-authoring-verdicts rev 4 to 5: accepted. PR docs(qa): name the strict:false door for the os lint arm of cli.validate-v18-authoring-verdicts #33929 wrote "default strict door, os lint exit 0"; this diff makes that sentence false, so correcting it in the same PR is owed, and the claim 6897667140 names the file. The row itself is the lane seat's at TIER_DEFAULT.
  • Deviation, no assignee on the PR: the seat's to set; not a contract matter.
  • Deviation, check:generated reconciled at the 6144 heap: accepted as a container limit; the CI verdict is Lint · repo & tooling gates, green on this head.
  • Security: no hits path is under skills/** or ui/skills/**; no security label is owed by this record.
  • Not escalated: nothing here needs a maintainer decision. The seat's call (fix the reach, not the prose) is the reading ruling A itself gives.

④ Design judgment

No must-fix, no should-fix.

Against the ruling. Record 6687830530, option A: the raw parse reads an omitted required as the optional master, and os lint errors on the omitted spelling. The first half is untouched (the value stays false, nothing is refused). The second half was false on the default door and is made true by the only party that holds both the authored and the parsed field, buildDefinedStack. This keeps #31470 / PR #31523's reading (B there: do not refuse the omission at the parse) rather than reversing it.

Tried to break the stamp on every path between defineStack and lintDataModel, reading the head tree:

  • buildDefinedStack: normalized is the post-normalization authored input; the D2 conversion cbp-master-detail-required-defaulted is retiredFromLoadPath, so it does not write required into it first. Map-form objects keep order through normalizeMetadataCollection, and the stamper also matches by name, so a misaligned pair is skipped, never mis-stamped. zod builds new field objects, so the author's own literals are not mutated. Field.masterDetail() writes no required, so the helper spelling is recorded too; ObjectSchema.create() has already forced true, so it is not.
  • mergeActionsIntoObjects after the stamp: copies the object ({ ...obj, actions }), keeps the fields map and each field by reference. Holds.
  • loadConfig spread: top level only. Holds, and it is the reason given for field-level placement; that reason is true in packages/cli/src/utils/config.ts.
  • os lint's second normalizeStackInput: array pass-through plus copy-on-write conversions that have nothing left to convert on a parsed stack. Holds.
  • authoringRuleUnionStack: identity, or a fold that reuses the item references. Holds.
  • composeStacks: one stack is returned by identity; mergeObjects builds fields: { ...existing.fields, ...obj.fields }, field references kept. Holds.
  • structuredClone, a JSON round trip, the compiled artifact, the save doors, a bare ObjectSchema.safeParse: the record is absent and the field reads as the explicit optional master, which is what every door read before this PR. Fails toward no new finding and no refusal; stated in the module header and pinned by a test.
  • defineStack({ strict: false }): no stamp, the key is still absent, the rule reports it as before.
  • Two copies of the package (CLI and project): Symbol.for reads the same key. An older project copy writes no record and gets the pre-record reading.

Declared contract or side channel. Declared: the reader is a named, ledgered export with a module header that states producer, reader, placement and fail direction; the sole consumer imports it rather than re-deriving the symbol; and the shape follows two standing precedents (stack-provenance.ts, filter-subtree-provenance.ts, both Symbol.for, non-enumerable). It is no consumer-side dialect in the AGENTS.md sense: the consumer is the author-time linter, the producer writes the fact, and no runtime reader tolerates anything new. Nothing else in the platform reads the parsed value differently: the reader has one call site.

Per file:

  • packages/spec/src/data/master-detail-required-omission.ts: holds. Reader and stamper agree with the header sentence by sentence, except the nits below.
  • packages/spec/src/stack.zod.ts: holds. The call sits after a successful parse and before the later judgements, on the strict path only; the comment is exact.
  • packages/spec/src/data/index.ts: holds. Named export of the reader only; comment exact.
  • packages/spec/src/data/controlled-by-parent-master.ts: holds. The added sentence is true, including "nothing here reads that record".
  • packages/lint/src/data-model-rules.ts (implementing): agrees. optionalMaster now needs required === false and no record; a stamped sole master falls into missingRequired and eitherSpelling, so message ("declares no required: write true ... or false ..."), path (.required) and fix are the ones the raw door already gave. A stamped second master_detail is judged as before (it was already reported at false).

Nits (no effect on correctness or on the ruled contract; prose-face fix or a follow-up card, not a head move):

  • N1 (nit): master-detail-required-omission.ts header, "so no third party can attest an authored spelling it never saw". Symbol.for is the global registry, so a third party can write the key; what is true is that the stamper is not published. The only thing a forged record earns is a lint error on the forger's own field. Same wording limit as the stack-provenance.ts precedent.
  • N2 (nit): data-model-rules.ts docblock, "This rule sees the omission on every stack os lint loads" is wider than the next sentence, which correctly excepts a field that lost the record. One case of that exception is worth a follow-up card rather than a change here: objects of an already-parsed stack fed into a second strict defineStack (not composeStacks) arrive with required: false written, are re-parsed into new field objects, and lose the record. No example, skill or scaffold in the tree does this, and the result is the pre-record reading; the stamper could carry the record forward by also treating a stamped authored field as omitted.

Out of the diff, read only: the same docblock's older line "a missing required since ruling B" predates ruling A and was not touched by this PR.

Implemented-by: claude/project-thread-76da2l
Reviewed-by: session_01ADHkmQjrEpxMVxEiDUJHqC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract-review-claim: session_01ADHkmQjrEpxMVxEiDUJHqC · head 6e1439c · 2026-11-15T17:22Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6e1439cc164a0005e2f66c963056a2ef33aefb69
Local-runs: none
Scope: merge delta from eb7616fe92454e0f91fbeabddb36e457ce2cc8de (round 1, record 6897754784, PASS) to this head. Hits unchanged: packages/spec/src/data/controlled-by-parent-master.ts, packages/spec/src/data/index.ts, packages/spec/src/data/master-detail-required-omission.ts, packages/spec/src/stack.zod.ts + packages/lint/src/data-model-rules.ts

Read: round 1 record 6897754784 in full; the merge commit 6e1439cc (parents eb7616fe and main b4ce310b); the PR's net diff against each merge base (0ac112fc then, b4ce310b now); the 32 first-parent main commits 0ac112fc..b4ce310b by title and their file list, with the diffs of every one that touches packages/spec, packages/cli, packages/lint, packages/objectql or packages/runtime; docs/qa/platform-checklist/areas/cli.json on main (PR #34004) and at this head; the PR body; the claim 6898341603; the check-runs on this head. Nothing was built or run.

What sits between the two heads: one commit, the merge of origin/main at b4ce310b. git log 6e1439cc --not eb7616fe b4ce310b lists only that merge, so no dev-authored non-merge commit was added. The merge carries no conflict resolution: its combined diff (git show --cc) and its --remerge-diff are both empty.

Check-runs on this head (GET commits/6e1439cc/check-runs, 68 runs): all completed, none failed, none pending. Success (57): Check Changeset, Check PR Size, Auto Label, filter, Flag docs affected by code changes, Check Documentation Links, PR-body guards, Governed Surface Queue Guard, Spec property liveness, Lint & Repo Gates, Lint · repo & tooling gates, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · ESLint, Lint · PM dispatch-gates, the three scoped Lint runs, TypeScript Type Check, Type Check · source gates, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Type Check UI, Build Core, Build UI Deps, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Plan Test Core shards, Test Core and 1/8 to 8/8, Plan Test UI shards, Test UI and 1/16 to 16/16. Skipped (11, opt-in, queue-only or path-filtered): 18.x upgrade harness, Packed-tarball smoke, Queue verdict, Borrowed queue verdict, Schedule gate, Build Docs, Lint UI, Dogfood Verify CLI, the unexpanded Dogfood matrix row, Temporal Conformance, UI Published Artifacts. The runs round 1 listed as still in progress are all green here.

① Derived judgments

② Semver level

Unchanged from round 1 and still right: patch on @objectstack/spec and @objectstack/lint, Clause-②: yes, Metadata-protocol: none. The changeset file is byte-identical; main added 12 other changesets and none names this change or contradicts it. Check Changeset is green on this head.

③ Boundary flags

  • The merge brings governed paths into the branch's tree (AGENTS.md, .claude/**, skills/**, .github/CODEOWNERS), but they are main's own content: the PR's file list against its base is the same 11 files, none governed. Governed Surface Queue Guard is green.
  • Round 1's accepted deviations stand as written (Clause-② yes, the checklist rev 4 → 5, no assignee, check:generated at the 6144 heap). The PR still has no assignee and is still draft; both are the seat's.
  • Main has moved past the merged tip (b4ce310b → e71ecc1b, 15 commits at read time). None of them is in this head, none touches one of the PR's 11 files, the stamp-path files or the two data ledgers. The queue re-tests that; it is no finding on this head.
  • Security: no hits path under skills/** or ui/skills/**; no security label owed.
  • Not escalated: nothing in the delta needs a maintainer decision.

④ Design judgment

No must-fix, no should-fix. Round 1's design verdict carries to this head.

Stamp survival against the merged main. Of the 32 main commits, none changes a file on the path between defineStack and lintDataModel. Zero diff in 0ac112fc..b4ce310b for: packages/spec/src/stack.zod.ts (defineStack, buildDefinedStack, mergeActionsIntoObjects, mergeObjects, composeStacks), packages/spec/src/shared/** (normalizeStackInput, normalizeMetadataCollection), packages/spec/src/data/**, packages/cli/src/utils/** (loadConfig, authoringRuleUnionStack), packages/cli/src/commands/lint.ts, and all of packages/lint/**. git diff eb7616fe 6e1439cc over those paths is empty too. So no new copy of field objects exists between the parse and lintDataModel, and each "Holds" line of round 1 is read against the same bytes.

The main commits that could have interacted, read:

PR body against the current head: the description of the change, the tests, the ablations and the acceptance notes are still exact, because the diff is the same. One sentence is dated, see N3.

Per file: unchanged from round 1; all five still hold.

Nits (no effect on correctness or on the ruled contract; prose-face fix or a follow-up card, not a head move):

  • N1 (nit, carried, unchanged): master-detail-required-omission.ts header, "so no third party can attest an authored spelling it never saw"; Symbol.for is the global registry, the true statement is that the stamper is not published.
  • N2 (nit, carried, unchanged): data-model-rules.ts docblock, "sees the omission on every stack os lint loads" is wider than its own exception; the re-parse of an already-parsed stack through a second strict defineStack is worth a follow-up card.
  • N3 (nit, new, PR body only): ## Verification says "All readings at head eb7616fe (main 0ac112fc merged in …)" and "dispatch-gates --commands at eb7616f". The head is now 6e1439cc with main b4ce310b merged in. Those local readings were taken one merge earlier; they are not false as dated readings, the diff they measured is byte-identical, no stamp-path file moved, and CI is fully green on this head. Its count "16 areas, 429 items" is likewise a reading at the old base. A body edit naming the new head (or saying the readings predate the b4ce310b merge) closes it; no commit is needed.

Implemented-by: claude/project-thread-76da2l
Reviewed-by: session_01ADHkmQjrEpxMVxEiDUJHqC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract-review-claim: session_01ADHkmQjrEpxMVxEiDUJHqC · head d468bb8 · 2026-11-15T17:29Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d468bb80a4294b8be34b97ab6f212a4fbc738071
Local-runs: none
Scope: merge delta from 6e1439cc164a0005e2f66c963056a2ef33aefb69 (round 2, record 6898381389, PASS) to this head. Hits unchanged: packages/spec/src/data/controlled-by-parent-master.ts, packages/spec/src/data/index.ts, packages/spec/src/data/master-detail-required-omission.ts, packages/spec/src/stack.zod.ts + packages/lint/src/data-model-rules.ts

Read: round 2 record 6898381389 in full; the merge commit d468bb80 (parents 6e1439cc and main e71ecc1b); the PR's net diff against each merge base (b4ce310b then, e71ecc1b now); the 15 first-parent main commits b4ce310b..e71ecc1b by title, their file list under packages/spec, packages/cli, packages/lint, packages/objectql, packages/runtime, and the diffs of the packages/lint and packages/spec/src/kernel files they touch; docs/qa/platform-checklist/areas/cli.json on main and at this head; the PR body; the check-runs on this head. Nothing was built or run.

① Derived judgments

② Semver level

Unchanged and still right: patch on @objectstack/spec and @objectstack/lint, Clause-②: yes, Metadata-protocol: none. The changeset blob is identical. Check Changeset is still running on this head (see ③).

③ Boundary flags

  • Check-runs on this head (GET commits/d468bb80/check-runs, 41 runs at read time): CI is still running. In progress (18): Build Core, Build UI Deps, Live E2E UI, Dogfood Regression Gate, Plan Test Core shards, Plan Test UI shards, Check Changeset (two runs), Spec property liveness, Flag docs affected by code changes, Lint · repo & tooling gates, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · ESLint, Lint · PM dispatch-gates, the three scoped Lint runs, the four Type Check runs. The Test Core and Test UI shards have not been created yet. Success (10): Auto Label, Check PR Size, filter, Check Documentation Links, PR-body guards, Governed Surface Queue Guard and their repeats. Skipped (12): the opt-in, queue-only and path-filtered runs. Cancelled (1): an earlier PR-body guards run, superseded by the later run of the same check, which is success. No failure.
  • This PASS is the design verdict only. Landing waits for every required check on d468bb80 to complete green; this record does not attest that.
  • Governed paths: the PR's file list against its base is the same 11 files, none governed; Governed Surface Queue Guard is green.
  • Round 1's accepted deviations stand as written. The PR is still draft with no assignee; both are the seat's.
  • Not escalated: nothing in the delta needs a maintainer decision.

④ Design judgment

No must-fix, no should-fix. Round 1's design verdict carries to this head.

Stamp survival against the merged main. Zero diff in b4ce310b..e71ecc1b for packages/spec/src/stack.zod.ts (defineStack, buildDefinedStack, mergeActionsIntoObjects, mergeObjects, composeStacks), packages/spec/src/shared/**, packages/spec/src/data/**, packages/cli/src/utils/** and packages/cli/src/commands/lint.ts. packages/lint/** is not zero: #33991 changes three files, read:

  • packages/lint/src/rule-explanations.ts: one prose string (MANAGER_ONLY_ROUTES, the approval-approvers explanation). The relationship/master-detail-required entry is untouched.
  • packages/lint/src/validate-approval-approvers.ts: docblock text only. Its test file follows the prose.

None of the three is data-model-rules.ts, none is on the path from the loaded stack to lintDataModel, and none copies a field object. packages/objectql and packages/runtime are untouched in the range. packages/spec on main otherwise: #33799 (contracts/automation-service.ts, its pin test, the two contracts.json ledgers) and kernel/public-auth-features.ts (gated-input list). Neither is on the load path or touches objects or fields.

PR body: the ## Verification head line is updated. It names d468bb80 as a merge-only commit of main e71ecc1b and says the readings were taken at 6e1439cc. Its hash claim reproduces: git diff --abbrev=8 b4ce310b 6e1439cc and git diff --abbrev=8 e71ecc1b d468bb80 both hash to aa771be5…. Round 2's N3 is closed.

Nits (no effect on correctness or on the ruled contract):

  • N1 (nit, carried, unchanged): master-detail-required-omission.ts header, "so no third party can attest an authored spelling it never saw"; Symbol.for is the global registry.
  • N2 (nit, carried, unchanged): data-model-rules.ts docblock, "sees the omission on every stack os lint loads" is wider than its own exception.
  • N4 (nit, new, PR body only): the body's sentence "CI on 6e1439cc: every check-run completed" is a dated reading of the previous head; it says nothing about d468bb80, whose CI is still running. The body's gate-section title still reads "at eb7616f, re-run at 6e1439c", which is accurate as dated.

Implemented-by: claude/project-thread-76da2l
Reviewed-by: session_01ADHkmQjrEpxMVxEiDUJHqC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

ACCEPT · PR #34020 (#33940) · head d468bb80a4294b8be34b97ab6f212a4fbc738071 · 2026-11-15T17:57Z

席位核对

  • 形态: 11 files, read from the PR's file list (+356 / −7):

    • spec: the new master-detail-required-omission.ts reader and stamper plus its test, a named re-export in data/index.ts, one sentence in controlled-by-parent-master.ts, the stamp call in stack.zod.ts, and one row each in the data.json api-surface and export-origins ledgers;
    • lint: data-model-rules.ts and its test;
    • the checklist row cli.validate-v18-authoring-verdicts, rev 4 → 5;
    • a changeset (@objectstack/spec patch, @objectstack/lint patch).

    check-governed-merges.mjs --pr 34020 reports NOT governed, ≤ 3000 lines. The contract paths are hit, so the contract review applies. Tier S, so this is the seat's own ACCEPT.

  • 前提实测: the seat read the remainder at TIER_DEFAULT.

  • 契约复审: CONTRACT_REVIEW_TIER, three rounds, all PASS:

    • r1 6897754784 @eb7616fe;
    • r2 6898381389 @6e1439cc, a main merge;
    • r3 6898462116 @ this head, a main merge. The three-dot diff and all 11 blobs are byte-identical, and the stamp path is a zero diff on main.
  • 门禁 check-runs: latest attempt on this head, 72 runs: 58 success, 13 skipped, 1 cancelled, 0 failed. The cancelled run is an earlier PR-body guards run (17:29:29Z) superseded by its own rerun (17:30:00Z, success).

  • 接受的偏差:

    • Clause-②: yes (one added public export) where the claim first read no; corrected in claims 6897655754 / 6897667140.
    • The checklist row edit is owed by the same PR, because PR docs(qa): name the strict:false door for the os lint arm of cli.validate-v18-authoring-verdicts #33929's "default strict door, exit 0" sentence becomes false.
    • check:generated was reconciled at the 6144 heap locally; CI's tooling gates are the verdict.
    • Both main merges were made under the seat's K ≥ 15 landing rule. Metadata-protocol: none.
  • 范围外去向:

    • N1 (header wording on Symbol.for) is a prose nit, left as is.
    • N2 (a second strict defineStack over already-parsed objects drops the record) fails toward the pre-record reading. No example does this. The seat files a follow-up card if a reader appears.
    • Skills-docs: per the PR body.
  • 落地条款: ready + auto-merge now, under the maintainer's standing orders 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z) and 「你应该使用 pm-dispatch 技能审核和落地pr」 (2026-11-07T16:59Z). K = 2 first-parent commits on main past this head's merge base e71ecc1b (< 15).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 17:58
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43745631259 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (7/8) — 失败步骤: Run this shard's tests

    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-02-29: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-03-31: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: @objectstack/scenarios:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 15 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43747952342 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (7/8) — 失败步骤: Run this shard's tests

    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-02-28: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-02-29: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-03-31: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: @objectstack/scenarios:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 1 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 22 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43751141623 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (7/8) — 失败步骤: Run this shard's tests

    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-02-28: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-02-29: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-03-31: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: @objectstack/scenarios:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 2 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 24 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 15, 2026
…-76da2l

Conflict in docs/qa/platform-checklist/areas/cli.json, item
cli.validate-v18-authoring-verdicts: main's revision 5 (--reporter=tree on
acceptance[0].verify) is kept as written; this branch's default-door os lint
row is renumbered to revision 6 on top of it and the item revision set to 6.

Claude-Session: https://claude.ai/code/session_01ADHkmSUpRcnYp68V8zPYaB
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer-limited fable quota, 2026-11-15T23:09Z) · head 7e6f3db

Merge-of-main review: the 4th origin/main merge (ea6de74) under the K ≥ 15 landing rule. The last at-tier record is on the previous head. Per the card thread, 10 of 11 PR-diff files are byte-identical to the reviewed state; docs/qa/platform-checklist/areas/cli.json (entry cli.validate-v18-authoring-verdicts) took a semantic merge with #34068: main rev 5 kept, this PR's history row renumbered to revision 6.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 7e6f3db · 2026-11-15T23:14Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7e6f3db193e37290d890a922c478eb687ad709f5
Local-runs: none
Scope: packages/spec/src/data/controlled-by-parent-master.ts, packages/spec/src/data/index.ts, packages/spec/src/data/master-detail-required-omission.ts, packages/spec/src/stack.zod.ts + packages/lint/src/data-model-rules.ts, packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, packages/spec/src/data/master-detail-required-omission.test.ts, packages/lint/src/data-model-rules.master-detail-required.test.ts, docs/qa/platform-checklist/areas/cli.json (the merge's one conflict)

Read at 2026-11-15T23:35Z. Merge delta review of this head against PASS 6898462116 at d468bb8; claim: comment 6903002386; lane request 6902955391 on mailbox #33873. Independence: implemented in an os-steve project thread, dispatched by domain:spec#2 (os-steve); reviewed by os-tesla.

Read: card #33940 (body and comments), the PR body and all its comments (records 6897754784 and 6898462116 in full, the three merge-queue triage comments, hand-off 6902949582), the merge commit 7e6f3db1 (parents d468bb80 and main ea6de745), the PR's net diff against both merge bases (e71ecc1b then, ea6de745 now) path by path, the 38 main commits e71ecc1b..ea6de745 by file list, the four revisions of cli.json (old base, old head, main, this head) parsed as JSON from git show, the head tree's stack.zod.ts, data-model-rules.ts, packages/cli/src/utils/config.ts, packages/cli/src/commands/lint.ts, field.zod.ts, and the head's check-runs. Nothing was built, tested or re-run; the changeset prose was read, not graded.

① Derived judgments

② Semver level

Unchanged and right: patch on @objectstack/spec and @objectstack/lint, Clause-②: yes (one added public export, no arm owed), Metadata-protocol: none (no authorable key added, refused or re-read by the parse). The changeset blob is identical to the reviewed one. Check Changeset is green on this head.

CI on 7e6f3db1 at read time, 69 check-runs: 26 completed success, 13 skipped, 0 failed, 30 STILL IN PROGRESS. Success includes Check Changeset, Lint and Repo Gates, the Lint family (repo and tooling gates, CI release and engine gates, docs and code guards, ESLint, PM dispatch-gates, the three scoped runs), Type Check source gates, Type Check debt ledger, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Dogfood Regression Gate, Build UI Deps, Check Documentation Links. In progress: Build Core, Test Core 1/8 to 8/8, Type Check workspace, Type Check consumer gates, Type Check UI, Test UI 1/16 to 16/16, Build and E2E UI, Live E2E UI. This PASS is the design verdict on the merge delta only. It does NOT attest those 30 runs: the seat waits for every required check on this head to complete green before it lands anything.

CI completed before posting: 72 check-runs, 59 success, 13 skipped, 0 failed, none in progress.

③ Boundary flags

  • check:platform-checklist is not a per-PR check (it runs from the patrol workflow), so no check-run on this head judges the resolved cli.json. The lane reports exit 0 (16 areas, 433 items) locally; this record adds the structural read in ① and nothing more.
  • Merge queue history: the reviewed head was ejected three times, each on packages/scenarios test/runner/run-date.test.ts (shared signature, issue Queue-flake anchor: test/runner/run-date.test.ts #34081), a package this diff does not move. This record says nothing about whether that signature is gone on ea6de745.
  • The four end-to-end CLI readings in the PR body were last taken at 6e1439cc; the body says so. With zero diff under packages/spec/src, packages/lint and packages/cli since, they carry by code identity, not by a re-run at this head.
  • Governed paths: the file list is the same 11 files, none governed; Governed Surface Queue Guard is green on this head.
  • Security: no path under skills/** or ui/skills/**; the change is author-time lint reach and no runtime access reader changes.
  • Not escalated: nothing in the delta needs a maintainer decision.

④ Design judgment

No must-fix. One should-fix for a follow-up card, S1 below; it does not ask for a head move.

Independent reading of the contract at this head (the prior records were rendered by the implementing lane's own seat). Ruling A on #30905 (record 6687830530) has two halves: the parse admits an omitted required on a cbp object's only master_detail as the optional master, and os lint errors on the omitted spelling. The card measured the second half false on the default strict defineStack door. The fix keeps the first half exactly (the parsed value stays false, nothing is refused, os validate and os build do not move) and makes the second true by having the one party that holds both the authored and the parsed field record the omission. That is the reach half of the card's ask and it reverses no earlier ruling. I agree with the choice of a field-level record over a stack-level one: loadConfig rebuilds the top-level object, the fields arrive by reference.

Tried to break it, in the head tree:

  • packages/spec/src/data/master-detail-required-omission.ts: holds. The stamper reads sharing model and type on the parsed side and required on the authored side, pairs by index AND by name, and skips anything that does not line up, so a misaligned pair is never mis-stamped. zod builds new field objects, so the author's literals are not mutated. No alias path can write required from another authored key: the flat column-constraint spellings and isRequired are refused by the strict field schema, not renamed, so a stamped field is always one whose author wrote no required. A parse-materialized field has no authored counterpart and is skipped.
  • packages/spec/src/stack.zod.ts: holds. The call sits on the strict path only, after safeParse succeeds, on normalized (map-form objects are already arrays there). mergeActionsIntoObjects runs after it and keeps each fields map by reference.
  • packages/spec/src/data/index.ts: holds. Named re-export of the reader only; the stamper stays off the published surface, and both ledgers agree.
  • packages/spec/src/data/controlled-by-parent-master.ts: holds. The added sentence is true; nothing in that module reads the record.
  • packages/lint/src/data-model-rules.ts: agrees with the contract. A stamped sole master fails optionalMaster, so it falls to missingRequired and eitherSpelling: same message, same .required path, same fix as the non-strict door. Explicit false and true are untouched. Beside another master_detail a parsed false was already reported, so the stamp changes nothing there. lintDataModel still has one caller, packages/cli/src/commands/lint.ts.
  • Fail direction: a field that lost the record reads as the explicit optional master, the pre-change reading. No refusal and no unearned finding can come from a lost record. Pinned by one spec test and one lint test.
  • The two test files: the spec cases build through the real defineStack; the lint cases run the rule over stacks a real defineStack built, with controls for explicit false, true, strict: false and a copied field. No existing assertion is edited.

Findings:

  • S1 (should-fix) — The fix rests on every hop between defineStack's return and lintDataModel passing each field BY REFERENCE: loadConfig's top-level spread, os lint's second normalizeStackInput, authoringRuleUnionStack, and composeStacks' mergeObjects. The PR body calls these measured, and the prior record read them, but no test in the diff runs the rule through any of them: the new lint cases hand defineStack's objects straight to lintDataModel, and the checklist item declares acceptance[3] hand-driven. A later copy on any hop returns exactly this card's defect (default door, os lint exit 0) with all 11 new cases green, and the only thing that notices is the next manual QA run, which is how the defect was found the first time. packages/cli/test/data-model-rules.test.ts already has a lintConfig integration block that could carry one case over a strict defineStack stack, and one over a composeStacks result. Follow-up card; not a reason to move this head.
  • N1 (nit, carried from 6897754784, unchanged) — master-detail-required-omission.ts header, "so no third party can attest an authored spelling it never saw": Symbol.for is the global registry, so the key is writable by anyone; what is true is that the stamper is unpublished.
  • N2 (nit, carried, unchanged) — data-model-rules.ts docblock, "sees the omission on every stack os lint loads" is wider than its own next sentence. The concrete case stays open for a follow-up: objects of an already-parsed stack fed to a second strict defineStack arrive with required: false written and lose the record.
  • N4 (nit, carried, CLOSED by this head's body) — the body's Verification section now leads with 7e6f3db1, names the conflict and its resolution, and dates the older readings. Its claim about the two diffs reproduces (10 of 11 files identical, cli.json differing in the two revision numbers).
  • N5 (nit, new) — cli.json, the appended history row carries "ref": "#33940", the card. The checklist README gives a history row's ref as the PR, and main's rows 4 and 5 follow that (docs(qa): name the strict:false door for the os lint arm of cli.validate-v18-authoring-verdicts #33929, docs(qa): cover the #33761 ledger gaps and name --reporter=tree for per-file pin scoring #34068, with the card named in change). #34020 would match. It was the same at the reviewed head; the renumbering did not introduce it.
  • N3 from record 6898381389 was closed by 6898462116 and stays closed.

Implemented-by: claude/project-thread-76da2l
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

ACCEPT · PR #34020 (#33940) · head 7e6f3db193e37290d890a922c478eb687ad709f5 · 2026-11-15T23:37Z

席位核对

  • 形态: the same 11 files as the prior ACCEPT on d468bb80 (+356 / −7), now on a merge of origin/main ea6de745 made under the K ≥ 15 landing rule after the Queue-flake anchor: test/runner/run-date.test.ts #34081 queue-flake ejections. check-governed-merges.mjs --pr 34020: NOT governed, ≤ 3000 lines.
  • 前提实测: one merge conflict: docs/qa/platform-checklist/areas/cli.json, item cli.validate-v18-authoring-verdicts, against docs(qa): cover the #33761 ledger gaps and name --reporter=tree for per-file pin scoring #34068's rev 5. Resolved additively: main's rev-5 row and acceptance[0] are kept; this PR's history row is renumbered to revision 6, and the item's revision to 6. The other 10 files keep identical blobs.
  • 契约复审: CONTRACT_REVIEW_TIER via review#2 (handoff 6902949582 — fable quota limited by the maintainer):
    • merge-delta r4 PASS 6903268733 @ this head. It verified the cli.json resolution by parsing all four revisions.
    • Earlier rounds: r1 6897754784, r2 6898381389, r3 6898462116, all PASS.
  • 门禁 check-runs: this head, 72 runs: 59 success, 13 skipped, 0 failed, 0 in progress.
  • 接受的偏差: N1, N2, N5 (prose and the checklist ref) carried to the follow-up card.
  • 范围外去向: S1 (no test drives the rule through loadConfig / normalizeStackInput / composeStacks) and N1, N2, N5 → os lint: pin the master_detail required-omission record through loadConfig, normalizeStackInput and composeStacks #34177.
  • 落地条款: ready + auto-merge now, under the maintainer's standing orders 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z) and 「你应该使用 pm-dispatch 技能审核和落地pr」 (2026-11-07T16:59Z). K = 4 first-parent commits on main past PRBASE 0d1443d0 (this head's Test Core Affected-set diff base), < 15.

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 protocol:data size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant