Uh oh!
There was an error while loading. Please reload this page.
feat(spec,metadata-protocol): publish door reports the runtime authoring gate's advisories - #9344
Conversation
…ing gate's advisories (#9176) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fs18A2DdXLVN2h8PaaFBcP
…s describe (#9176) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fs18A2DdXLVN2h8PaaFBcP
os-steve
commented
Aug 17, 2026
CI convergence reading for the Test Core failure ( Both readings (each after a fresh
The log line CI showed is attributable noise, not the cause. Coupling check: Conclusion: order/parallelism or infra flake on the CI runner (consistent with the same run's actions/github-script 429s). Re-run territory. Generated by Claude Code Generated by Claude Code |
os-steve
commented
Aug 17, 2026
Re-run audit (spec seat): failed jobs on runs 32039466851 (Test Core 3/3 + dependent aggregates) and 32039466888 (docs-flag job, pure setup death — actions download 429×3, no step ran) queued for re-run. Basis: the diagnosis comment above — showcase suite green on both the branch head and current main in fresh worktrees, the suspect log line attributed to a passing fixture's interleaved stderr, and the outcome-b coupling hypothesis refuted by grep. Same-run infra weather; plain re-run, nothing skipped or loosened. Generated by Claude Code |
📓 Docs Drift CheckThis PR changes 2 package(s): 4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 113 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop):
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9176
What
Mirrors the already-ruled save-door key onto the publish door (#4463 D1/D3, #4717 precedent):
packages/spec/src/api/protocol.zod.ts—PublishMetaItemResponseSchemagains the same optional, omitted-when-emptyadvisorieskeySaveMetaItemResponseSchemacarries (RuntimeAuthoringIssueSchemaelements, declared once). The save-door describe's "door asymmetry" note is updated — both doors now report.packages/metadata-protocol/src/protocol.ts—promoteDraftForPublishcaptures the gate hook's advisory return (previously discarded at the call site) and hands it out in its result;publishMetaItemattaches it to the response only when non-empty. The batch caller (publishPackageDrafts) deliberately does not read the new key — its response face is a different contract (follow-up filed as publishPackageDrafts still discards the runtime authoring gate's per-draft advisories — Studio's "publish whole app" reports none of them #9343, which remains open and is not addressed here).packages/objectql/src/publish-meta-response-conformance.test.tsgains the [P2/P3] 运行时授权门的 advisory findings 要进响应并被 Studio 渲染 + docs「the gate」补第四列(#4463 收尾) #4717 directional block — the mirror of the save suite: advisory-raising publish carries the finding through the declared parse (rule id + severity + element key set asserted, not mere presence); zero advisories leaves the key ABSENT, pinned on the raw key set andJSON.stringify(never an empty array); the gating half still refuses the promotion on its envelope (code: 'INVALID_METADATA',status: 422); plus a labelled green-either-way guard.packages/spec/src/api/protocol.test.tsgains the declaration-side block (parse carries a verbatim finding; optional; no fabricated[]; non-array refused; lossy element refused whole).@objectstack/spec+@objectstack/metadata-protocol(the save-door precedent's changeset level is not discoverable from this shallow clone; minor per the widened-face standing rule).Generated artifacts (regenerated with the generators, never hand-edited):
packages/spec/authorable-surface/api.json(one line:api/PublishMetaItemResponse:advisories) andcontent/docs/references/api/protocol.mdx.Wiring note (PM assumption 1)
The hook's return is discarded one frame below the response builder: the gate call sits in
promoteDraftForPublish, whose resultpublishMetaItembuilds the response from. The wiring is still local — the helper's return grew a key; the gating half and the promotion sequence are untouched. Both callers verified:publishMetaItemreads the key,publishPackageDraftsdestructures only{ singularType, result }(no behaviour change there).Verification (all at
844a8b2d9unless noted)pnpm --filter @objectstack/spec test— 408 files / 10877 tests green; spec pin file re-run at844a8b2d9: 56/56.pnpm --filter @objectstack/metadata-protocol test— 117 files / 1617 tests green.@objectstack/objectqlfull suite — 213 files / 3769 tests green; both conformance files re-run at844a8b2d9: 23/23. (Package-suite runs took the tree at the prior commit7138c1e2c; the only later change is the regenerated reference page, which is no test input.)check:type-check-debt --re-measureat844a8b2d9: 33 entries, none above its recorded number.pnpm --filter @objectstack/spec check:generatedat844a8b2d9— all 13 artifacts up to date.Reverse verification (from the committed state)
Direction predicted before each run; two layers observed:
advisoriesdeclaration alone:gen:schemaREFUSES the build — the authorable-surface guard reportsapi/PublishMetaItemResponse:advisoriesdisappeared (the ratchet catches removal before any test can; dist stays stale, suite stays green on the old dist — which is itself the measured reason a test-only reverse verification must also ablate the shard).dist/api/index.js, and the directional conformance case goes red exactly as predicted —strippedKeysreturns['advisories'](1 failed / 12 passed). Restored from the committed branch, rebuilt, re-run green (13/13).Generated by Claude Code