Skip to content

feat(lint): refuse a transferBehavior cascade the Change Owner action can never offer - #37382

Merged
os-zhuang merged 8 commits into
mainfrom
claude/issue-36714-transfer-cascade-lint
Nov 26, 2026
Merged

os-zhuang merged 8 commits into
mainfrom
claude/issue-36714-transfer-cascade-lint

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Fixes #36714
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #35769 (row 7178935378: skills/objectstack-data/rules/relationships.md, the three lint refusals)

维护者速读

  • 用户能看到什么变化:应用作者在命令行校验、构建或检查应用时,若关联字段声明了「变更负责人时连带转移」而这种转移永远不会发生(父对象不提供变更负责人、经对象扩展加到不支持它的对象上、或子对象的接口不允许更新),现在会直接报错并写明怎么改;最终用户无感,运行时行为不变。
  • 为什么做:数据模型专区「声明了就要生效」的收尾,替变更负责人连带转移功能补上作者期的提醒。
  • 出错会怎样:若判断有误,作者的应用会在命令行校验时被误拦,改字段或对象即可通过;不影响已部署的应用和工作室保存,可直接撤回。
  • 要你做什么:无。

What changes

A transferBehavior: 'cascade' that the Change Owner endpoint can never offer used to parse silently (ADR-0049, declared but not enforced). One new @objectstack/lint rule, validateTransferCascades, refuses each of the card's three cases at error, with the fix in the hint:

Rule id Case Verdict from (spec, @objectstack/spec/data)
transfer-cascade-parent-without-change-owner 1: the reference points at a parent in the stack that does not offer Change Owner resolveUserActionTransfer + transferIneligibilityReason (what the endpoint's changeOwnerOffReason asks)
transfer-cascade-extension-child-ineligible 2: an objectExtensions[].fields field cascades onto an object that cannot take a cascade transferCascadeIneligibilityReason (what refuseIneligibleTransferCascades and transferCascadeRelations ask)
transfer-cascade-child-update-unexposed 3: the child's enable block does not serve update apiExposureDenialReason (canServeApiOperation is its boolean face, the exposure filter in transferCascadeRelations)
  • packages/lint/src/validate-transfer-cascades.ts: the walk only. Objects are judged as served (objectsAsServed, every extension field folded in), since transferCascadeRelations reads the registered, merged definitions. An object the stack does not declare is skipped on either side. Only single-value lookup / master_detail fields are judged; off-type, multi-value and sys_-parent cascades stay the field parse's refusals and are not reported twice.
  • Registered in authoring-rules.ts: gating, all three commands, surfaces: CLI_ONLY with a surfaceReason (see Acceptance notes). Exported from the barrel (rule ids included), and the three ids have os explain entries in rule-explanations.ts (inserted, not reordered).
  • packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts: the ADR-0087 ledger entry check:adr-0087-registration requires for a Metadata-protocol: narrowed changeset. It is a data file, not a schema change.
  • Docs: one sentence in content/docs/api/data-api.mdx beside the existing multi-value refusal, and the CLI transcripts' author-time rule count 79 → 80 (check:docs-transcript-drift).
  • Changeset: @objectstack/lint minor, @objectstack/spec minor (the kind is narrowed).

Mechanism assumptions measured at origin/main 98bda0a before code: A1 holds (the predicates are exported from @objectstack/spec/data; lint imports them the way validate-managed-api-methods.ts does, no third copy). A2: error, following validateManagedApiMethods (a declaration decidable from the stack that the runtime silently drops) and the parse's own refusal of the declaring object's half. A3 holds (child.enable through the exposure predicate). A4: the two validate-predicate-path-refs.test.ts pins count form predicates, not registry entries; nothing moved.

Files to read first, by risk:

  1. packages/lint/src/validate-transfer-cascades.ts — validateTransferCascades, the served-object lookup and the sys_ / not-declared skips.
  2. packages/lint/src/authoring-rules.ts — the new entry's tier and surfaceReason.
  3. packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts.

Tests

packages/lint/src/validate-transfer-cascades-36714.test.ts: every fixture is a full ObjectSchema / ObjectExtensionSchema parse, so each refusal is one the parse lets through. Each case is refused with its rule, severity, where, path and the reason fragment its message names; each eligible shape passes (an eligible parent, a parent outside the stack, a sys_ parent, an eligible extension target, a target outside the stack, update served); the packages[] artifact shape is read; and the fieldPatches arm is pinned as refused by the schema.

Local runs at 3e1fa4a (lint, spec, ablation)
  • pnpm --filter @objectstack/lint test: Test Files 236 passed (236), Tests 9648 passed, 5 skipped (VERDICT command-exit 0).
  • pnpm --filter @objectstack/lint typecheck: VERDICT command-exit 0.
  • pnpm --filter @objectstack/spec test: Test Files 894 passed, 1 skipped (895), Tests 28417 passed (VERDICT command-exit 0).
  • pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.ts: 3 passed.
  • Ablation (rule committed first): scripts/ablation-replace.mjs replaced the walk's for (const site of cascadeSites(stack)) with an empty loop, x0 -> x1 on disk; the card's test file went 15 failed, 9 passed (24). Every refusal case red, every pass case green. Restored: blob == HEAD, git diff HEAD empty.

Acceptance notes

  • The Clause-②: line carries the (narrowing) arm (body and changeset, commit 8737482): Check Changeset reads Metadata-protocol: narrowed beside a clause line without the arm as a contradiction. The claim's Clause-②: no was copied first, at 3e1fa4a.
  • Premise, partly narrower than written: case 2's fieldPatches arm cannot occur. A field patch carries display properties only (label, description, inlineHelpText, placeholder), and ObjectExtensionSchema refuses transferBehavior there as an unrecognized key, so the rule walks extension fields only; a test pins the refusal.
  • Not on the runtime publish gate yet (surfaces: CLI_ONLY): the door's objects are served definitions carrying the injected owner_id as a declared field, which the eligibility predicate reads (its readonly, and on an external object whether it is declared). Crossing owes that measurement or a read-back to the authored shape, as lintDuplicateFieldLabels does. Until then a Studio or MCP save of these shapes still passes. The runtime stays safe.
  • Boundary: a cascade on a field an object declares itself, where only an extension makes the served object ineligible, is not reported as case 2 (the card scopes case 2 to extension fields; the object's own half is the parse's).
  • File surface: the ADR-0087 ledger entry under packages/spec/src/migrations/entries/semantic/ is outside the claim's listed surface. check:adr-0087-registration requires it for narrowed; it changes no schema and no runtime.
  • First-party exposure: zero. No example app, platform object, skill or docs sample declares a cascade.
  • Other open PRs that add an author-time rule (feat(ai): a context pack's related list takes where / orderBy / limit (ADR-0160 row 11) #37354, feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371) move the same transcript count; whichever lands second gets a one-number docs conflict or a check:docs-transcript-drift red.

Verification

Two-minute check: pnpm --filter @objectstack/lint exec vitest run src/validate-transfer-cascades-36714.test.ts prints 24 passed.

Gates: local derivation and reconciliation

node scripts/pm/dispatch-gates.mjs --ran at 3e1fa4a: 117 derived, 113 run, 4 NOT-MEASURED, 0 UNRUN. All 113 run exited 0. NOT-MEASURED, left to CI:

  • check:type-check-debt: the 300 s local timeout fired (repo-wide tsc census).
  • check-plugin-teardown-shape.mjs --self-test: shallow checkout.
  • spec check:skill-examples: its client SDK surface reads packages/client-react dist, not built locally.
  • check:dual-build-cjs-loads: reads every workspace dist.

Outside the derivation, local-only: check:dev-prereqs exit 1, because 104 of 110 workspace packages are unbuilt in this container (machine state, not this diff).

🤖 Generated with Claude Code

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/lint, @objectstack/spec, touching 28 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/lint/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/queues-and-assignment-rules.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/data-modeling/objects.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/deployment/validating-metadata.mdx (via AUTHORING_RULES (symbol, a top-level const object), business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/permissions/index.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/permissions/permissions-matrix.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/permissions/sharing-rules.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/protocol/objectql/security.mdx (via business_unit (literal, a string literal in a comment on a changed line))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/implementation-status.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/releases/v17/17-0.mdx (via business_unit (literal, a string literal in a comment on a changed line))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/lint/src/index.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, 49 pages)
  • 14 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 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; 124 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 — 176 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 ff6f9768d2969c4f2f42819f461424965238e30f → packageMentionDocs.

Which tree this was computed on

This run read content/docs from f13af1dc014a8c6819c02500dda8f683bbabd108 — the merge of head df622665dbdf34a43b0790ac4887404f7281a802 into base ff6f9768d2969c4f2f42819f461424965238e30f, 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 f13af1dc014a8c6819c02500dda8f683bbabd108 && git checkout f13af1dc014a8c6819c02500dda8f683bbabd108
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ff6f9768d2969c4f2f42819f461424965238e30f df622665dbdf34a43b0790ac4887404f7281a802 && git checkout -B drift-repro ff6f9768d2969c4f2f42819f461424965238e30f && git merge --no-ff df622665dbdf34a43b0790ac4887404f7281a802

node scripts/docs-audit/affected-docs.mjs --json ff6f9768d2969c4f2f42819f461424965238e30f

⚠️ 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 ff6f9768d2969c4f2f42819f461424965238e30f → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…e reference-target arbiter

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Final head for L1 + L2 · area o5-D · 2026-11-26T01:47Z
Head-sha: ffd2cb6dad60dea5c001504c889831f969a869e9
Check-runs at this head: 70 completed — 60 success, 10 skipped (expected: no UI path, queue/push-only, opt-in), 0 failure. Draft.
Diff: +674 −4, 13 files (packages/lint/src/** new rule + card test + registration, one test-only CALLERS row in packages/core/src/security/second-object-read-exposure.pin.test.ts, changeset). Clause-②: no (narrowing) · Metadata-protocol: narrowed (claim amendment 7180121254) · Skills-docs: follow-up #35769. Not governed. Owes a contract-review-tier L2 (narrowing).
Earlier reds: Check Changeset (clause/level contradiction, fixed 8737482b); Test Core 9/10 (pin CALLERS row, fixed ffd2cb6d); Type Check / Test UI at 3e1fa4a6 were runs cancelled by the next push. Dogfood battery: passed at 8737482b; the re-run at this head is under way and lands as a fresh os-dev-report on #36714.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head ffd2cb6 · 2026-11-26T01:48Z

The seat runs the at-tier contract review of this head through an isolated sub-agent; L1 is the seat's own.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ffd2cb6dad60dea5c001504c889831f969a869e9
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts + packages/lint/src/validate-transfer-cascades.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/index.ts, packages/lint/src/validate-transfer-cascades-36714.test.ts, packages/core/src/security/second-object-read-exposure.pin.test.ts, .changeset/transfer-cascade-lint.md
Security-touching: yes
Rule-change-verified: none

Inputs read: card #36714 (body, triage 7102255110, claim 7177897953, dev report 7178906203, claim amendment 7180121254), the PR body, the net diff origin/main...pr-37382 (13 files, +674/−4), and the 70 check-runs on this head (60 success, 10 skipped, 0 failure; Check Changeset, Lint · CI, release & engine gates, Test Core, TypeScript Type Check, Dogfood Regression Gate, Build Docs all success). Code outside the diff was read on origin/main, never reviewed: packages/core/src/security/change-record-owner.ts, packages/rest/src/change-owner-routes.ts, packages/spec/src/data/user-action-transfer.ts, api-derivation.ts, injected-system-column-provenance.ts, field.zod.ts, object.zod.ts, packages/lint/src/object-graph.ts.

① Derived judgments

  • Accept set of os validate / os build / os lint: narrowed. Right, and declared. A stack that parsed and built before is now refused at error (tier gating, all three commands) in three shapes. Clause-②: no (narrowing) + Metadata-protocol: narrowed on the PR body, the changeset and claim amendment 7180121254 agree.
  • The refused set equals the runtime's never-offered set, for what a stack can decide. Right. Read against main:
    • Case 1 (transfer-cascade-parent-without-change-owner): the cascade is reachable only through a Change Owner of the parent; both doors (offeredDefinition in core, the GET …/change-owner/cascades handler in rest) throw 403 CHANGE_OWNER_DISABLED when changeOwnerOffReason(object, def) answers, before transferCascadeRelations is called. The rule's parentOffReason is the same three-step function (resolveUserActionTransfer(def).enabled → transferIneligibilityReason → authored switch vs controlled_by_parent default), on the same spec predicates. No arm refused that the endpoint serves.
    • Case 2 (transfer-cascade-extension-child-ineligible): transferCascadeRelations drops a child when transferCascadeIneligibilityReason(child) !== undefined; the rule asks the same predicate of the served child. Limited to extension fields because refuseIneligibleTransferCascades already refuses the object's own fields at parse.
    • Case 3 (transfer-cascade-child-update-unexposed): the runtime filter is canServeApiOperation(child.enable, 'update'), defined as apiExposureDenialReason(…) === null; the rule calls apiExposureDenialReason(childDef.enable, 'update'). Identical verdict.
    • Field filter: declaresCascade is byte-for-byte the runtime's ('cascade', lookup | master_detail, multiple !== true), and the parent is read through referenceTargetOf with the same try/catch.
  • No false refusal found. Unknown objects are skipped on both sides (a parent or an extension target the stack does not declare), a sys_ parent is left to FieldSchema. Authored vs registered shape: transferIneligibilityReason reads resolveInjectedSystemColumns / resolveInjectedColumnProvenance, which are documented and built to give one verdict for pre-injection and post-injection input (an absent owner_id and the platform's own definition both read as the platform anchor), and ownerFieldDeclaredReadonly reads both fields shapes, so judging the authored stack agrees with the runtime judging the registered definition. ObjectExtensionSchema's merge carries no userActions, ownership, managedBy, sharingModel or enable, so no other package can flip a verdict except by adding a field, which objectsAsServed folds in for the stack's own extensions.
  • fieldPatches arm of the card's case 2 cannot occur. Right. The patch shape refuses transferBehavior as an unrecognised key; a test pins it. The card's premise is narrower than written, and the PR says so.
  • Public surface of @objectstack/lint: added (validateTransferCascades, three rule-id constants, TransferCascadeFinding). Right, exported from the barrel beside its siblings.
  • @objectstack/spec: one data file (the ADR-0087 semantic entry); no schema, no export, no generated artifact moves. Right.
  • @objectstack/core: one CALLERS row in a .pin.test.ts. The package publishes dist, README.md, CHANGELOG.md only; nothing ships. Right, and the row's classification (not-a-served-read, authoring-time static analysis) is true of the new caller of referenceTargetOf.
  • Wiring matches the siblings (validateAiContext / ai-context-*, feat(ai): ai_context context packs and the get_record_context tool over MCP (ADR-0160 row 5) #37173): registry entry in authoring-rules.ts with source, surfaces and a surfaceReason; barrel export; one os explain entry per id in rule-explanations.ts and in RULE_EXPLANATIONS; the second-object-read-exposure pin row; the four CLI transcripts 79 → 80 (no fifth transcript carries the count).

② Semver level

  • @objectstack/lint minor and @objectstack/spec minor: right. The kind is narrowed, which takes at least minor on each package the diff moves; both are moved, @objectstack/core is not (test file only) and is correctly absent.
  • Clause-②: no (narrowing): right. No published accept set of the spec schema or public surface widens (new lint exports are additive API, not a metadata accept set); the authoring tools refuse what they accepted. The arm is on the PR body, the changeset body and the claim amendment.
  • ADR-0087: the changeset carries exactly one marker, registered transfer-cascade-never-offered-refused, and the entry of that id exists in the diff. The FROM → TO and the one-line fix are in the changeset body (Fix: set the field's transferBehavior to 'none' or remove it, or change the object the message names).
  • S1 (should-fix) — the changeset has no **BREAKING** banner and no ! in its summary (feat(lint): refuse …). scripts/check-changeset-no-major.mjs names the banner as a mandatory carrier of breaking-ness during the launch window, AGENTS.md calls (narrowing) BREAKING, and all twelve Clause-②: no (narrowing) changesets sampled on main carry it. The gate is green because the arm alone is a breaking signal, but the text that ships as CHANGELOG.md in two npm packages tells a consumer about the break only through a process token. Fix: feat(lint)!: and a **BREAKING:** lead on the paragraph that names the three refusals.

③ Boundary flags

  • Dev flag, file surface widened to packages/spec/src/migrations/entries/semantic/: accepted. check:adr-0087-registration requires the entry for narrowed; the claim's ⛔ was on schema changes under packages/spec/src/**, and this is ledger data. The amendment 7180121254 adds the core pin row to the surface; same judgment.
  • Dev flag, surfaces: CLI_ONLY: accepted for this PR, with S2 below. A Studio or MCP save of the three shapes still passes; the runtime stays safe because transferCascadeRelations re-judges.
  • S2 (should-fix) — the crossing to the runtime publish gate is owed in three places (surfaceReason, the explanations' scope paragraph, the changeset) and no card number carries it. Until it lands, ADR-0049 holds at the CLI door only and the two doors disagree on the same document. The stated obstacle also looks weaker than written: resolveInjectedColumnProvenance is built to answer the same for an injected owner_id present in the registered definition as for one absent from the authored document, so the measurement is likely short. File the card and name it in the surfaceReason.
  • Dev flag, an own-field cascade made ineligible only by an extension is not reported: see N1.
  • Dev flag, transcript-count collision with feat(ai): a context pack's related list takes where / orderBy / limit (ADR-0160 row 11) #37354 / feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371: a queue-order matter, no contract effect; whichever lands second moves one number.
  • Skills-docs: follow-up #35769 (row 7178935378): verified. The row exists on Skills revisions · week of 2026-11-20: shipped skills/** text fixes batched into one PR #35769 (open), names skills/objectstack-data/rules/relationships.md and the three refusals, ordered after this PR merges. The skill paragraph on main stays true after this PR (it lists the parse refusals); it is incomplete, not wrong.
  • Dogfood battery on the final head (owed by the amendment): Dogfood Regression Gate success on this head.
  • No open_questions on the card or the report.
  • SQL push-down: not applicable. The rule reads metadata only; no query, no id materialisation, no in-app join.

④ Design judgment

The narrowing against the published spec on main: it takes no declared capability away. transferBehavior: 'cascade' keeps every case in which the Change Owner endpoint acts on it; the three refused shapes are ones the endpoint already drops on every call, silently. The rule makes the spec's own contract (liveness row transferBehavior: "offers and runs only declared single-value cascades whose child offers Change Owner") real at author time, which is what ruling 7000907189 point 4 ("parse or lint") and ADR-0049 ask. error is the right severity: each verdict is decidable from the stack, and the object's-own-field half of case 2 is already a parse error, so a warning here would grade the same mistake two ways.

  • packages/lint/src/validate-transfer-cascades.ts against change-record-owner.ts: agrees, as ① sets out. The file imports the predicates and holds only the walk, so the two cannot drift by re-implementation; the remaining drift surface is the walk's field filter, which is the runtime's.
  • packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts against the rule: surface lists every arm transferIneligibilityReason has plus both switch-off origins, both extension and own-field carriers, and both exposure reasons; replacement names the three ids; the acceptance route GET /api/v1/data/PARENT/change-owner/cascades is the registered route. "No mechanical rewrite" is right: dropping the cascade and changing the object are different intents.
  • rule-explanations.ts: the three entries state where the verdicts come from, what is skipped and that the publish gate does not run them yet. Accurate against the code.
  • content/docs/api/data-api.mdx: the added sentence is accurate and sits beside the existing multi-value refusal.
  • N1 (nit) — a cascade on a field the object declares itself, on an object that is eligible as authored but ineligible as served (an in-stack extension declares owner_id readonly: true on it, or the like), is refused by neither the parse (authored object is eligible) nor case 2 (extension fields only), and the runtime never offers it. Exotic, disclosed, runtime-safe. The served child is already in hand at that point: judging every site against it and reporting a non-extension site only when the authored object passes would close it.
  • N2 (nit) — the test pins four of the parent arms (org, none, managedBy, switch off) and the controlled_by_parent default. business_unit, systemFields: false, a readonly owner_id, an unprovable external owner and the object form userActions.transfer: { enabled: false } are covered only through the shared predicate's own tests. Enough for the contract; a row for the readonly owner_id arriving through an extension would also pin the served-object read on the parent side.
  • N3 (nit) — parent !== undefined && in the case-1 condition is redundant (parentReason is defined only when parentDef is, which requires parent).

No must-fix. S1 and S2 are text and a card; neither changes what the rule refuses.

Implemented-by: claude/issue-36714-transfer-cascade-lint
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: ffd2cb6dad
REWORK — L1, seat repo:objectstack#5: the two should-fix findings of contract record 7180267565 are fixed in this PR before landing, and the dogfood battery is read on the final head; the rest of L1 reads clean.

  1. Shape: open draft against main, 13 files (+674/−4), Fixes #36714, Clause-②: no (narrowing) and Metadata-protocol: narrowed (amendment 7180121254). l1-face flags two items:
    • changeset on @objectstack/core is a false positive: the only core file is second-object-read-exposure.pin.test.ts, which ships nothing.
    • dogfood is owed on the final head. The battery passed at 8737482b, and the refreshed os-dev-report at the final head is still due.
  2. Premise: the record finds the rule refuses exactly what the Change Owner runtime on main never offers, and no false refusal. Case 1 shares changeOwnerOffReason, case 2 shares transferCascadeIneligibilityReason, and case 3 is apiExposureDenialReason behind canServeApiOperation. The rule is wired like the ai-context-* siblings.
  3. Owed in this PR:
  4. Accepted deviations: contract nits N1 (an own-field cascade made ineligible only by an in-stack extension, disclosed, runtime safe), N2 (the five unpinned parent arms, covered by the shared predicate's tests) and N3 (a redundant parent !== undefined).
  5. Out of scope and where it went: Skills-docs follow-up row 7178935378 on Skills revisions · week of 2026-11-20: shipped skills/** text fixes batched into one PR #35769. The publish-gate crossing goes to the card S2 asks for.
  6. Landing terms: ungoverned, default tier, Security-touching: yes. A same-head at-tier PASS with S1 and S2 closed, a dogfood_battery on that head in the os-dev-report, and an ACCEPT are owed. The area lands it.

…rossing named as follow-up #37397

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head df62266 · 2026-11-26T02:43Z

The seat runs the at-tier contract review of this head through an isolated sub-agent; L1 is the seat's own.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: df622665dbdf34a43b0790ac4887404f7281a802
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts + packages/lint/src/validate-transfer-cascades.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/index.ts, packages/lint/src/validate-transfer-cascades-36714.test.ts, packages/core/src/security/second-object-read-exposure.pin.test.ts, .changeset/transfer-cascade-lint.md
Security-touching: yes
Rule-change-verified: none

Delta review. The prior record of this session reviewed ffd2cb6d whole; this one re-reads the head df622665 as the net diff against main (13 files, +682/−4) and the delta ffd2cb6d..df622665 (3 files, +10/−2: the changeset, a comment in authoring-rules.ts, a comment in rule-explanations.ts). No executable line, string literal, test or schema moved in the delta, so every judgment below that cites code stands as read on the earlier head. Inputs read: card #36714 (body, triage 7102255110, claim 7177897953, report 7178906203, claim amendment 7180121254, report 7181027705), follow-up #37397, the PR body, and the 70 check-runs on this head (60 success, 10 skipped, 0 failure; Check Changeset, Lint · CI, release & engine gates, Lint · docs & code guards, Test Core, TypeScript Type Check, Dogfood Regression Gate, Build Docs all success). Code outside the diff was read on origin/main, never reviewed: packages/core/src/security/change-record-owner.ts, packages/rest/src/change-owner-routes.ts, packages/spec/src/data/user-action-transfer.ts, api-derivation.ts, injected-system-column-provenance.ts, field.zod.ts, object.zod.ts, packages/lint/src/object-graph.ts, and for the deviation scripts/check-doc-authoring.mjs and packages/lint/src/rule-explanations.test.ts.

① Derived judgments

  • Accept set of os validate / os build / os lint: narrowed. Right, and declared. A stack that parsed and built before is now refused at error (tier gating, all three commands) in three shapes. Clause-②: no (narrowing) + Metadata-protocol: narrowed on the PR body, the changeset and claim amendment 7180121254 agree.
  • The refused set equals the runtime's never-offered set, for what a stack can decide. Right. Read against main:
    • Case 1 (transfer-cascade-parent-without-change-owner): the cascade is reachable only through a Change Owner of the parent; both doors (offeredDefinition in core, the GET …/change-owner/cascades handler in rest) throw 403 CHANGE_OWNER_DISABLED when changeOwnerOffReason(object, def) answers, before transferCascadeRelations is called. The rule's parentOffReason is the same three-step function (resolveUserActionTransfer(def).enabled → transferIneligibilityReason → authored switch vs controlled_by_parent default), on the same spec predicates. No arm refused that the endpoint serves.
    • Case 2 (transfer-cascade-extension-child-ineligible): transferCascadeRelations drops a child when transferCascadeIneligibilityReason(child) !== undefined; the rule asks the same predicate of the served child. Limited to extension fields because refuseIneligibleTransferCascades already refuses the object's own fields at parse.
    • Case 3 (transfer-cascade-child-update-unexposed): the runtime filter is canServeApiOperation(child.enable, 'update'), defined as apiExposureDenialReason(…) === null; the rule calls apiExposureDenialReason(childDef.enable, 'update'). Identical verdict.
    • Field filter: declaresCascade is byte-for-byte the runtime's ('cascade', lookup | master_detail, multiple !== true), and the parent is read through referenceTargetOf with the same try/catch.
  • No false refusal found. Unknown objects are skipped on both sides (a parent or an extension target the stack does not declare), a sys_ parent is left to FieldSchema. Authored vs registered shape: transferIneligibilityReason reads resolveInjectedSystemColumns / resolveInjectedColumnProvenance, which are documented and built to give one verdict for pre-injection and post-injection input (an absent owner_id and the platform's own definition both read as the platform anchor), and ownerFieldDeclaredReadonly reads both fields shapes, so judging the authored stack agrees with the runtime judging the registered definition. ObjectExtensionSchema's merge carries no userActions, ownership, managedBy, sharingModel or enable, so no other package can flip a verdict except by adding a field, which objectsAsServed folds in for the stack's own extensions.
  • fieldPatches arm of the card's case 2 cannot occur. Right. The patch shape refuses transferBehavior as an unrecognised key; a test pins it. The card's premise is narrower than written, and the PR says so.
  • Public surface of @objectstack/lint: added (validateTransferCascades, three rule-id constants, TransferCascadeFinding). Right, exported from the barrel beside its siblings.
  • @objectstack/spec: one data file (the ADR-0087 semantic entry); no schema, no export, no generated artifact moves. Right.
  • @objectstack/core: one CALLERS row in a .pin.test.ts. The package publishes dist, README.md, CHANGELOG.md only; nothing ships. Right, and the row's classification (not-a-served-read, authoring-time static analysis) is true of the new caller of referenceTargetOf.
  • Wiring matches the siblings (validateAiContext / ai-context-*, feat(ai): ai_context context packs and the get_record_context tool over MCP (ADR-0160 row 5) #37173): registry entry in authoring-rules.ts with source, surfaces and a surfaceReason; barrel export; one os explain entry per id in rule-explanations.ts and in RULE_EXPLANATIONS; the second-object-read-exposure pin row; the four CLI transcripts 79 → 80 (no fifth transcript carries the count).

② Semver level

  • @objectstack/lint minor and @objectstack/spec minor: right. The kind is narrowed, which takes at least minor on each package the diff moves; both are moved, @objectstack/core is not (test file only) and is correctly absent.
  • Clause-②: no (narrowing): right. No published accept set of the spec schema or public surface widens (new lint exports are additive API, not a metadata accept set); the authoring tools refuse what they accepted. The arm is on the PR body, the changeset body and the claim amendment.
  • ADR-0087: the changeset carries exactly one marker, registered transfer-cascade-never-offered-refused, and the entry of that id exists in the diff. The FROM → TO and the one-line fix are in the changeset body (Fix: set the field's transferBehavior to 'none' or remove it, or change the object the message names).
  • S1: closed. The changeset body now opens its prose with **BREAKING** for a stack that declares one of these cascades: …, naming who is broken, that the fix follows, and that no data changes. The banner is the spelling check-adr-0087-registration reads as its BREAKING signal, beside the arm and the kind; Check Changeset and Lint · CI, release & engine gates are success on this head. The marker count is still exactly one.

③ Boundary flags

④ Design judgment

The narrowing against the published spec on main: it takes no declared capability away. transferBehavior: 'cascade' keeps every case in which the Change Owner endpoint acts on it; the three refused shapes are ones the endpoint already drops on every call, silently. The rule makes the spec's own contract (liveness row transferBehavior: "offers and runs only declared single-value cascades whose child offers Change Owner") real at author time, which is what ruling 7000907189 point 4 ("parse or lint") and ADR-0049 ask. error is the right severity: each verdict is decidable from the stack, and the object's-own-field half of case 2 is already a parse error, so a warning here would grade the same mistake two ways.

  • packages/lint/src/validate-transfer-cascades.ts against change-record-owner.ts: agrees, as ① sets out (file unchanged in the delta). The file imports the predicates and holds only the walk, so the two cannot drift by re-implementation; the remaining drift surface is the walk's field filter, which is the runtime's.
  • packages/spec/src/migrations/entries/semantic/18.transfer-cascade-never-offered-refused.ts against the rule: surface lists every arm transferIneligibilityReason has plus both switch-off origins, both extension and own-field carriers, and both exposure reasons; replacement names the three ids; the acceptance route GET /api/v1/data/PARENT/change-owner/cascades is the registered route. "No mechanical rewrite" is right: dropping the cascade and changing the object are different intents.
  • rule-explanations.ts: the three entries state where the verdicts come from, what is skipped and that the publish gate does not run them yet. Accurate against the code.
  • content/docs/api/data-api.mdx: the added sentence is accurate and sits beside the existing multi-value refusal.
  • N1 (nit) — a cascade on a field the object declares itself, on an object that is eligible as authored but ineligible as served (an in-stack extension declares owner_id readonly: true on it, or the like), is refused by neither the parse (authored object is eligible) nor case 2 (extension fields only), and the runtime never offers it. Exotic, disclosed, runtime-safe. The served child is already in hand at that point: judging every site against it and reporting a non-extension site only when the authored object passes would close it.
  • N2 (nit) — the test pins four of the parent arms (org, none, managedBy, switch off) and the controlled_by_parent default. business_unit, systemFields: false, a readonly owner_id, an unprovable external owner and the object form userActions.transfer: { enabled: false } are covered only through the shared predicate's own tests. Enough for the contract; a row for the readonly owner_id arriving through an extension would also pin the served-object read on the parent side.
  • N3 (nit) — parent !== undefined && in the case-1 condition is redundant (parentReason is defined only when parentDef is, which requires parent).

No must-fix and no should-fix open. The delta breaks nothing: it adds one changeset paragraph and two comments, and every check-run on this head is success or skipped. N1 to N3 stand as nits; N1 is not in #37397's scope and may ride with it or be left.

Implemented-by: claude/issue-36714-transfer-cascade-lint
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: df622665dbdf34a43b0790ac4887404f7281a802
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: open draft against main, 13 files, Fixes #36714, Clause-②: no (narrowing), Metadata-protocol: narrowed. The delta since ffd2cb6d is 3 files (+10/−2): a changeset paragraph, a changeset clause and two code comments.
  2. Rework closed (contract record 7181096465):
  3. Gates: check-runs at df622665db: 60 success, 10 expected skip, 0 failed. Dogfood Regression Gate is green. dogfood_battery at this head is in the os-dev-report, card comment 7181027705 (487 files passed, 3 skipped, exit 0).
  4. Accepted deviations: (a) the comment-only placement of lint: refuse the three never-offered transferBehavior: 'cascade' shapes at the runtime publish gate too (Studio and MCP saves), not only in os validate / build / lint #37397 (above); (b) contract nits N1–N3.
  5. Out of scope and where it went: the publish-gate crossing goes to lint: refuse the three never-offered transferBehavior: 'cascade' shapes at the runtime publish gate too (Studio and MCP saves), not only in os validate / build / lint #37397. Skills-docs is row 7178935378 on Skills revisions · week of 2026-11-20: shipped skills/** text fixes batched into one PR #35769.
  6. Landing terms: ungoverned, default tier, narrowing. L2 at CONTRACT_REVIEW_TIER: PASS, comment 7181096465, same head, no must-fix, no should-fix. Security-touching: yes. The area lands it via landing-operations §B (--land reads the dogfood report).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Landing · area o5-D · 2026-11-26T02:49Z · on L1 ACCEPT 7181123147 and contract review PASS 7181096465 at df622665dbdf34a43b0790ac4887404f7281a802

Probe Reading
check-governed-merges.mjs --pr 37382 NOT governed · 0 of 13 paths · 686 changed lines ≤ 3000
landing-k.mjs --pr 37382 K = 5 < 15 · no locale pack · no shared book moved
dogfood battery ((narrowing) arm) run at this head, os-dev-report 7181027705: 487 files passed, 3 skipped; VERDICT command-exit 0

State: ready + auto-merge now; on MERGED the area closes out #36714 (Fixes); the publish-gate half stays on #37397.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 02:49
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

维护者速读

  • 改了什么:新增一条校验规则。对象字段写了 transferBehavior: 'cascade'(换负责人时连带转移子记录),但运行时的「换负责人」动作永远不会提供这个连带时,os validate 和构建直接报错。三种情况:父对象关了换负责人、子对象是不合格的扩展、子对象不开放更新接口。
  • 为什么:这类声明写了也不会生效。按「声明即强制」改为构建时响亮拒绝,防止 AI 写出无效配置。
  • 风险:属于收窄,以前能构建的这三种写法现在报错。规则与运行时共用同一组判定函数,复核没有找到误拒;dogfood 全量在现 head 通过(487 个文件)。Studio/MCP 保存时还不拦,后续卡 lint: refuse the three never-offered transferBehavior: 'cascade' shapes at the runtime publish gate too (Studio and MCP saves), not only in os validate / build / lint #37397 跟进。
  • 要你做什么:批准合并。契约复核 PASS 在评论 7181096465,Head-sha df622665dbdf34a43b0790ac4887404f7281a802。

席位意见:ACCEPT。拒收集合与运行时永不提供的集合一致,收窄仪式齐全(BREAKING 横幅、ADR-0087 标记、迁移说明、dogfood)。上一条核对把落地条款写成「无需治理」是席位的错,申报收窄须人工批准,本条更正。

席位核对

Head-sha: df622665dbdf34a43b0790ac4887404f7281a802
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: open draft against main, 13 files, Fixes #36714, Clause-②: no (narrowing), Metadata-protocol: narrowed. The delta since ffd2cb6d is 3 files (+10/−2): a changeset paragraph, a changeset clause and two code comments.
  2. Rework closed (contract record 7181096465):
  3. Gates: check-runs at df622665db: 60 success, 10 expected skip, 0 failed. Dogfood Regression Gate is green. dogfood_battery at this head is in the os-dev-report, card comment 7181027705 (487 files passed, 3 skipped, exit 0).
  4. Accepted deviations: (a) the comment-only placement of lint: refuse the three never-offered transferBehavior: 'cascade' shapes at the runtime publish gate too (Studio and MCP saves), not only in os validate / build / lint #37397 (above); (b) contract nits N1–N3.
  5. Out of scope and where it went: the publish-gate crossing goes to lint: refuse the three never-offered transferBehavior: 'cascade' shapes at the runtime publish gate too (Studio and MCP saves), not only in os validate / build / lint #37397. Skills-docs is row 7178935378 on Skills revisions · week of 2026-11-20: shipped skills/** text fixes batched into one PR #35769.
  6. Landing terms: Tier H by the declared-narrowing leg (correcting 7181123147 §6, which wrongly said ungoverned). L2 at CONTRACT_REVIEW_TIER: PASS, comment 7181096465, same head, no must-fix, no should-fix. Security-touching: yes. Waits for the approver; after approval the seat lands it (ready, auto-merge, queue).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Approval requested (declared narrowing: Clause-②: no (narrowing), Metadata-protocol: narrowed; the queue guard dequeued it at the narrowed-spec leg). Seat ACCEPT: comment 7181530291. Contract review PASS at CONTRACT_REVIEW_TIER: comment 7181096465, Head-sha df622665dbdf34a43b0790ac4887404f7281a802. dogfood_battery at this head: card comment 7181027705. After approval 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 26, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit f9dd033 Nov 26, 2026
80 of 81 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-36714-transfer-cascade-lint branch November 26, 2026 04:16
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…dshake reads '^19' (objectstack-ai#37314)

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Fixes objectstack-ai#37229
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up objectstack-ai#37298

## 维护者速读

- 协议版本从 18 升到 19:仓库里每个示例应用、连接器应用和文档示例都改为声明 19,新建项目模板在出预发布版时自动改成 19;只有装
19 预发布版的人会碰到。
- 属于「19.0.0 大版本」路线(你选的方案「A」第 2 项);它解开 19.0.0-next 的版本
PR:出版本的流水线不接受顺手改协议版本,所以由这一单先改好。
- 装了 19 预发布版、但应用仍声明 18 的人,启动时会被拒绝并提示改成
19(单一配置文件的应用有一条命令可自动改;多包组合的应用要逐个包手改);18.x 正式版用户不受影响;撤回即还原本单。
- 按你对冲突的裁决「A」,本单还改了一道检查:预发布模式下且 spec 已排定大版本时,下架提示写「19.0.0」不再被拦;五条下架提示因此写
19.0.0。
- 要你做的:「进入预发布模式」那一单已合并;本单是大版本变更,请你亲自把关合并。「Check
Changeset」是有意的红:本单改了别人已合并的两条变更说明(各改一处事实)。另一单 objectstack-ai#37298 改三个技能文件,在本单合入之后合并。

## What changes

On the shape of the v18 move (objectstack-ai#22215, commit `4e9fe9f`), minus
`skills/**`.

- **`packages/spec/src/kernel/protocol-version.ts`:** `PROTOCOL_VERSION
= '19.0.0'`. The docblock names protocol 19 as the pre-mode lockstep
exception (ruling records 6049734955 and 7153441862), and says the blank
template follows at the version pass and the published skills' examples
in a change of their own.
- **Handshakes:** 85 sites in 67 files move `engines.protocol` from
`'^18'` to `'^19'`. Each is a manifest that stands for "an app on the
current protocol", and none of them asserts on the range.

| Directory | Files | Sites |
|---|---|---|
| `examples/` (crm, showcase, todo, starter, multi-package ×2) | 6 | 6 |
| `packages/apps/connector-{docusign,github,stripe}` | 3 | 3 |
| `packages/cli` (tests) | 40 | 56 |
| `packages/qa` (7 dogfood tests, the sql-perf bench app, the scenarios
exporter test) | 9 | 9 |
| `packages/lint`, `packages/spec`, `packages/metadata` (tests) | 4 | 5
|
| `packages/mcp/README.md` | 1 | 2 |
| `content/docs` (cli, your-first-project, upgrading) | 3 | 3 |
| `docs/qa/scenarios/builds/travel_expense.json` | 1 | 1 |

`examples/app-starter` arrived from `main` (objectstack-ai#37399) declaring `'^18'`
and moves with the merge. Its boot test, which installs the starter
through `MarketplaceInstallLocalPlugin`, passes 5/5 at `'^19'`. At
`'^18'` it reads 3 failed | 2 passed, refused
`OS_PROTOCOL_INCOMPATIBLE`.

- **`docs/qa/platform-checklist/areas/cli.json`:** one prose fact, "the
stock showcase declares `'^18'`", now reads `'^19'`.
- **`docs/qa/scenarios/builds/travel_expense.provenance.json`:**
`sha256` is the build's hash as it now stands, and a second `amended`
entry names the one edit (`engines.protocol` `'^18'` → `'^19'`) and the
hash it replaced. `cardSha256` is unchanged.
- **The protocol 19 migration step (ADR-0087).**
`packages/spec/src/migrations/registry.ts.template` opens `step19`, with
no conversions yet. Its first semantic entry,
`entries/semantic/19.protocol-18-range-refused.ts`, is the refusal this
PR causes, with the prescription: `--write` rewrites the range of a root
`defineStack` manifest; for a manifest `composeStacks` composes, it
writes nothing and lists the range for a hand edit in each package
manifest. Its acceptance text claims only what the hop does: it edits or
refuses the range. A key retired in this release that the metadata still
carries is refused at parse by its own message, which names its own
remedy. The text no longer says that `validate` passes or that every
package installs. The upgrade guide now generates three hop sections
(17, 18, 19). See "Why a step-19 entry" below.
- **Removal prescriptions stamped after 18.6.0 name `@objectstack/spec
19.0.0`.** `retired-key-removal-version.pin.test.ts` derives the
removing release's major from `PROTOCOL_MAJOR`, so at 19 the retirements
not in the published 18.6.0 name 19.0.0, not 18.7.0, a release the v19
line never cuts: `object-grid` `singleClickEdit` (`component.zod.ts`),
the boolean `field.inlineEdit` (`field.zod.ts`), `listView.columnState`
and `view.columnState` (`view.zod.ts`), and `seed.mode` `'insert'` /
`'replace'` (`seed.zod.ts`). Their text pins, the regenerated
`content/docs/references/ui/{component,view}.mdx`,
`content/docs/data-modeling/seed-data.mdx` and the metadata-protocol
seed pin follow.
- **`scripts/check-future-spec-major.mjs` reads the pre-mode window
(ruling record 7176929521, option A).** On a stable `@objectstack/spec`
label, with `.changeset/pre.json` at `"mode": "pre"` and a pending
changeset declaring `"@objectstack/spec": major`, the next publish is
label + 1, so the gate judges citations against 19 here. That is why the
prescriptions above can name `@objectstack/spec 19.0.0`. The window is
read through `check-changeset-no-major.mjs`'s
`readProtocolLockstepInputs`, the reader the protocol lockstep already
uses; there is no second parser. That file's docblock now names its
three importers (`check-docs-image-tag.mjs`,
`check-future-spec-major.mjs`, `pm/l1-face.mjs`); the change is a
comment. Label + 2, pre mode without a pending spec major, a pending
spec major outside pre mode and a prerelease label each open nothing;
five new self-test rows pin those five cases (34 → 39 cases). An
unreadable `.changeset/` opens nothing either, by the code; no row pins
it. The stable-label condition is the same one `judgeProtocolLockstep`
applies: on a `19.0.0-next.N` label the label's own major is already the
carrier. Reverse verification: with the window condition ablated, the
gate reads 14 problems, the 14 sites.
- **Two fixtures pay a dynamic load at module top**
(`validate-flow-region-shape.test.ts`,
`plugin-artifact-packages-attribution.test.ts`).
`check:test-source-alias` judges every test file a diff edits, and both
edits here are the range literal. The gate prescribes exactly these
imports.
- **`.changeset/37229-protocol-19.md`:** `"@objectstack/spec": minor`
and `"@objectstack/mcp": patch` (its shipped `README.md` changes), the
two declaration lines, a BREAKING note with the FROM → TO and the
command, and `registered protocol-18-range-refused`.
- **DELIBERATE CORRECTION of two existing changesets.** `Check
Changeset` stays red on both by design: each note is on the merge base,
and each changes only the facts this PR makes false.
- `.changeset/37223-v19-line-opens.md` (carried N1 of objectstack-ai#37230's L1, and
N3 of this PR's L1), two sentences. "The first is `@object-ui/i18n`'s
retirement …" now reads "The first change graded `major` is
`@object-ui/i18n`'s retirement …", because this PR's protocol move is a
breaking change graded `minor`. "`PROTOCOL_VERSION` follows
`@objectstack/spec`'s major at version time." now reads
"`PROTOCOL_VERSION` moves to 19 ahead of the version pass, in its own
changeset."
- `.changeset/37042-skills-inline-edit-boolean.md`, one clause: "The
spec parse refuses `true` and `false` on a relationship field's
`inlineEdit` since 18.7.0" now reads "… since 19.0.0", the release the
retirement ships in.
- **Carried from objectstack-ai#37230's L1, N3 —
`ui/packages/i18n/scripts/released-keys-removed.mjs`** refuses an
argument it does not know (exit 2, naming it), and prints the tag's
commit: `^{commit}` peels the annotated tag. Measured: the tag
`@object-ui/i18n@18.6.0` is a tag object `0dbef86ce3`, and the script
now prints its commit `958ee03594`. The script is not in the package's
`files[]`, so it publishes nothing and needs no changeset.

## Judgments: every `'^18'` left in place, with its reason

| Site | Reason |
|---|---|
| `skills/**` (3 files) | Governed Tier H; the sibling PR objectstack-ai#37298. |
|
`packages/create-objectstack/src/templates/blank/objectstack.config.ts:38`
| The version pass stamps it with the template's `@objectstack/*`
versions, and `template-consistency.test.ts` holds it equal to the
scaffolder major (create-objectstack is 18.6.0). Measured: moved to
`'^19'` now, that test goes red; the version-pass rehearsal below stamps
it `'^19'`. Same judgment as objectstack-ai#22215. |
| `packages/cli/src/utils/protocol-version-gap.test.ts:82` | Paired with
an explicit installed `'17.2.0'`: "a newer major is silent". The subject
is the pairing, not the current protocol. |
| `packages/metadata-core/src/artifact-forward-conversion*.test.ts`,
`protocol-handshake.test.ts` | The subject is the artifact's floor
against an injected runtime label (the v18 prerelease major-step
window), or a range/major pair. No handshake against `PROTOCOL_VERSION`
runs. |
|
`packages/metadata/src/plugin-artifact-forward-conversion-{major-step,package-body}.test.ts`
| The same age subject at the metadata door, which runs no handshake. |
| `docs/qa/platform-checklist/areas/platform-core.json`, item
`platform-core.protocol-18-handshake-and-stored-replay` | Revised in
place to protocol 19 (revision 6, with its history entry). The id keeps
its protocol-18 slug because ids are immutable. Its `'^18'` now stands
for the refused case: `'^18'` → 422 `OS_PROTOCOL_INCOMPATIBLE` naming
`os migrate meta --from 18`, `'^19'` admitted, and the artifact step
edits the copy's range to `'>=18.0.0'`, as the option-B fixture does. |
| `content/docs/releases/**`, `docs/adr/**`, `**/CHANGELOG.md`,
`.github/workflows/release.yml` (comment), script comments |
Release-owned, governed or historical prose. |
| `ui/**` tests,
`packages/runtime/src/domains/packages-ensure-customization.test.ts`,
`scripts/docs-audit/affected-docs.mjs` | Not a protocol handshake
(`requiredRange` of a later refusal, a package-dependency range, a React
peer range). |

Moved to `'>=18.0.0'` (5 sites, commit `e05fdf6f`):
`packages/runtime/src/standalone-stack-option-b-forward-conversion.test.ts`.
It boots through the load seam, which refuses `'^18'` at protocol 19.
Measured: `ProtocolIncompatibleError: package 'com.test.ob.core' targets
protocol ^18 … Run: objectstack migrate meta --from 18`, 3 cases. Its
subject is the conversion window, which opens on the floor. `'>=18.0.0'`
keeps the floor (18.0.0, as `parseRangeFloor` reads `^18`) and admits
19. This is the same move as objectstack-ai#22215's two runtime fixtures (`>=17.1.0`).
The fixture's docblock now says why, so a later sweep to `'^19'` does
not close the window.

## Why a step-19 entry (the ADR-0087 disposition)

`Metadata-protocol:` is judged from content. A 19 runtime refuses an
authored value, `engines.protocol: '^18'`, that 18 admitted. That is
`narrowed`, and the `Clause-②` arm is `narrowing`, as in objectstack-ai#22215. On a
declared `narrowed`, `check:adr-0087-registration` refuses `not-required
(no-migration-prescription)` outright and asks for a registered entry.
Measured: "`not-required (no-migration-prescription)` is refused on a
changeset that declares `Metadata-protocol: narrowed` … fix: register an
entry under packages/spec/src/migrations/entries/semantic/". No entry at
the merge base covers the refusal, so this PR opens step 19 with one
entry, and the upgrade guide carries the prescription.

## Acceptance notes

- **Docs versus npm `latest`.** The three docs pages show `'^19'`, as in
objectstack-ai#22215. npm `latest` stays 18.6.0 until 19.0 GA, and an 18.x runtime
refuses `'^19'`. The changeset says to move the range together with the
`@objectstack/*` versions.
- **Size.** 92 files, +440 / −161 against `main` (GitHub at
`3811cd10f5a`), under the 3,000-line threshold.
- **Out of this PR, found by the version-pass rehearsal.** On the
post-version tree, `check:release-notes` is red: `@objectstack/spec`
ships 19.x and there is no curated `content/docs/releases/v19` page. It
is red on the control leg too (main + objectstack-ai#37230, without this PR), so
objectstack-ai#37230's `major` causes it, not this PR. Release pages are
release-owned, so this PR does not write one. Until one exists, the
version-PR lane still refuses the 19.0.0-next refresh, on that gate
alone.
- **objectstack-ai#37287 and step 19.** objectstack-ai#37287 registered its retirement,
`KnowledgeChunk.metadata`, under step 18; it reached this branch through
the merge of `main`, and its refusal says "removed in @objectstack/spec
18" (`packages/spec/src/ai/knowledge-document.zod.ts:61`). Once protocol
19 is on `main`, `os migrate meta --from 18` replays only step 19, so a
retirement that ships on the v19 line and is filed under step 18 is not
listed to an 18 → 19 upgrader. objectstack-ai#37287 is one member of the family
"step-18 entries registered on `main` after the 18.6.0 tag" (31 step-18
semantic entry files at this head that the 18.6.0 tag does not carry,
and 34 on `main` at `5d21d431ec`, after objectstack-ai#37382, objectstack-ai#37392 and objectstack-ai#37395). That
card is follow-up owed (seat).
- **The dev's open questions, as built (seat reading at L1):**
- The declaration is `yes (narrowing)` + `narrowed` with a step-19
entry, rather than `semantic`.
  - The blank template stays `'^18'`, and the version pass stamps it.
- The metadata and metadata-core floor-subject sites are kept. The
option-B runtime file moves to `'>=18.0.0'`.
- The gate conflict between `check-future-spec-major` and the
removal-version pin is resolved by ruling record 7176929521, option A
(above).

## Verification

Two-minute check: `node scripts/check-future-spec-major.mjs` prints `✓
check-future-spec-major: no @objectstack/spec citation names a major
above 19` and `pre-mode window: label major 18, pre mode next, pending
major for @objectstack/spec in .changeset/37223-v19-line-opens.md — the
next publish carries 19`, and exits 0. `node
scripts/check-changeset-no-major.mjs --base origin/main` prints `✓
Protocol lockstep: PROTOCOL_VERSION major 19, @objectstack/spec@18.6.0 —
the one exception, evidenced: pre mode (tag next) and a pending major
for @objectstack/spec (.changeset/37223-v19-line-opens.md).` and exits
0.

Read first:
1. `.changeset/37229-protocol-19.md` and
`packages/spec/src/migrations/entries/semantic/19.protocol-18-range-refused.ts`:
what an upgrading author is told.
2. `packages/spec/src/migrations/registry.ts.template`, the new
`step19`: the ledger's protocol 19 step opens here.
3. `scripts/check-future-spec-major.mjs`, `judgedMajor` and the five new
self-test rows: the one gate this PR changes.
4. The Judgments table: every `'^18'` left in place.

<details><summary>Readings at <code>3811cd10f5a</code> (the dev's,
through the verify lock, and the seat's L1)</summary>

- **CI at `3811cd10f5a`:** 70 check-runs, 60 success, 9 skipped, 1
failure. The failure is `Check Changeset`, by design: its two file
annotations name the two DELIBERATE CORRECTION notes, and its ADR-0087
and no-major steps are green. All eleven required contexts are success,
`Test Core` 10/10 included, and so is `Type Check · source gates`.
- **Tests:**
- dogfood full battery (os-dev-report 7183121949 on objectstack-ai#37229): Test Files
487 passed | 3 skipped (490), Tests 4129 passed | 68 skipped (4197),
VERDICT command-exit 0.
- whole spec suite: Test Files 896 passed (896), Tests 28442 passed | 1
todo (28443).
- `examples/app-starter` boot test: 5/5 (re-run by the seat). With the
range put back to `'^18'` through `ablation-replace`, it reads 3 failed
| 2 passed, refused `OS_PROTOCOL_INCOMPATIBLE`; the restore was proven
with `git diff HEAD` empty.
- `retired-key-removal-version.pin.test.ts` and
`protocol-version.test.ts`: 2 files, 68/68 (re-run by the seat).
- **Guards:**
- `check-future-spec-major` exits 0, and `--self-test` reads `39 cases
pass` (re-run by the seat). The gate file is byte-identical to
`9ed0f5e41f6`, where the seat ablated `stable`, the pending-major
condition, the pre-mode condition and `+ 1` in turn: one self-test row
went red each time, and with the window off the scan read the 14 sites.
Each ablation was restored with `git diff HEAD` empty.
  - `check-changeset-no-major --base origin/main` exits 0.
- `check:adr-0087-registration` exits 0 with `registered
protocol-18-range-refused`.
- `dispatch-gates --commands` derives 150 families on this diff. Two are
red: `check-empty-changeset` by design (the two DELIBERATE CORRECTION
notes), and `check:platform-checklist` on `areas/automation.json: ABSENT
SYMBOL … FlowItemMoreMenu.tsx#FlowItemMoreMenu`, which `main` itself
carries (reproduced on `origin/main` `ecbe854bda`; this diff touches
neither path). The other 148 exit 0.
- **Against current `main` (`5d21d431ec`, 9 commits past the merge
base):** `git merge-tree --write-tree` is clean, and the merged tree
carries the same `'^18'` lines as this head. `main` added no other
handshake at `'^18'`.

</details>

<details><summary>Earlier readings (the dev's, on 9da4c1d plus the
fixture fix, and at 8852bcb for the <code>--write</code>
reach)</summary>

Not re-run at `3811cd10f5a`. Of the code these read, this PR changed
only the step-19 entry's text and the `examples/app-starter` range after
them. The merges of `main` brought other changes in, and CI at the head
is green.

- **Handshake**, from the built `@objectstack/metadata-core` on protocol
19: `'^18'` → `incompatible OS_PROTOCOL_INCOMPATIBLE … Run: objectstack
migrate meta --from 18`; `'^19'` → `ok`.
- **Prescription**, with the built CLI. On a `'^18'` copy of
`examples/app-todo`, `os migrate meta --from 18` lists the step-19
entry, and `--write` rewrites `objectstack.config.ts:48` to `'^19'`. On
`examples/app-multi-package` with both package manifests at `'^18'`,
`--write` writes nothing and prints the range for a hand edit (`manifest
is composed by composeStacks(…)`).
- **Template control leg:** moving the blank template to `'^19'` now
turns `template-consistency.test.ts` red (`expected 19 to be 18`).
- **`release.yml` version-pass rehearsal.** The `version-pr` Render and
Validate blocks were extracted verbatim and run in a throwaway clone:
- Results: `PROTOCOL_VERSION already 19.0.0`; the template is stamped
`'^19'`; unvalidated surfaces 0; 14 of 15 content gates green;
`check:release-notes` red.
- Control (main + objectstack-ai#37230 without this PR): `protocol-version.ts` is
unvalidated, with the same release-notes red.
- **Tests:** cli 677 files, 8441 tests passed; runtime 647 files, 11978
passed | 25 skipped (the option-B file fails 3 cases at 9da4c1d and
passes 6/6 at e05fdf6); metadata, metadata-core, lint, mcp,
create-objectstack, scenarios and the example tests all green;
`validate` exits 0 for 4 examples and 3 connector apps.

</details>

## Provenance

Opened by seat repo:objectstack#4 on the maintainer's authorization in
the seat session (「objectstack-ai#37229 的两个 PR 开 PR 时被拦了:放行」). The dev session
(`session_01QSeKYnLptCbfzwtkTrDG3j`, zone a4-S) had three writes refused
by its permission check, and none was retried: its relay `pr_create`,
the hand-off of the payload to the seat, and the push of the runtime
fixture fix. The seat read the prepared body from that session's final
message. The fixture fix was then re-applied and pushed as `e05fdf6f`
(fast-forward, five sites in one test file) by a seat-dispatched dev, on
the maintainer's authorization 「objectstack-ai#37229 夹具修复推送放行」. Rework round 1 (seat
L1 7170046632) pushed `3fdf3490b9` to `43133e8ce5`. After ruling record
7176929521, `c871272e47` merged `origin/main` `db77cc493a`, `e5a7e35bff`
regenerated the two ui reference pages from the merged tree, and
`9ed0f5e41f` changed the gate. Rework round 2 (seat L1 7181615974, L2
7181629335): `d47c169db75` merged `origin/main` `da7c559990`, and
`3811cd10f5a` moved `examples/app-starter` to `'^19'`, narrowed the
step-19 entry's acceptance text, and corrected a comment in
`check-changeset-no-major.mjs`. Branch
`claude/issue-37229-protocol-version-19` @ `3811cd10f5a`.

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

https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ

---------

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

Projects

None yet

3 participants