Repository navigation
fix(metadata-protocol): report a refused object-storage sync on the batch publish element - #30754
Conversation
…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
…ge-sync advisory (#30693) Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czAsRaaqvLX3Tkidba
📓 Docs Drift CheckThis PR changes 1 package(s): ⛔ 1 release-owned page(s) name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
|
domain:server#4 · os-elon-musk · session_016WV4czvZykUqhYxYXSSDt4 维护者速读
席位意见:ACCEPT(#30693)。 席位核对Head-sha:
|
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)维护者速读
POST /api/v1/packages/:id/publish-drafts)里某个对象的存储同步被数据源拒绝时,该对象在published[]里的那一项现在带上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)给的是同一条。advisories键(已钉)。回滚即撤 PR。packages/metadata-protocol/src/protocol.ts里publishPackageDrafts第二阶段循环那一处eff.storageRefused;protocol-publish-drafts-advisories.test.ts末尾新 describe。pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol-publish-drafts-advisories.test.ts,预期 8 条全绿,其中 4 条是 Package-draft batch publish (Studio "publish whole app") still answers success with no sign when an object's storage sync is refused #30693 的。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 afterrunPublishSideEffectsanswers, itsstorageRefused(the advisoryensureObjectStoragebuilds throughobjectStorageSyncRefusedNotice, 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'sadvisories. The builder is reused, not copied: the batch door reads the sameeff.storageRefusedfieldpublishMetaItemreads.p.advisories, so the promotion's findings list is not mutated.advisorieskey.published[].advisoriesis already declared onPublishPackageDraftsResponseSchemaasRuntimeAuthoringIssueSchema[], 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 elementinpackages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts. That file's stub engine gains asyncObjectSchemadouble (the #30635 fixture shape: a name in the refused set throws an undeclared error). Every case goes through the realpublishPackageDrafts:success: true,outcome: 'published', 3 published. Only the refused object's element carries one advisory (rule,severity: 'warning',path: '',where: 'object "ticket"', the sixRuntimeAuthoringIssueSchemakeys). The undeclared driver text is withheld from the body and still in the server log. The sibling object and the flow have the key setname, type, version.advisoriesanywhere inpublished, and both objects were synced.Acceptance notes
8d702f83: guarding the newiftofalse(viascripts/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 equalsHEAD,git diff HEADempty. The tests import./protocol.jsfromsrc, so no dist rebuild was involved.published.pushhappened 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 movepublishPackageDrafts; read on its headc2e3fa7f.#30709and#30713touch other members ofprotocol.ts. Whichever lands second merges.Verification
All on the final head
5a6e0a90(the fix, the changeset, and a plain merge oforigin/mainatf0ad1f79).pnpm --filter @objectstack/metadata-protocol test+typecheckunderos-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;--ranreconciliation:60 derived famil(ies) accounted for — 60 run, 0 NOT-MEASURED, every oneexit 0.check:dual-build-cjs-loadsandcheck:lean-entry-closureexited 3 (prerequisite: built dists) on the first pass and0after a whole-treeturbo run build(119 successful, 119 total).node scripts/check-nul-bytes.mjs: exit 0.pnpm lint,test:repo) and every family outside the derivation are CI's.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintis CI's.main, one pull request.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4czAsRaaqvLX3Tkidba