Skip to content

fix(metadata-protocol)!: a package-less action save on an object no package binds the name to writes the environment's own action - #34238

Merged
os-zhuang merged 33 commits into
mainfrom
claude/area-E1-34059
Nov 17, 2026
Merged

os-zhuang merged 33 commits into
mainfrom
claude/area-E1-34059

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
Fixes #34059

Clause-②: yes (narrowing)
Metadata-protocol: semantic
Skills-docs: none — no skill under skills/** teaches where a package-less save of a writable package's item is written; skills/objectstack-platform teaches only the managed base's .custom pair, whose refusals do not move.

维护者速读

  • 改了什么:环境不带包名保存一个动作(PUT /meta/action/NAME,无 ?package=),无论直接保存还是草稿保存(?mode=draft)再按条发布,只要持有这个名字的包都把它绑在别的对象上,就写成环境自己的动作行,绑在本次保存的对象上;包里的动作原地不动。ADR-0150 D4 增补注记与 R15 指针、SaveMetaItemRequest.packageId 的说明随本 PR 落地。
  • 为什么改:维护者裁决 6902014292(方案 B):动作按 ADR-0150 D4 的键 (package, objectName, name) 认定。以前这种保存被改写进那个包,把包的动作从 A 对象挪到 B 对象,回执还写着包名;草稿门与按条发布有同样的缺陷。
  • 风险与回滚:只对 action 生效;同对象保存、其它类型、托管(代码)包照旧。BREAKING(收窄):原来写进包(或被 409、422 拒绝)的几种保存现在写成环境行,逐条列在 changeset。尚未改的:环境行没有不带包名的按名读取、不在列表里,不带包名的删除删掉的是包的行(metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904)。回滚 = revert 本 PR。
  • 先看:packages/metadata-protocol/src/protocol-save.ts(风险 hunk:packagelessActionKeyedAddress 与 servedPackagelessSaveAddress 新增的 atObject 分支)→ packages/metadata-protocol/src/sys-metadata-repository.ts(actionHeldOnlyOnOtherObjects 与 resolveWriteHead 的草稿分支)→ packages/metadata-protocol/src/protocol-lock-version-gates.ts(packagelessDraftAddress:按条发布、草稿丢弃与草稿门共用的地址)。
  • 两分钟验证:pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.packageless-save-address.test.ts -t "ADR-0150 D4",预期 35 个用例全绿;在 main 上标 FROM 的负向用例转红(回执写着包名,包的动作被挪走)。
  • 需要你做的:Tier H,合并要维护者本人批准;contract review owed(PASS 记录出现后把 id 填在这里)。

What changes

ADR-0150 D4 keys an action (package, objectName, name), and the ruling on #34059 (6902014292, option B) puts that key on every door that writes an action naming no package. The doors used to address such a write by name alone: into the one package whose active row holds the name, whatever object that package binds it to, so the package's declaration moved onto the saved object.

  • One rule. actionHeldOnlyOnOtherObjects (sys-metadata-repository.ts, module-level, not exported from the package entry) reads the item's active rows: true when some row is bound to a package and none of those rows binds the object the body binds (boundObjectOf, the owner-key reader the read side uses; object-less is its own key). A stored body that does not parse counts as binding the body's object, so it never drops a holder. actionRowsBindingObjectOf is the object filter it reads.
  • Publish-mode save. saveMetaItemUnaudited asks packagelessActionKeyedAddress after the address is read. When the rule holds, packageId stays empty and the save writes the package-unbound row. When some holder binds the body's object and another binds another object, the served step (servedPackagelessSaveAddress, atObject) judges the holders at the body's object only: it skips the by-name read judgment and the by-name content package, and with only disabled holders there, the address is theirs, as packagelessAddress answers a name only disabled packages hold. Every holder on the body's object: unchanged. When no holder at the body's object is disabled, that at-object judgment declines and the name's own served judgment answers, as on main: an enabled holder on the body's object beside a disabled holder on another object takes the write (without the fallback that cell fell to the two-binding refusal, 409 naming both).
  • Draft save. SysMetadataRepository.resolveWriteHead takes the body (from put, and from headAt for the save's parent and receipt). Under the rule a package-less draft write inherits no package, ahead of its two-binding refusal. Its orphan-draft adoption no longer takes an unbound action draft bound to another object than the body: that is the environment's own pending draft, and it stays.
  • Draft address: per-item publish, draft discard, draft read, and the save's draft gates. packagelessDraftAddress (body in protocol-lock-version-gates.ts; its wrapper in protocol.ts gains the body parameter and two host reads, the only protocol.ts edit) asks the rule above its two-holder refusal: of the saved body first, for a draft save (as the repository does); of the stored package-unbound draft's body, for the doors that act on a stored draft, wherever no package's own draft is the address. Under the rule the address is the package-unbound draft, promoted into the package-unbound row. The address is one rule in one place for all four doors; protocol-history-and-publish.ts carries only the publish's slot refusal (below), not an address of its own.
  • The environment's one slot. The environment keeps one package-unbound row and one package-unbound draft per action name. environmentActionSlotRefusal (protocol-save.ts) refuses an environment-own write (publish or draft) over that row or draft when it binds an object a package's active row binds: it is that package's customization, and the write would move it. 409 RESOURCE_CONFLICT naming the holder, nothing written, no new code. The per-item publish of the environment's draft writes that same row, so it asks the same refusal of the draft it promotes (environmentActionPublishSlotRefusal, called from promoteDraftForPublish whether the caller names no package or, in process, states packageId: null), and the draft save asks it of the stored package-unbound row as well as the stored draft. Over the environment's own row or draft bound to another object no package binds, the write rewrites it onto the body's object, as a save of a name no package holds always has (declared in the changeset).
  • ADR and spec prose. The ADR-0150 amendment note under D4's customization paragraph (its "every door" sentence names the draft save, the per-item publish and the draft discard, each above its two-holder refusal) and the R15 pointer (lifted for this PR by the ruling); one clause in SaveMetaItemRequest.packageId's .describe, now also stating the version-conflict answer until metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904, with content/docs/references/api/protocol.mdx regenerated (check:generated --fix, re-checked green).
  • Not changed: every other type; a save naming a package; managed (code) packages, refused 403 NOT_OVERRIDABLE by the door's sealed gate and the repository's store backstop before the address is read; two enabled holders, one on the body's object, still 409; an enabled holder on the body's object beside a disabled holder on another object: that enabled holder's row, as on main. One enabled and one disabled holder with the body on the disabled holder's object: the publish-mode save writes the disabled holder's row, while the draft save is still refused 409 naming both (pinned as a CONTROL; the changeset says the two modes differ there).

Every moved answer (writable P, Q; GONE a package that is not installed):

Shape Before After
P on invoice, save bound to task 200, receipt package=P; P's row moved to task the environment's row on task; P's untouched
P on invoice, object-less save same move the environment's object-less row
P on invoice, Q on product, save bound to task 409 naming both the environment's row on task
P disabled, sole holder on invoice, save bound to task written into P's row the environment's row on task
sole row on invoice bound to GONE, save bound to task 422 naming GONE the environment's row on task
P enabled on invoice, Q disabled on task, save bound to task into P, its action moved to task Q's row on task; P's untouched
draft save bound to task over P on invoice P's draft (receipt package=P) the environment's draft (no package in the receipt)
its per-item publish naming no package over P's row on invoice the environment's row on task
draft save bound to task beside a sole row bound to GONE 422 the environment's draft
its per-item publish naming no package (refused at the save) the environment's row on task
P on invoice, Q on product: draft save bound to task, its per-item publish, its draft discard (each naming no package) 409 naming both, at each door the environment's draft; promoted into the environment's row; removed
P enabled on invoice; Q enabled and R disabled on task; save bound to task 409 naming P and Q Q's row on task; P's untouched (without R: still 409)
P on invoice and a package-unbound row on invoice (P's customization); save bound to task into P, its action moved to task 409 naming P, nothing written (the draft twin the same)
the same customization row; draft save bound to task P's draft, whose publish moved P's action to task 409 naming P, no draft written
the same row, a package-unbound draft on task stored; per-item publish naming no package promoted into P's row, P's action moved to task 409 naming P; the row and the draft stay
the environment's draft on task stored; draft save bound to invoice the environment's draft adopted into P and rewritten on invoice P's draft on invoice; the environment's draft on task stays

Tests

  • packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, describe [ADR-0150 D4] a package-less save of an ACTION on an object the holder does not bind (35 cases, 7 under CONTROLs; since round 4 also the in-process publish stating packageId: null (S6), the draft save beside a customization row and the publish of a stored environment draft beside one; the list below is round 3's 23, and since then: the slot refusal for the stored row and the stored draft, the per-item publish and the draft discard with P's draft and the environment's draft both stored, the version-conflict FROM, and the enabled-on-the-body's-object beside a disabled holder elsewhere cell): 16 negative pins (receipt and rows; ?package=P read; a second save; object-less; two holders on two other objects; sole disabled holder; sole uninstalled binding; enabled holder beside a disabled holder at the body's object; enabled P beside enabled Q and disabled R at the body's object; the draft save with its receipt; the draft save beside an uninstalled binding and its publish; the per-item publish; for two holders on two other objects the draft save, its publish and its discard) and 7 CONTROLs (same-object draft and its publish stay P's; same-object save; the same with the environment's row stored; the same-object draft save with the environment's draft stored (P's draft, the environment's draft stays); a holder on each object 409; one enabled and one disabled holder, the draft save still 409; managed 403, nothing written).
  • packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts (real showcase boot over HTTP): the measured cell; the draft save and POST /meta/action/NAME/publish leg (?package=P still serves showcase_invoice; /actions/_env/showcase_task/NAME judges the environment's); the same-object and managed CONTROLs; and FROM pins for what does not move yet (metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904): a save on showcase_task carrying the version the bare read served (If-Match) is refused 409 as a version conflict, before and after the environment's row exists; the bare by-name read serves P's item, and a package-less DELETE answers Deleted action 'NAME' (package=P), and it still exists: its package-less row remains, after which ?package=P is 409 RESOURCE_CONFLICT (held by the environment only).
Ablations (ablation-replace.mjs, each restored to blob == HEAD with git diff HEAD empty; trap restore on exit)

Unit file, source-resolved (./protocol.js, no dist step), -t 'ACTION on an object the holder does not bind':

  • D-draft, resolveWriteHead's rule (if (body !== undefined && actionHeldOnlyOnOtherObjects( to if (false && …): 2 failed, the draft save (Received "com.qa.lanebapp" for the draft's binding) and the per-item publish.
  • P-publish, promoteInto = null; to void 0;: 1 failed, the per-item publish (P's row overwritten).
  • S3-atobject, the keyed address (if (actionRowsBindingObjectOf(item, held).length === held.length) return undefined; to if (held.length >= 0) …): 1 failed, Expected … package=com.qa.otherapp …, Received … package=com.qa.lanebapp … (the FROM).
  • E-envown, the environment-own arm (if (actionHeldOnlyOnOtherObjects(type, item, activeRows)) return 'environment'; to if (activeRows === null) …): 7 failed, every publish-mode negative pin, including the sole disabled holder (Received … package=com.qa.lanebapp …) and the uninstalled binding (Cannot save action 'approve_p' without naming a package: its stored rows are bound to package 'com.qa.uninstalled', which is not installed).
  • H-head, the save's write head body (body: request.item, to body: undefined,): 1 failed, the draft receipt (Received "Saved action 'approve_p' (env-wide, package=com.qa.lanebapp, state=draft) [seq=2]").
  • G-gates, the draft gates' address (=== 'environment' to === 'never'): 1 failed, the draft beside the uninstalled binding (the 422 text above).
  • Round 3, at 1b08a46eec (the same unit file filter, 23 cases), each restored to blob == HEAD with git diff HEAD empty:
    • M1-ambiguous (the stored-draft check above the two-holder refusal disabled): 2 red, the two-holder publish and discard (Name the package this publish is for and … delete is for …, naming both).
    • M1-single (the stored-draft check where P holds no draft disabled): 2 red, the single-holder publish and the publish beside the uninstalled binding (Cannot publish action 'approve_p' into package 'com.qa.uninstalled').
    • M1-body (the saved-body check disabled): 2 red, the draft save and its publish beside the uninstalled binding (the 422 text).
    • S1-adopt (the adoption skip disabled): 1 red, the same-object draft with the environment's draft stored.
    • S3-atobject: 2 red, the enabled-beside-disabled pin and the enabled-plus-disabled pin. FROM for the latter: Name the package this save is for … belongs to 2 packages ('com.qa.lanebapp', 'com.qa.otherapp').
  • Round 4, at 61f86b4c85 (the unit file, 100 cases), the at-object fallback removed (?? await servedPackagelessSaveAddress(…, address) folded back into the old single call), restored with git restore --source=HEAD --staged --worktree, porcelain empty: 1 red, the enabled-on-task beside disabled-on-invoice cell (the save refused 409 naming both).
  • Round 6, at 017deafea7 (103 cases): the publish guard back to !('packageId' in request) && …, 1 red (the packageId: null pin); restored, porcelain empty.
  • Round 5, at aaa0897430 (the unit file, 102 cases), each restored with git restore --source=HEAD --staged --worktree, porcelain empty: the publish guard off, 1 red (the publish pin); the draft-save address condition back to kind === 'draft', 1 red (the draft-save pin); the draft-save active-row check off, 1 red (the same pin). The FROM of both pins measured with origin/main's five metadata-protocol sources restored: the draft save wrote P's draft on task, and its publish moved P's row to task (the customization row stayed on invoice).
  • Round 1 (head 0e5faaaa, still in force): A1 removing the exception, 5 negative pins red, also on dist/ for the dogfood cell; A2 over-broad, the three CONTROLs red; A3 the managed CONTROL red only with both the door gate and the store backstop lifted.

Acceptance notes

  • ADR-0150: amendment note — a package-less action row on an object no holder binds is the environment's own item (D4 action key; ruling on #34059) #34263 (the ADR-0150 note card): this PR carries the note the card asks for, as the ruling binds. The card has no claim of its own, so it is not closed by keyword. Close it by hand when this PR merges.

  • Not moved yet, routed to metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904 (the read, list and delete half): the environment's row has no bare by-name read and is not in GET /meta/action; a package-less DELETE of the name removes the holder's row. /actions/_env/OBJECT/NAME is the address that reaches the environment's row today. The changeset states all three; the dogfood file pins them as FROM.

  • Prose nits left at the reviewed head (L2 6941877825, N7 and N8): the docblock of environmentActionPublishSlotRefusal opens with "naming no package" without the in-process packageId: null spelling, and the changeset's FROM parenthesis after the in-process publish names P's row where, for that spelling, it was the customization row that moved. Not pushed, so the reviewed head stands; a follow-up edit can carry them.

  • Edge, declared and pinned: with P holding its own draft and the environment's unbound draft both stored, the per-item publish naming no package promotes P's draft and the draft discard naming no package removes it (packagelessDraftAddress returns P's key first); the environment's draft is reached once P has no draft.

Verification

Final head fb520b2f07 (seat repo:objectstack#2 took the card over from seat repo:objectstack#1, hand-over 6933582027). Since the hand-over head 2396f22385: origin/main ed45eb92 merged through scripts/pm/os-regen-merge.sh (073d5e1c66, no conflicted path); the at-object fallback (61f86b4c85, the PROBE cell the hand-over flagged: red before, now pinned); the reference page regenerated (9a1c3b5011); one changeset sentence (f2d1b67f73); the ADR-0150 D4 note's served-address clause (5f635f1e5c, L1 R1 of 6938189771); the slot refusal at the per-item publish and the draft save over a customization row (aaa0897430, L2 M3 of 6938418286, with N4); the ADR note, the spec clause (N5) and the changeset stating it (0a8bebb2) and the reference page (6677a8ff1b); the publish refusal also for an in-process publish stating packageId: null and the draft-save refusal's wording (017deafea7, L2 S6 and N6 of 6940310036); the changeset naming that publish (fb520b2f07). Readings under the shared verify lock where heavy, on fb520b2f07:

  • Closure rebuilt first in the same locked run (pnpm --filter "@objectstack/dogfood^..." build, exit 0).
  • pnpm --filter @objectstack/metadata-protocol test: Test Files 347 passed, 9 skipped; Tests 23046 passed, 45 skipped; exit 0. typecheck: exit 0. The facet file: 103 passed (-t "ADR-0150 D4": 35).
  • Dogfood battery (pnpm --filter @objectstack/dogfood test): exit 0; Test Files 479 passed, 3 skipped; Tests 4058 passed, 68 skipped (the pin file included).
  • pnpm --filter @objectstack/spec check:generated: 14/14 up to date at 6677a8ff1b (with NODE_OPTIONS=--max-old-space-size=8192, which check:test-typecheck needs on this container); packages/spec has not changed since.
  • eslint --no-inline-config over every touched .ts: exit 0.
  • dispatch-gates --ran: 122 derived, 122 run, exit 0. The first run recorded check-plugin-teardown-shape.mjs --self-test exit 3 (its fixture commit is outside the shallow clone); after fetching that commit it ran exit 0, and the final record carries that run.
  • At 61f86b4c85: the two pins of fix(metadata-protocol)!: a bare save or delete counts the holders the bare read counts (ADR-0150 D3/D5) #34324 (now on main), disabled-holder-packageless-row-doors.test.ts 5/5 and meta-disabled-holder-served-stack.test.ts 136/136.
  • git merge-tree against fix(metadata-protocol)!: an exact ?package= read answers its own package's item or a 409 naming the holders, and a bare doc read beside two holders serves the environment's own entry #34347 (0ba6987aec, the other open metadata-protocol PR): no own file in common; only generated paths flagged.
  • CI on fb520b2f07, read once after every run completed: 58 success, 10 skipped, none failed.

Earlier readings (seat repo:objectstack#1 and the first implementer), kept as they were taken:

HAND-OFF STATE (maintainer order, 09:01Z): head db96228e6c. This section still carries the round-2 readings below; round-3 readings are partial and are listed here. At 1b08a46eec:

  • The facet file passed 91/91 after the closure build.
  • metadata-protocol typecheck: exit 0. rest test: Test Files 413 passed; Tests 8497 passed, 350 skipped. dogfood typecheck: exit 0.
  • metadata-protocol test: 1 red, the census pin protocol.view-expansion-reconcile-call-sites.test.ts. It is fixed in db96228e6c (the host binds getOverlayRepo: (...a) => this.getOverlayRepo(...a), the spelling the census reads), but not yet re-run.
  • The dogfood version pin was red because the bare read's body carries no version. db96228e6c reads the body or the ETag, but this is not yet measured.
  • check:doc-authoring: red at 1b08a46eec, which put #33904 in the .describe. Green at a8e34adfa2: exit 1, then exit 0.
  • check:generated: not re-run after the .describe edit. The reference page was regenerated with gen:schema and gen:docs.
  • Not run on the final head: the gates union, the dogfood battery, check-runs.

Head 0ed4158ef6: origin/main a00b422876 merged through scripts/pm/os-regen-merge.sh (it brings #34147, which edits protocol.zod.ts and the generated reference pages); the merge took main's side of content/docs/references/api/protocol.mdx, then gen:schema and gen:docs regenerated it on the committed merge. The own non-generated patch-id (git diff MERGE_BASE HEAD without content/docs/references/**, git patch-id --stable) is a45294cd56 both before (merge base 43dd5656e4, head 6f89ebf980) and after (merge base a00b422876, head 0ed4158ef6): the change is the same bytes. Readings under the shared verify lock.

Typecheck, tests, lint, gates

On 0ed4158ef6 (closure rebuilt first, pnpm --filter "@objectstack/dogfood^..." build exit 0):

  • pnpm --filter @objectstack/spec check:generated: exit 0, all 14 generated artifacts up to date (against the packages/spec/dist that build produced).
  • packages/spec/scripts/root-index.test.ts: Test Files 1 passed; Tests 20 passed; exit 0.
  • The facet file protocol.packageless-save-address.test.ts: 84/84; exit 0.
  • pnpm --filter @objectstack/metadata-protocol typecheck: exit 0.
  • The dogfood pin file action-save-packageless-other-object.dogfood.test.ts: 4/4; exit 0.
  • CI on 0ed4158ef6, read once after every run completed: 58 success, 10 skipped, none failed, including Lint & Repo Gates, TypeScript Type Check, Build Core, Test Core, Test UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards, Governed Surface Queue Guard, Spec property liveness, Build Docs.

Earlier readings, kept as they were taken (the battery and the gates union at 6f89ebf980, the suites at 499f9b47be; not re-run on 0ed4158ef6):

  • pnpm --filter @objectstack/metadata-protocol test: Test Files 344 passed, 9 skipped; Tests 22962 passed, 45 skipped; exit 0. typecheck exit 0.
  • pnpm --filter @objectstack/rest test: Test Files 413 passed; Tests 8479 passed, 332 skipped; exit 0.
  • pnpm --filter @objectstack/dogfood typecheck exit 0; the dogfood pin file 4/4 on a rebuilt dist/ (ablation-dist-preflight.mjs marker packagelessActionKeyedAddress present).
  • Dogfood battery at 6f89ebf980 (pnpm --filter @objectstack/dogfood test, closure rebuilt): lock VERDICT command-exit 0; Test Files 471 passed, 3 skipped; Tests 3989 passed, 42 skipped.
  • eslint --no-inline-config over the six touched source files: exit 0. check:nul-bytes OK.
  • pnpm --filter @objectstack/spec check:generated --fix: 1 of 14 stale (content/docs/references/**), regenerated, re-checked green.
  • dispatch-gates --ran: 120 derived, 117 run (exit 0), 3 NOT MEASURED (exit 3, PREREQUISITE NOT MET): check:skill-examples (client-react unbuilt), check:dual-build-cjs-loads (a package without dist/ while the battery's closure build ran), check:type-check-debt (its closure build queue-timed out behind the battery). CI on 6f89ebf980 (superseded by the reading above): 58 success, 10 skipped, none failed, including Lint & Repo Gates, TypeScript Type Check and its lanes (debt ledger included), Build Core, Test Core 8/8, Test UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, Spec property liveness.
  • git merge-tree --write-tree --name-only HEAD origin/claude/area-E1-33308 (fix(metadata-protocol)!: the diff door refuses a bare two-holder name and compares one holder by ?package= #34147 at 624b7ff393): exit 0, no conflicted path; content/docs/references/api/protocol.mdx is flagged by the merge driver as generated (regenerate on the merged tree).

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ

…lder binds writes the environment's own row

ADR-0150 D4 keys an action (package, objectName, name). The publish-mode
save door re-addressed a package-less action save into the one package
holding the name, whatever object that package binds it to, so the
package's declaration moved to the saved object. When every holder binds
the name to another object, the save now writes the package-unbound row
on its own object and leaves each package's item where it is. The
same-object save, other types and managed packages answer as before.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…r HTTP, and its changeset

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
@github-actions github-actions Bot added size/m 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 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/metadata-protocol, @objectstack/spec, touching 57 documentable anchor(s).

32 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 8bc080847291127d590cb260215a7ce652603d43.

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

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • 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 — 174 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 8bc080847291127d590cb260215a7ce652603d43 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 8bc080847291127d590cb260215a7ce652603d43

⚠️ 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 8bc080847291127d590cb260215a7ce652603d43 → 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

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 0e5faaa · 2026-11-16T03:04Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 0e5faaaa8aa2d5dc5d5b30d9ac4fd6beddcd28ea
Local-runs: none
Scope: packages/metadata-protocol/src/protocol-save.ts, packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts, .changeset/34059-action-save-packageless-other-object.md + packages/metadata-protocol/src/protocol-environment-rows.ts, packages/metadata-protocol/src/protocol-meta-item-face.ts, packages/metadata-protocol/src/protocol-diff-delete-load.ts, packages/metadata-protocol/src/protocol-lock-version-gates.ts, packages/metadata-protocol/src/sys-metadata-repository.ts, packages/metadata-protocol/src/item-lock.ts, packages/metadata/src/package-slotted-store.ts, docs/adr/0150 (D4 customization paragraph, R15) — the cited files are read at this head, not reviewed

Read at 2026-11-16T03:12Z. First review of this head; claim: comment 6906114663; no lane request (owed per check-owed-reviews). Independence: implemented in a project thread for domain:server#5; reviewed by os-tesla, who neither dispatched nor implemented it.

① Derived judgments

Ruling 6902014292 (option B) read against the whole package-less save address in saveMetaItemUnaudited, not only the hunk. The decision table, by code read:

Case (package-less publish-mode save of NAME) Before At this head Ruling Pinned
one writable holder on A, body on A into the holder unchanged unchanged unit CONTROL, dogfood CONTROL
one writable holder on A, body on B into the holder, its action moved environment row on B as ruled unit, dogfood
one writable holder on A, object-less body same move environment object-less row D4 key, consistent unit
two holders on two other objects, body on B 409 environment row on B D4 key; declared unit only
holder on A and holder on B, both enabled, body on B 409 unchanged kept as CONTROL by the area unit CONTROL
managed code package ships the name 403 NOT_OVERRIDABLE unchanged (refused above the address, by name) kept as CONTROL by the area unit CONTROL, dogfood CONTROL
no stored row holds the name environment row unchanged (candidates.length === 0 returns before any read) unchanged existing pins
any type other than action generic re-address unchanged (type !== 'action' returns first) unchanged the L234 describe, untouched
save naming a package, source set, package-duplicate not asked unchanged (outer guard untouched) unchanged existing pins
draft save (mode=draft) of the same body on B inherits the holder; publish moves its action unchanged the ruled defect by another door none — M1
sole holder on A is disabled, body on B into the disabled holder environment row on B consistent with the key none, undeclared — S2
sole binding on A is to a package that is not installed, body on B refused 422 environment row on B consistent with the key none, undeclared — S2
enabled holder on A, disabled holder on B, body on B into the enabled holder, its action moved to B unchanged the ruled defect, silent none, undeclared — S3
  • The branch fires only when actionHeldOnlyOnOtherObjects is true, and it is false for every non-action type, for a name no stored row binds, and as soon as one bound row sits on the saved body's object. The unchanged rows above are unchanged because served and the else arm run exactly as on main when the helper is false. Holds.
  • The helper filters the item's active rows by boundObjectOf (the store's own owner-key reader, objectName then object, object-less sentinels folded) and re-reads the address over the remainder with no member; action carries no item discriminator, so the member-less read equals the door's. A stored body that does not parse keeps its holder. A failed row read rethrows unless the store is unprovisioned. Holds.
  • Receipt: with packageId left empty the message is Saved action 'NAME' (env-wide, state=active) [seq=N], pinned by exact equality in the unit test and by not.toContain('package=') over HTTP. It names the environment, not the package. Holds.
  • Reads after the write, with the holder's row on A and the environment's row on B both stored:
    • a read naming the holder serves the holder's item on A (pinned, unit and dogfood); the action route keys by object, /actions/A/NAME, /actions/B/NAME and /actions/_env/B/NAME each judge the right declaration (pinned, dogfood);
    • a second package-less save on B edits the environment's row (pinned); a package-less save on A is still the holder's customization with the environment's row present (pinned, seeded);
    • the bare by-name read and the list serve the holder's item, and the environment's row has no by-name read; the PR body states it, the changeset does not (M3), and nothing pins it (N1);
    • a package-less delete of NAME takes the one package binding as its address whatever unbound row is stored beside it (protocol-diff-delete-load.ts, the delete address), so it removes the holder's row on A and leaves the environment's row. Not stated anywhere in the PR, not pinned, not routed (S1, M3).
  • The dogfood file runs against what it claims: a real showcase boot, a package created over HTTP, the measured cell with the FROM answer quoted, the same-object CONTROL and the managed CONTROL on a real shipped action. CI ran it green on this head (Dogfood Regression Gate). The 409-to-row change and the object-less row are pinned at the unit level only.

② Semver level

  • Changeset: @objectstack/metadata-protocol at minor. Clause-②: yes (narrowing) and Metadata-protocol: semantic are on both carriers, line-initial, identical; a kind other than none takes at least minor on the package the diff moves, so the level matches AGENTS.md. semantic is the right kind: no key, value or type is added or refused, the meaning of a save naming no package changes.
  • BREAKING banner present in the changeset body and ! in the title. ADR-0087 marker present, exactly one: not-required (no-migration-prescription); the reason holds (no authorable shape moves, a row an older build re-addressed stays as stored). No schema, no export, no .d.ts change: the helper is module-private.
  • Skills-docs: none reason checked at this head: git grep over skills/** for the package-less address finds only the automation skill's flow rules and the platform skill's .custom pair for a managed base, neither of which teaches where a package-less save of a writable package's action is written. True.
  • CI on 0e5faaaa: every check-run is completed; none is queued or running. Success: Lint and Repo Gates and its split jobs, TypeScript Type Check and its split jobs, Build Core, Test Core 8/8, Test UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards, Governed Surface Queue Guard, Spec property liveness, Check PR Size. Skipped by path filter or opt-in: Lint UI, Type Check UI, Build and E2E UI, Build Docs, the queue verdicts, the opt-in harnesses. Mergeable state clean.

③ Boundary flags

  • The diff stays inside the claimed surface as first claimed. Claim amendment 6905981763 widened the surface to sys-metadata-repository.ts (the draft address) with one fix round before review; this head predates that round (M1).
  • No docs/adr/** path is in the diff. The ruling's third bullet has the ADR-0150 amendment note ride the PR and the PR land as Tier H on the maintainer's own approval; the PR body tells the maintainer nothing is needed and that the seat lands it (M2).
  • Authorization: the gates that judge the item rather than its row (organization scope, the sealed managed gate, the _lock gate) all run above the address and are untouched; the new branch can only leave packageId empty, which is the address every package-less save of an unheld name already takes. No rule-layer authorization change found.
  • packages/spec prose for SaveMetaItemRequest.packageId still states the address rule without the action exception (N2).

④ Design judgment

protocol-save.ts holds against the ruling for the case the ruling names and for every row it leaves unchanged; the helper is small, reads the store once more only for an action a package holds, and fails closed on an unreadable row. The PR is not ready to land as the ruling's implementation, for three reasons that are about what this head leaves out and what it says, not about the hunk.

  • M1 (must-fix) — The draft door still carries the ruled defect and the PR closes the card. SysMetadataRepository.resolveWriteHead gives a package-less draft save the one package the item's active rows are bound to, by name alone, so the same body on B saved with mode=draft lands in the holder and its publish moves the holder's action. The card's landing point names the draft twin, and claim amendment 6905981763 puts it in this PR under Fixes #34059. Land it here with its pins (draft save on B, the publish of that draft, same-object CONTROL), and turn the changeset's "a draft save still inherits the package" line.
  • M2 (must-fix) — The landing clause of the ruling is not met and the body says the opposite. Ruling 6902014292 binds an ADR-0150 amendment note, a Tier H landing and the maintainer's own approval. At this head the D4 customization paragraph and R15 still read "a customization, never a second item" for exactly the row this PR writes, no card for the note is cited (a search on the card number found none), and the 维护者速读 tells the maintainer nothing is needed. Either carry the note in this PR, or cite the filed skills card by number together with the order that lets this PR land ahead of it, and correct the "需要你做的" line so it states what the ruling asks of the maintainer.
  • M3 (must-fix) — The BREAKING changeset tells the consumer "Nothing to do for the environment's own actions" while the row it now writes has no by-name read, is absent from the list, and is not what a package-less delete of the name removes. The first two are in the PR's own acceptance notes; none of the three is in the changeset, which is the text that ships. State them, with the address that does reach the environment's row today and the card that closes each.
  • S1 (should-fix) — Package-less delete over the state this PR now creates on its main path removes the holder's row, by code read of the delete address (one package binding wins over a stored unbound row). The ruling's "P's item on A is untouched" then lasts until the admin undoes their own save. It is the delete door's rule, outside this surface and reachable on main by the other save order, so it is not asked for here: file it or fold it into the read half (metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904), cite the number, and pin today's answer in the dogfood file as a marked FROM so the fix turns it.
  • S2 (should-fix) — "Every moved answer" in the PR body and the changeset is not every one. Two more rows move by code read and are neither declared nor pinned: a sole holder that is disabled (was written into the disabled package, now the environment's row) and a sole binding to a package that is not installed (was refused 422, now the environment's row). Both follow from the D4 key; declare and pin them, or say why they are not reachable.
  • S3 (should-fix) — One row of the ruled defect survives silently: an enabled holder on A beside a disabled holder on B. The helper is false (a holder binds B), the served-address step drops the disabled holder, and the save is written into the enabled holder, moving its action to B with a receipt naming it. The area's disposition of the two-holder case rests on the refusal being loud; this one is not. Pin what it answers and route it with that follow-up, or narrow the served step to the holders at the body's object.
  • N1 (nit) — The dogfood file leaves the bare by-name read unpinned by comment. Pin the current answer as a marked FROM instead, so the read-half PR has a pin to turn.
  • N2 (nit) — SaveMetaItemRequest.packageId's description in packages/spec (mirrored in content/docs/references/api/protocol.mdx) states the address rule without the action exception; "reported to the seat" needs a card number or the owner of the ADR note named for it.

First review of this head: no prior ids to continue.

Implemented-by: claude/area-E1-34059
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: FAIL

…sh of an action by object

The draft address and the per-item publish read the same owner-key rule as
the publish-mode save: an action draft whose body binds an object no
package's active row binds the name to is the environment's own draft, and
its publish naming no package promotes it into the package-unbound row.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… the body's object

The served step of the package-less save judges an action's holders at the
object the body binds when another holder binds the name to another object:
an enabled holder's item on another object no longer answers for a disabled
holder at the body's object. Pins the moved rows for a sole disabled holder
and for a sole binding to a package that is not installed.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…it on the save request

The D4 amendment note and the R15 pointer: a package-less action row bound
to an object no holder binds the name to is the environment's own item.
`SaveMetaItemRequest.packageId` names the action exception. The dogfood
file pins today's by-name read and package-less delete answers as FROM.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…ion by object

The draft save's write head (its parent and its receipt) and the gates that
judge the package a draft lands in read the action's object, as the
repository's put does: the environment's own draft is answered and judged
as the package-unbound draft it is. The dogfood file pins today's
package-less delete answer as FROM.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…rows, and what does not move yet

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
@github-actions github-actions Bot added size/l and removed size/m labels Nov 16, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 6677a8f · 2026-11-17T06:01Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmTPcB6fZEwhd2hNQwC

席位核对

L1 verdict: ACCEPT (delta) · PR #34238 · card #34059 (Fixes) · delta from 5f635f1e5c over L1-c delta REWORK 6938189771 (its R1 is closed at 5f635f1e) · L1-c2 of seat repo:objectstack#2 (takes over from L1-c) · read 2026-11-17T06:03Z

Head-sha: 6677a8ff1bb8e967c848f530ed6fc9b0b0e21075 (the head of final-head comment 6940138302)

Read from GitHub and the commits at this head, not from the report. The first-parent delta is three fast-forward commits, aaa08974, 0a8bebb2 and 6677a8ff: 7 files, +105/−20.

Code (aaa08974, L2 M3 of 6938418286)

  • Per-item publish. promoteDraftForPublish now asks environmentActionPublishSlotRefusal before it promotes. It asks only when the request names no package and the draft is the environment's own (draftKey === null, promoteInto === null, a draft is stored). The helper answers undefined for every type but action, and whenever actionHeldOnlyOnOtherObjects declines. Otherwise it judges each package-unbound active row with environmentActionSlotRefusal(…, 'publish'). publishPackageDrafts passes packageId, so it is not asked. The throw sits beside the sibling plain refusals in that region (uninstalledNamedBaseRefusal), before repo.promoteDraft writes.
  • Draft save. The address condition widens from kind === 'draft' to kind !== 'ambiguous'. unboundItemDraftAddress has three kinds, so this adds only none (no draft stored) with key/into null. environmentActionDraftSlotRefusal is still gated by type === 'action' and actionHeldOnlyOnOtherObjects. After the stored-draft check, it now also judges each package-unbound active row, which is the row its publish would rewrite. The environment's own row on another object has no customization holder (actionCustomizationHoldersOf), so the "rewrites it onto the body's object" cell is unchanged.
  • Message. The verb parameter defaults to 'save', so every existing caller's text is unchanged. The publish text names a remedy that exists: "discard this draft and save it under another name".
  • Pins. There are two new cases in protocol.packageless-save-address.test.ts. Each asserts [status, code] = [409, 'RESOURCE_CONFLICT'] (ADR-0112), the holder named, zero writes, and the rows and drafts left in place. The FROM of both is stated in the test name and measured against origin/main sources (body, Round 5). The three ablations (1 red each, restore porcelain empty) are lane-reported, and I did not re-run them.

Prose (0a8bebb2, 6677a8ff), checked sentence by sentence against the code above

  • Changeset, the two added sentences. "A draft save bound to task beside that package-unbound row on invoice is refused the same way …" matches the draft-save active-row check and pin 1. "With a package-unbound draft on task already stored beside that row, the per-item publish naming no package … is refused 409 RESOURCE_CONFLICT naming P, and the row and the draft stay" matches the publish guard and pin 2.
  • Spec SaveMetaItemRequestSchema.packageId. "a draft save is refused the same way when the package-unbound row its publish would rewrite is that customization" and "that publish is refused 409 RESOURCE_CONFLICT when the package-unbound row it would rewrite is a package's customization" are both true at this head. N5's "(every enabled holder, for an active save)" matches servedPackagelessSaveAddress, which judges over enabled bindings once a disabled holder is among them (protocol-save.ts 2954–2968). content/docs/references/api/protocol.mdx is the regenerated mirror of that description, byte-for-byte the same clause.
  • ADR-0150 amendment note. The only change is the appended door list: "the publish-mode save and the draft save, and the per-item publish of the environment's draft, which writes that one row". It matches the three doors that now ask the slot refusal.
  • Docblocks (N4). The environmentActionDraftSlotRefusal docblock and the new environmentActionPublishSlotRefusal docblock describe their gates as coded. The changed servedPackagelessSaveAddress bullet ("judges the holders at the object first … with no disabled holder there that judgment declines") matches lines 2965–2968.

Scope. The new refusal is the same S4 slot refusal through the third door the ADR note already names, and the same declared narrowing kind (Clause-②: yes (narrowing) unchanged in the body). I accept it as in-card. Skills-docs: none still stands: skills/** does not teach the package-less action publish.

Gates: 72 check-runs on this head, all completed: 60 success, 12 skipped, 0 failed. Lint & Repo Gates, TypeScript Type Check, Test Core (8/8), Check Changeset, PR-body guards and Governed Surface Queue Guard are all success. The lane reports at this head: metadata-protocol 347 files passed, typecheck 0, check:generated 14/14, and the dogfood battery VERDICT 0 (479 files). dispatch-gates --ran ran 121, with 1 NOT MEASURED (shallow clone).

L2 owed: yes. A delta on this head is not on record. The spec description and ADR text are touched and the PR declares a narrowing, so the delta is owed at CONTRACT_REVIEW_TIER against record 6938418286, through this account's review seat.

Landing tier: check-governed-merges.mjs --pr 34238 reports GOVERNED (docs/adr/** ×1), +1118/−25 = 1143 lines. The PR also touches packages/spec/src and declares a narrowing. It lands Tier H via the seat and stays draft: the seat record, pm:awaiting-merge and the review request follow an L2 PASS on this same head. On merge: close #34263, and clear pm:dispatched and the lease on #34059.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6677a8ff1bb8e967c848f530ed6fc9b0b0e21075
Local-runs: none
Scope: packages/spec/src/api/protocol.zod.ts, docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md + packages/metadata-protocol/src/protocol-save.ts, packages/metadata-protocol/src/protocol-history-and-publish.ts, packages/metadata-protocol/src/protocol.ts, packages/metadata-protocol/src/protocol-lock-version-gates.ts, packages/metadata-protocol/src/sys-metadata-repository.ts, packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts, .changeset/34059-action-save-packageless-other-object.md, content/docs/references/api/protocol.mdx; cited and read at this head, not reviewed: packages/metadata-protocol/src/protocol-package-commits.ts, packages/metadata-protocol/src/protocol-door-requests.ts, packages/metadata-protocol/src/protocol-write-gates.ts, packages/rest/src/meta-item-history-routes.ts, packages/runtime/src/domains/packages.ts, packages/objectql/src/package-scoped-read.ts
Security-touching: no

Delta review of this head against FAIL 6938418286 at 5f635f1e5cf1f532ce531c4899b0c9041d6fae6f (this L2 seat). Also read: the final-head comment 6940138302, the PR body, the check-runs of this head. Independence: implemented on claude/area-E1-34059; this review neither dispatched nor implemented it. Everything below is by code read at this head; nothing was built or run.

Ids of 6938418286:

M3: closed.
N4: closed.
N5: closed.

① Derived judgments

What moved between 5f635f1e and this head on the PR's own files: aaa08974 (the publish slot refusal, the widened draft-save check, two pins, the N4 docblock), 0a8bebb2 (the ADR note, the spec clause, the changeset), 6677a8ff (the reference page regenerated). Seven files; protocol.ts, protocol-lock-version-gates.ts, sys-metadata-repository.ts and the dogfood file did not move.

Prior id Evidence at this head
M3 Fix route (a). promoteDraftForPublish asks environmentActionPublishSlotRefusal of the draft it read, where the request carries no packageId key and the resolved key and target are both empty. The helper reads the item's active rows itself, returns unless the draft's body binds an object no package's row binds, and refuses 409 RESOURCE_CONFLICT when a package-unbound active row is a holder's customization (or does not parse). The draft save asks the same of the stored package-unbound active row, for every address kind but ambiguous, so the M3 draft is refused before it is written. Two pins, each with the write count, the rows and the draft unchanged
N4 The second bullet of the packagelessActionKeyedAddress docblock now says the served step judges the holders at the object first and falls back to the name's own served judgment when no holder there is disabled. That is the code (servedPackagelessSaveAddress over the keyed address, then over the name's)
N5 The clause reads "judged over every holder of the name (every enabled holder, for an active save)". True for both modes: the active save's served judgment is the stored bindings less the disabled ones; the draft address is ambiguous over every binding, which is the one-enabled-one-disabled draft CONTROL (409 naming both). The row in content/docs/references/api/protocol.mdx equals the concatenated .describe string byte for byte (3109 characters, compared by script over the two git objects)

M3, tried again with its shape and variants, all on the door that names no package (key absent):

  • The M3 shape itself (P on invoice, a package-unbound row on invoice, no draft; draft save on task): the draft address is the environment's own with kind none; the widened condition admits it; the active-row check refuses. Pinned.
  • The environment's draft stored before the customization row existed, or the row added between the draft save and the publish: the publish resolves the environment's draft, the helper finds the customization row, 409 with the verb "publish". Pinned (the row is seeded after the draft save).
  • The draft written while no package held the name, a package installed on the row's object afterwards: the publish reaches the helper by the single-holder branch and is refused the same way.
  • Two holders (P on invoice, Q on product), the package-unbound row on either: the address is the environment's draft above the two-holder refusal, and the helper names the holder whose object the row binds; an unparseable row names both.
  • A disabled holder: the helper does not depend on how the address counted the holder. Its condition is the empty key and target only, and it re-reads the active rows, where a disabled package's row is still a package-bound row. Refused naming the disabled holder, as the active save of the same shape already was.
  • A draft bound to the holder's own object is not an environment-own write: the helper returns, and the promotion is the holder's (adoption or its own draft), as on main.

Every writer of the package-unbound action row or draft that was searched for (repo.put, repo.promoteDraft, repo.restoreVersion call sites in packages/metadata-protocol/src):

  • Publish-mode save, draft save, per-item publish naming no package: refused, above.
  • Package publish (publishPackageDrafts): takes a package id from the route, lists that package's drafts only (package_id equals the id), and promotes each under its own binding. It never promotes the package-unbound draft. Not an environment-own write.
  • Commit revert: restores under the commit's package. Not an environment-own write.
  • Rollback naming no package: restores the served row under that row's own binding, from that row's own lineage; it takes no body and no address from the caller. action is not a per-package slotted type, so ?package= is refused there. Read as far as its address only; the note does not name it and it is not graded.
  • Draft discard: removes a draft, moves no row. Package-less delete: declared not moved (metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904).
  • Server-stated rewrites (source set) rewrite the row they read in place; package-duplicate names its target; the external import goes through the save door.
  • The per-item publish with packageId: null (the key present): not covered. See S6.

Accept set, named for ④. Against main two cells narrow, both declared in the changeset with their FROM: the draft save on task beside the holder's customization row (main: written as P's draft, 200) is 409; the per-item publish naming no package of a package-unbound draft on task beside that row (main: promoted into P's row) is 409. Against the prior head the same two cells move from a write to a refusal. The widening to every kind but ambiguous adds no other refusal: for a type other than action the helper returns before any read, and for an action it refuses only when the body is the environment's own and the stored draft or row is a holder's customization. The FROM was checked against main's packagelessDraftAddress: one binding, an unbound draft, key empty and target P, which is the move the changeset states.

② Semver level

  • Unchanged and still right: @objectstack/metadata-protocol at minor, @objectstack/spec at patch (a .describe clause; no key, type or accepted value moves). Clause-②: yes (narrowing) and Metadata-protocol: semantic are line-initial and identical on the PR body and the changeset. The ADR-0087 marker and its reason still hold: no stored row is rewritten.
  • The two new refusals are the declared kind of narrowing and are listed in the changeset's moved answers; the spec clause states both.
  • Check-runs on this head, read once: 72 runs, all completed; 60 success, 12 skipped, none failed, none pending. Success includes Build Core, Test Core 1 to 8 of 8, Test UI 1 to 16 of 16, Type Check workspace, consumer gates, source gates and UI, Lint and Repo Gates, Build Docs, Live E2E UI, Check Changeset, PR-body guards, Governed Surface Queue Guard, Spec property liveness. Dogfood Regression Gate reads success with its shard job skipped, as on the prior heads; the battery reading in 6940138302 is the lane's own.

③ Boundary flags

  • Surface: protocol-history-and-publish.ts is now in the diff (one import, one Pick member, one guarded call) and is in Scope.
  • docs/adr/** and packages/spec/** are in the diff: Tier H on the maintainer's own approval. This record does not replace it.
  • Dev flags: 6940138302 carries no open question.
  • The security line reads no, as in the earlier records: no changed hunk teaches permission, sharing, credential or authentication behaviour. The publish refusal sits below the lock gate and the address refusals and above the authoring gates, is raised bare as the neighbouring address refusals are, and names a holder package the save-door refusals already name to the same caller. No permission, tenant or package-ownership boundary is crossed; no access finding.
  • SQL first: no new id materialisation or in-application join. The Pick gains readItemActiveRows, a member the host already carried. The publish helper returns before any read for every type but action, and is reached only when the request names no package and the draft resolved is the package-unbound one promoted into the package-unbound row; then it is one keyed read of the item's active rows by (type, name). A package publish never reaches it (its requests carry the key). The draft-save check adds no read: it reuses the rows it already read.
  • The PR body is not judged. For the seat: its "Draft address" bullet still says protocol-history-and-publish.ts is back to main's bytes, and the two-minute verification still expects 32 cases where the Tests section says 34.

④ Design judgment

The narrowing face: both new refusals stop a move of a package's action by a request naming no package, the capability ruling 6902014292 takes away; neither refuses a write the spec clause or the changeset says is served. The discard of the environment's draft stays served, and the publish refusal's sentence names it as the way out.

The spec clause, the sentences the delta touched:

  • "a draft save is refused the same way when the package-unbound row its publish would rewrite is that customization". True: environmentActionDraftSlotRefusal, the active-row loop.
  • "judged over every holder of the name (every enabled holder, for an active save)". True in both modes, as in ① under N5.
  • "that publish is refused 409 RESOURCE_CONFLICT when the package-unbound row it would rewrite is a package's customization". True of the publish the sentence speaks of, the one naming no package.

The ADR note: "refused (409 RESOURCE_CONFLICT), never moved: the publish-mode save and the draft save, and the per-item publish of the environment's draft, which writes that one row". True on the three doors as the changeset and the spec clause word them (naming no package). One spelling of the third door is outside it:

S6 (should-fix) — packages/metadata-protocol/src/protocol-history-and-publish.ts, the guard !('packageId' in request) on the new call; and the ADR note's list. A per-item publish stating packageId: null pins the package-unbound draft and promotes it into the package-unbound row (PublishMetaItemRequestSchema.packageId: "null pins the lookup to the package-UNBOUND row"). With the key present the slot refusal is skipped, so in the pinned shape (the environment's draft on task beside P's customization row on invoice) that call rewrites the row onto task. It is a per-item publish of the environment's draft that writes that one row, which is what the note's list says is refused.

  • Reach: in process only. The REST door spreads the key in only when a package is named, and no shipped caller states null. Main does the same, so nothing regresses, and the changeset and the spec clause, which say "naming no package", stay true.
  • Fix, either: drop the conjunct, so the helper is asked whenever the resolved key and target are both empty (it already returns for a draft bound to the holder's object), and pin the null spelling; or have the note say "the per-item publish naming no package".
  • N6 (nit) — refusal wording: when the draft save is refused over the stored active row, the sentence is the save's ("the environment keeps one package-less row ... so this save would move it"), while the draft save itself moves nothing; its publish would. The code and the holder named are right, and the pin reads only those.

M3, N4 and N5 are closed; S6 and N6 are new.

Implemented-by: claude/area-E1-34059
Reviewed-by: session_01ADHkmP44onN8RMzsPMqjRq

VERDICT: PASS

…em publish stating no package

A per-item publish stating packageId null promotes the same
package-unbound draft into the same row, so it asks the same refusal.
The draft save's refusal over the stored row says its publish would
move it.

Claude-Session: https://claude.ai/code/session_01ADHkmQsQf9Js79MC6c1kdF
Co-authored-by: Claude <noreply@anthropic.com>
…h stating no package

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmQsQf9Js79MC6c1kdF

Final head for review: fb520b2f07e2098ff3d4c128a9f50edc69d29093 (supersedes 6940138302).

Since 6677a8ff1b (L1 ACCEPT 6940205412, L2 PASS 6940310036):

  • 017deafea7, L2 S6: the publish slot refusal was asked only when the caller named no package; an in-process per-item publish stating packageId: null promotes the same package-unbound draft into the same row and skipped it. It is now asked whenever the publish resolved the package-unbound draft and row (draftKey and promoteInto both null). A package publish names its package and is not reached. One pin; the old condition restored, it is the one red. N6: the draft save's refusal over the stored row now says "publishing this draft would move it".
  • fb520b2f07: the changeset names that in-process publish.
  • PR body: the "Draft address" sentence about protocol-history-and-publish.ts and the case count are corrected.

Narrowing unchanged in kind (Clause-②: yes (narrowing)): the one new refused cell is in-process only, and on main it moved P's action as the REST twin did.

Readings on this head: CI 58 success, 10 skipped, none failed; metadata-protocol 347 files passed; dogfood battery 479 files passed; dispatch-gates --ran 122 run, 0 NOT MEASURED. Detail in the body's Verification section.

Owed at this head: an L1 delta and an L2 delta from 6677a8ff1b. Stays draft (Tier H).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head fb520b2 · 2026-11-17T07:33Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmTPcB6fZEwhd2hNQwC

席位核对

L1 verdict: ACCEPT (delta) · PR #34238 · card #34059 (Fixes) · small delta over L1-c2 ACCEPT 6940205412 (at 6677a8ff) · L1-c2 of seat repo:objectstack#2 · read 2026-11-17T07:35Z

Head-sha: fb520b2f07e2098ff3d4c128a9f50edc69d29093 (the head of final-head comment 6941758061)

Read from GitHub and the commits at this head, not from the report. The first-parent delta is two fast-forward commits, 017deafe and fb520b2f: 4 files.

Code (017deafe, L2 S6 and N6)

  • S6. The publish slot refusal's condition drops !('packageId' in request). It now asks whenever draftKey === null && promoteInto === null and a draft is stored, so an in-process per-item publish stating packageId: null is judged like one naming no package; both promote the package-unbound draft into the one row. The batch door cannot reach it: publishPackageDrafts takes packageId: string and lists that package's drafts (listDrafts({ packageId })), so each promotionRequest carries a non-null d.packageId, draftKey is that package, and the guard is not asked. The new pin (publishMetaItem({ …, packageId: null })) asserts [409, 'RESOURCE_CONFLICT'], zero writes, and the row and draft left in place. Restoring the old condition reds it (lane-reported).
  • N6. environmentActionSlotRefusal gains verb: 'draft-save', passed only by the draft save's active-row check. The door word stays "save", and the clause reads "publishing this draft would move it", which matches that refusal's reason (the row its publish would rewrite). The save and publish texts are unchanged for every other caller. The draft-save pin now asserts that clause.

Prose (fb520b2f): one parenthesis added to the changeset's publish sentence ("in process, also one stating packageId: null"). It matches the new condition and pin, and nothing else in the changeset moves. The body's two stale spots are updated.

Gates: 72 check-runs on this head, all completed: 60 success, 12 skipped, 0 failed. The lane reports at this head: metadata-protocol 347 files passed, the dogfood battery 479 files passed, and dispatch-gates --ran 122 run, 0 NOT MEASURED.

L2 owed: yes, a delta on this head. S6 came from the L2 record, so its author confirms the delta at CONTRACT_REVIEW_TIER, through this account's review seat.

Landing tier: unchanged. GOVERNED (docs/adr/**), plus packages/spec/src and a narrowing, +1140/−25. It lands Tier H via the seat and stays draft. On merge: close #34263, and clear pm:dispatched and the lease on #34059.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: fb520b2f07e2098ff3d4c128a9f50edc69d29093
Local-runs: none
Scope: packages/spec/src/api/protocol.zod.ts, docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md + packages/metadata-protocol/src/protocol-save.ts, packages/metadata-protocol/src/protocol-history-and-publish.ts, packages/metadata-protocol/src/protocol.ts, packages/metadata-protocol/src/protocol-lock-version-gates.ts, packages/metadata-protocol/src/sys-metadata-repository.ts, packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts, .changeset/34059-action-save-packageless-other-object.md, content/docs/references/api/protocol.mdx; cited and read at this head, not reviewed: packages/metadata-protocol/src/protocol-package-commits.ts, packages/metadata-protocol/src/protocol-door-requests.ts, packages/metadata-protocol/src/protocol-write-gates.ts, packages/rest/src/meta-item-history-routes.ts, packages/runtime/src/domains/packages.ts, packages/objectql/src/package-scoped-read.ts
Security-touching: no

Delta review of this head against PASS 6940310036 at 6677a8ff1bb8e967c848f530ed6fc9b0b0e21075 (this L2 seat). Also read: the final-head comment 6941758061, the PR body, the check-runs of this head. Independence: implemented on claude/area-E1-34059; this review neither dispatched nor implemented it. Everything below is by code read at this head; nothing was built or run.

Ids of 6940310036:

S6: closed.
N6: closed.

① Derived judgments

What moved between 6677a8ff and this head on the PR's own files: 017deafe (the publish guard, the refusal wording, one new pin and one added assertion) and fb520b2f (one changeset clause). Four files: protocol-history-and-publish.ts, protocol-save.ts, the unit test file, the changeset. The spec file, the ADR, the reference page, protocol.ts, protocol-lock-version-gates.ts, sys-metadata-repository.ts and the dogfood file did not move. No merge of main between the heads.

Prior id Evidence at this head
S6 Fix route one. The guard in promoteDraftForPublish is draftKey === null && promoteInto === null && draftForGate; the key-absent conjunct is gone. A request carrying the packageId key sets both to request.packageId ?? null, so a stated null (and a present, undefined key) now reaches environmentActionPublishSlotRefusal with the package-unbound draft it read. One new pin states packageId: null in process
N6 environmentActionSlotRefusal takes a third verb, draft-save, passed only by the active-row loop of environmentActionDraftSlotRefusal. The sentence then reads "Cannot save ... so publishing this draft would move it". The pin of that cell asserts the phrase

S6, by the paths that reach the guard with both values empty:

  • Key absent, the address is the environment's own draft: asked, as at the prior head.
  • Key absent, the address is ambiguous: both are set empty, but the address refusal is thrown above the draft read; the guard is not reached.
  • Key present with null or undefined: both empty, the package-unbound draft is read, the helper is asked. This is the cell S6 named.
  • Key present naming a package: draftKey is that id, so the guard is false. A per-item publish naming a package never reaches the helper.
  • The package publish (publishPackageDrafts): it lists drafts with package_id equal to the id it was given and promotes each with packageId: d.packageId, the listed key restated, so every promotion names the package. The REST door takes the id from a path segment, which cannot be empty. Not reached. Read only, outside the declared request type: an in-process call with an empty id would list every draft (the filter skips a falsy id) and promote the package-unbound ones with null; main does the same, and at this head such an action draft over a holder's customization is refused where it used to move it. Not graded.

What the helper answers once asked is unchanged: it returns for every type but action before any read, returns when the draft's body binds an object some holder binds (the holder's own pending customization, promoted as on main), and refuses only when a package-unbound active row is a holder's customization or does not parse.

The new pin, read not run: P saved on invoice, the environment's draft saved on task, a package-unbound row on invoice seeded after it, then publishMetaItem with packageId: null. At this head the path is: key present, both empty, no lock, no address refusal, the draft read under the unbound key, the helper finds P as the holder of the seeded row, 409 RESOURCE_CONFLICT with the sentence starting "Cannot publish action". The pin asserts the status and code, that sentence, the sys_metadata write count unchanged, the draft still [null, task, env], the rows still P on invoice and the unbound row on invoice. With the old condition the guard is false for a present key, the promotion writes, the call resolves, and refusalOf throws "expected the call to be refused, but it resolved": it reddens. The pin does not assert that the sentence names P; its bare-spelling twin does.

N6, the three sentences the function now produces:

  • The active save (default verb): "Cannot save ... so this save would move it". Byte for byte the prior sentence.
  • The per-item publish: "Cannot publish ... so this publish would move it", with the discard advice. Unchanged.
  • The draft save over a stored package-unbound draft (default verb): "this save would move it". Unchanged, and true: that save would rewrite the stored draft.
  • The draft save over the stored active row: "Cannot save ... the environment keeps one package-less row ... so publishing this draft would move it". True of its path: the draft save writes no row, and the publish of the draft it would have stored writes that row.

Accept set, named for ④. One cell narrows against the prior head and against main: the in-process per-item publish stating packageId: null (or carrying the key undefined) of a package-unbound action draft bound to an object no holder binds, beside a package-unbound active row that is a holder's customization. It was a write; it is 409. No other request changes its answer: for every other type the helper returns before a read, and for an action it declines unless that row is a holder's customization.

② Semver level

  • Unchanged and still right: @objectstack/metadata-protocol at minor, @objectstack/spec at patch. Clause-②: yes (narrowing) and Metadata-protocol: semantic are line-initial and identical on the PR body and the changeset. The ADR-0087 marker and its reason still hold: no stored row is rewritten.
  • The new refused cell is the declared kind of narrowing and the changeset names it ("in process, also one stating packageId: null"). No schema key, type or accepted value moves: PublishMetaItemRequestSchema.packageId already accepts null, and still does.
  • Check-runs on this head, read once: 72 runs, all completed; 60 success, 12 skipped, none failed, none pending. Success includes Build Core, Test Core 1 to 8 of 8, Test UI 1 to 16 of 16, Type Check workspace, consumer gates, source gates, debt ledger and UI, Lint and Repo Gates, Build Docs, Live E2E UI, Check Changeset, PR-body guards, Governed Surface Queue Guard, Spec property liveness. Dogfood Regression Gate reads success with its shard job skipped, as on the prior heads. Four of the 72 are the later re-run of the PR-body workflows (two success, two skipped), which is the difference from the 58 and 10 in 6941758061.

③ Boundary flags

  • Surface: no file enters or leaves the diff; Scope is that of 6940310036.
  • docs/adr/** and packages/spec/** are in the diff: Tier H on the maintainer's own approval. This record does not replace it.
  • Dev flags: 6941758061 carries no open question.
  • The security line reads no, as in the earlier records: no changed hunk teaches permission, sharing, credential or authentication behaviour. The widened guard adds a refusal and removes none; it sits where it sat, below the lock gate and the address refusals and above the authoring gates, and names a holder package the bare spelling already names to the same caller. No permission, tenant or package-ownership boundary is crossed; no access finding.
  • SQL first: no new id materialisation or in-application join. The widened guard adds, for an action publish stating no package only, the one keyed read of the item's active rows by (type, name) the bare spelling already made. A publish naming a package makes no new read. The wording change reads nothing.
  • The PR body is not judged. For the seat: the "Draft address" bullet now says protocol-history-and-publish.ts carries only the publish's slot refusal, which is the tree; the Tests section and the Verification section say 35 cases with 7 CONTROLs, which is the tree (35 it blocks in the describe, 7 under CONTROLs); the two-minute verification line still expects 32.

④ Design judgment

The narrowing face: the new refusal stops the same move the bare spelling's refusal stops, a holder's customization rewritten onto another object by a publish that names no package, which ruling 6902014292 takes away. It refuses nothing the spec clause or the changeset says is served: the publish of the environment's draft with no customization row in the slot, and the publish of a holder's own pending customization, answer as before under either spelling. The discard stays served and the sentence names it.

The spec clause (SaveMetaItemRequest.packageId), unchanged: "that publish is refused 409 RESOURCE_CONFLICT when the package-unbound row it would rewrite is a package's customization" speaks of the publish naming no package and stays true; the stated-null spelling is in process only and the clause does not deny it.

The ADR note, unchanged: "refused (409 RESOURCE_CONFLICT), never moved: the publish-mode save and the draft save, and the per-item publish of the environment's draft, which writes that one row". True as written at this head: every per-item publish that resolves the environment's draft into the package-unbound row, under either spelling, asks the refusal. The one spelling that was outside the list at the prior head is now inside it.

The changeset clause: accurate. The REST door spreads the key in only when a package is named, so the stated-null publish is in process only, as the clause says, and it is refused 409 naming P with the row and the draft unchanged.

  • N7 (nit) — packages/metadata-protocol/src/protocol-save.ts, the docblock of environmentActionPublishSlotRefusal: it still opens "at the PER-ITEM PUBLISH naming no package", while the call site now asks it for the stated-null spelling too, which the changeset counts as a second spelling. Its next sentence ("where the publish resolved the environment's own draft, key and into both null") is right for both.
  • N8 (nit) — the changeset, the parenthesised FROM after the new clause ("it was promoted into P's row, moving P's action onto task"): exact for the bare spelling, where main's address promoted into P. For the stated-null spelling main promoted the draft into the package-unbound row, so the row rewritten onto task was P's customization row, not P's own row. The move of P's action as served is the same; only the row named differs.

No must-fix, no should-fix.

Implemented-by: claude/area-E1-34059
Reviewed-by: session_01ADHkmP44onN8RMzsPMqjRq

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Seat record · 2026-11-17T07:43Z · Head-sha: fb520b2

维护者速读

  • 改了什么:环境不带包名保存一个动作(PUT /meta/action/NAME,无 ?package=),无论直接保存还是草稿保存再按条发布,只要持有这个名字的包都把它绑在别的对象上,就写成环境自己的动作行,绑在本次保存的对象上;包里的动作原地不动。ADR-0150 D4 的增补注记、R15 指针和 SaveMetaItemRequest.packageId 的说明随本 PR 落地。
  • 为什么改:你在 metadata-protocol: a package-less save of an action name one writable package holds on another object is written into that package and moves its declaration (ADR-0150 L181/R15 vs the D4 action key) #34059 选了方案 B(记录 6902014292):动作按 ADR-0150 D4 的键 (package, objectName, name) 认定。以前这种保存被改写进那个包,把包的动作从 A 对象挪到 B 对象,回执还写着包名;草稿门和按条发布也有同样的问题。
  • 风险与回滚:收窄(fix(metadata-protocol)!,Clause-②: yes (narrowing)):只对 action 生效;同对象保存、其它类型、托管(代码)包照旧。原来写进包(或被 409、422 拒绝)的几种保存,现在写成环境行,逐条列在 changeset。尚未处理的:环境行没有不带包名的按名读取、不在列表里,不带包名的删除删的是包的行(metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904)。回滚即撤回本 PR,不改任何已存的行。
  • 先看:packages/metadata-protocol/src/protocol-save.ts(packagelessActionKeyedAddress 与 servedPackagelessSaveAddress 新增的 atObject 分支)→ packages/metadata-protocol/src/sys-metadata-repository.ts(actionHeldOnlyOnOtherObjects 与 resolveWriteHead 的草稿分支)→ packages/metadata-protocol/src/protocol-lock-version-gates.ts(packagelessDraftAddress)。
  • 两分钟验证:pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.packageless-save-address.test.ts -t "ADR-0150 D4",预期 35 例全绿;在 main 上标 FROM 的负向用例会变红(回执写着包名,包的动作被挪走)。
  • 需要你做的:用 os-zhuang 审读并批准这个收窄(本 PR 改了 docs/adr/** 和 packages/spec/src)。契约复审 PASS 6941877825,钉在 Head-sha fb520b2f07e2098ff3d4c128a9f50edc69d29093。批准在案后由席位翻 ready,经合并队列落地。

席位意见:同意合并。这是兑现你在 #34059 的裁决 B,把动作的身份对齐 ADR-0150 D4 已写明的三元键;收窄的方向是不再静默挪动包里的声明,改为写成环境自己的行,失败方向是响亮的 409 而不是悄悄改写。

席位核对

  1. 形态:11 个文件,+1140/−25(1165 行,不到 3000),Fixes #34059;Clause-②: yes (narrowing),Metadata-protocol: semantic,Skills-docs: none(skills/** 不教不带包名的保存写到哪里;skills/objectstack-platform 只教托管基础包的 .custom 一对,其拒绝不变)。碰 docs/adr/** 与 packages/spec/src,且是收窄 ⇒ Tier H;check-governed-merges 判 GOVERNED。
  2. 前提实测:卡线程在 main 上跑过 FROM 负向用例,均变红;dogfood 用例 action-save-packageless-other-object.dogfood.test.ts 随 PR 落地。复审 S6 的新钉子去掉修复即变红(车道回报,复审按代码读确认)。
  3. 门禁 check-runs:head fb520b2f 上 76 条,62 绿、14 跳、0 红;mergeable clean。区线程实测本 head 与 fix(metadata-protocol)!: a dependent's bundle-member row moves no bare read across a restart, and a row-held base's own member is the base's #34644(6acd3f12)、fix(metadata-protocol)!: an exact ?package= read answers its own package's item or a 409 naming the holders, and a bare doc read beside two holders serves the environment's own entry #34347(b6f7c36f)merge-tree 均无冲突。
  4. 接受的偏差:L1-c2 delta ACCEPT 6941813067(前一份 6940205412 于 6677a8ff);契约复审 PASS 6941877825(前一份 PASS 6940310036 的 S6、N6 已在本 head 关闭),无 must-fix/should-fix。N7(environmentActionPublishSlotRefusal 的 docblock 只写了「不带包名的按条发布」)与 N8(changeset 一句 FROM 对显式 null 写法点错了被改写的行)为散文 nit,为不动 head 未推,下次碰这两个文件时修。
  5. 范围外去向:环境行不带包名的按名读取、列表、删除 → metadata-protocol: the merged action listing leaves out the environment package-less row on another object while the by-name read serves it #33904。ADR-0150 增补注记卡 ADR-0150: amendment note — a package-less action row on an object no holder binds is the environment's own item (D4 action key; ruling on #34059) #34263 的内容在本 PR 落地,合并后由区关卡。
  6. 落地条款:os-zhuang 授权批准在案后,席位翻 ready,经合并队列落地;Fixes #34059 合并即关卡;随后关 ADR-0150: amendment note — a package-less action row on an object no holder binds is the environment's own item (D4 action key; ruling on #34059) #34263,并清 metadata-protocol: a package-less save of an action name one writable package holds on another object is written into that package and moves its declaration (ADR-0150 L181/R15 vs the D4 action key) #34059 的 pm:dispatched、lease:o2-I 与 assignee。

@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 17, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 17, 2026 09:44
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

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

    @objectstack/runtime:test:  FAIL   local  src/domains/meta-disabled-holder-artifact-door.test.ts > [#34040 item 4] the bare doc doors beside two enabled holders of one doc name, 'alpha registered firs
      ↳ 失败原因: @objectstack/runtime:test: AssertionError: {"type":"doc","name":"shared_doc","code":{"name":"shared_doc","label":"alpha doc","content":"# alpha","_packageId":"com.qa.alpha","_packageVersion":"1.0.0","
    @objectstack/runtime:test:  FAIL   local  src/domains/meta-disabled-holder-artifact-door.test.ts > [#34040 item 4] the bare doc doors beside two enabled holders of one doc name, 'beta registered first
      ↳ 失败原因: @objectstack/runtime:test: AssertionError: {"type":"doc","name":"shared_doc","code":{"name":"shared_doc","label":"beta doc","content":"# beta","_packageId":"com.qa.beta","_packageVersion":"1.0.0","_pr
    

↳ 失败原因 是判读的关键:超时(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 队列共有 21 个失败构建(不含本次)。

分诊清单:

  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 构建失败 — 先分诊,再决定要不要重排

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

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

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

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

    @objectstack/runtime:test:  FAIL   local  src/domains/meta-disabled-holder-artifact-door.test.ts > [#34040 item 4] the bare doc doors beside two enabled holders of one doc name, 'alpha registered firs
      ↳ 失败原因: @objectstack/runtime:test: AssertionError: {"type":"doc","name":"shared_doc","code":{"name":"shared_doc","label":"alpha doc","content":"# alpha","_packageId":"com.qa.alpha","_packageVersion":"1.0.0","
    @objectstack/runtime:test:  FAIL   local  src/domains/meta-disabled-holder-artifact-door.test.ts > [#34040 item 4] the bare doc doors beside two enabled holders of one doc name, 'beta registered first
      ↳ 失败原因: @objectstack/runtime:test: AssertionError: {"type":"doc","name":"shared_doc","code":{"name":"shared_doc","label":"beta doc","content":"# beta","_packageId":"com.qa.beta","_packageVersion":"1.0.0","_pr
    

↳ 失败原因 是判读的关键:超时(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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants