Skip to content

fix(metadata-protocol): report a refused object-storage sync on the batch publish element - #30754

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-dx78mn
Nov 6, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-dx78mn

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #30693

domain:server#4 · os-elon-musk · session_016WV4czAsRaaqvLX3Tkidba

Clause-②: no
Metadata-protocol: none

Claim: 6672619391 (amended 6672668925) · Branch: claude/project-thread-dx78mn · Changed lines: +165 / −9 (4 files; product code +18 / −6, the rest is pins and the changeset)

维护者速读

What changes

  • publishPackageDrafts, Phase 2: the element for each promoted item is now built as a local, pushed in the same place as before (element order unchanged), and after runPublishSideEffects answers, its storageRefused (the advisory ensureObjectStorage builds through objectStorageSyncRefusedNotice, added by fix(metadata-protocol): an object save or publish whose storage sync is refused says so on its answer #30691) is appended to that element's advisories. The builder is reused, not copied: the batch door reads the same eff.storageRefused field publishMetaItem reads.
  • The gate's own findings stay first; the sync advisory comes after them. The element's array is a copy of p.advisories, so the promotion's findings list is not mutated.
  • Omitted when empty, as before: an element whose sync ran (or a non-object type) carries no advisories key.
  • published[].advisories is already declared on PublishPackageDraftsResponseSchema as RuntimeAuthoringIssueSchema[], so no spec change.
  • ensureObjectStorage's docblock now names the batch door as the third consumer.

Tests

New describe [#30693] publishPackageDrafts reports a refused object-storage sync on that object's element in packages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts. That file's stub engine gains a syncObjectSchema double (the #30635 fixture shape: a name in the refused set throws an undeclared error). Every case goes through the real publishPackageDrafts:

  • A batch of two objects and one flow, one object refused: success: true, outcome: 'published', 3 published. Only the refused object's element carries one advisory (rule, severity: 'warning', path: '', where: 'object "ticket"', the six RuntimeAuthoringIssueSchema keys). The undeclared driver text is withheld from the body and still in the server log. The sibling object and the flow have the key set name, type, version.
  • A declared (409) driver refusal is quoted on the element, as on the single-item doors.
  • A flow gate advisory and an object sync refusal in one batch each ride their own element.
  • CONTROL: a batch whose every sync runs has no advisories anywhere in published, and both objects were synced.

Acceptance notes

  • Reproduced through the door by ablation on the fix commit 8d702f83: guarding the new if to false (via scripts/ablation-replace.mjs) turns the three refusal pins red (Tests 3 failed | 5 passed (8)) and leaves the CONTROL and the four publishPackageDrafts still discards the runtime authoring gate's per-draft advisories — Studio's "publish whole app" reports none of them #9343 pins green. Restored: blob equals HEAD, git diff HEAD empty. The tests import ./protocol.js from src, so no dist rebuild was involved.
  • The old per-element published.push happened before the side effects; the push stays there, so an item whose side effects throw is still reported as published (the metadata is live), unchanged.
  • #30687 (codemod moving door bodies into facets) does not move publishPackageDrafts; read on its head c2e3fa7f. #30709 and #30713 touch other members of protocol.ts. Whichever lands second merges.

Verification

All on the final head 5a6e0a90 (the fix, the changeset, and a plain merge of origin/main at f0ad1f79).

  • pnpm --filter @objectstack/metadata-protocol test + typecheck under os-verify-lock: VERDICT command-exit 0, Test Files 319 passed | 4 skipped (323), Tests 22480 passed | 26 skipped (22506). No other package's public face changed (an internal loop and one docblock), so no consumer sweep.
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 60 families. Each run with its exit code recorded before any pipe; --ran reconciliation: 60 derived famil(ies) accounted for — 60 run, 0 NOT-MEASURED, every one exit 0.
  • check:dual-build-cjs-loads and check:lean-entry-closure exited 3 (prerequisite: built dists) on the first pass and 0 after a whole-tree turbo run build (119 successful, 119 total).
  • node scripts/check-nul-bytes.mjs: exit 0.
  • Repo-wide scans (pnpm lint, test:repo) and every family outside the derivation are CI's.

Human Minimum

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

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4czAsRaaqvLX3Tkidba

…atch publish element (#30693)

publishPackageDrafts ran the object storage sync through
runPublishSideEffects and dropped its storageRefused answer: the
published[] element was pushed before the side effects ran. The
object-storage-sync-refused warning the single-item doors give now
rides that object's element; status unchanged, omitted when empty.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4czAsRaaqvLX3Tkidba
@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 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/releases/v17/17-1.mdx (via publishPackageDrafts (symbol, a method of class ObjectStackProtocolImplementation))

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
  • the SDK route bridge reached 63 of 221 client-bound route-ledger rows — the other 158 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 158: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 103 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 — 10 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 40a9265ff3c8c3e96b1e2c13ea5edd1fb32e6d11 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 40a9265ff3c8c3e96b1e2c13ea5edd1fb32e6d11

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#4 · os-elon-musk · session_016WV4czvZykUqhYxYXSSDt4

维护者速读

  1. 改了什么:Studio「发布整个应用」(POST /api/v1/packages/:id/publish-drafts)里,某个对象的存储同步被拒时,该对象在 published[] 里那一项的 advisories 现在带 object-storage-sync-refused 警告。这和单项发布、发布模式保存(Object save answers success when the schema sync behind it is refused: the caller never learns the table was not created or adopted #30635)给的是同一条。
  2. 为什么改:以前整包发布照样回成功,表没建或没改只记在服务器日志里,用户要到读写失败才发现(Package-draft batch publish (Studio "publish whole app") still answers success with no sign when an object's storage sync is refused #30693,Object save answers success when the schema sync behind it is refused: the caller never learns the table was not created or adopted #30635 复核时留下的批量发布入口)。
  3. 风险:很小。状态码、其他键和发布结果都不变。同步正常的项不加 advisories 键(已钉)。警告排在已有的门禁提示之后。
  4. 先看:packages/metadata-protocol/src/protocol.ts 中 publishPackageDrafts 第二阶段的 eff.storageRefused。
  5. 两分钟验证:pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol-publish-drafts-advisories.test.ts。
  6. 需要你做的:无,席位落地。非 BREAKING,不属 Tier H,174 行 ≤ 3000。

席位意见:ACCEPT(#30693)。

席位核对

Head-sha: 5a6e0a90c110bbde950cfe30afcde2c924625732 · read 2026-11-06T01:11Z

Item Reading
Shape Draft → main; Fixes #30693. 4 files, +165/−9. ⛔ packages/spec/**; no new error code; no new key.
Seat diff read Each element is built once and pushed. The gate's advisories are copied, and eff.storageRefused (objectStorageSyncRefusedNotice via runPublishSideEffects) is appended after them. The key is still omitted when empty. The hydration docblock now names the third door.
Evidence 4 new pins, including a CONTROL. Ablation on 8d702f83: 3 failed / 5 passed, then restored. metadata-protocol 319 files / 22480 tests pass, typecheck 0. dispatch-gates 60/60 exit 0 (os-dev-report 6673461813).
Gates (check-runs on this head) 48: 35 success, 13 skipped, 0 failed. mergeable_state clean.
Accepted deviations None.
Semver @objectstack/metadata-protocol: patch. Clause-②: no (one more element in an existing advisories array, with the advisory shape already published by #30635), Metadata-protocol: none.
Landing Not governed (check-governed-merges --pr 30754: NOT governed), 174 lines ≤ 3000, not BREAKING, so per pm-dispatch the seat lands it: pr_ready + automerge_enable.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package-draft batch publish (Studio "publish whole app") still answers success with no sign when an object's storage sync is refused

1 participant