Skip to content

feat(metadata-protocol): batch publish door returns per-draft advisories on each published[] element - #9405

Merged
os-steve merged 1 commit into
mainfrom
claude/issue-9343-batch-publish-advisories
Aug 17, 2026
Merged

feat(metadata-protocol): batch publish door returns per-draft advisories on each published[] element#9405
os-steve merged 1 commit into
mainfrom
claude/issue-9343-batch-publish-advisories

Conversation

@os-steve

@os-steveos-steve commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Fixes#9343

Ruling (recorded on the card 2026-08-17 22:35Z, batch acceptance 「同意」)

Ruled: advisories ride each published[] element of the batch response — same optional, omitted-when-empty shape as PublishMetaItemResponseSchema.advisories on the single-item door (#9176). No parallel top-level map: one concept, both doors consistent. failed[] elements are unaffected (an error finding already aborts per the gating half).

What landed

Deviations from the dispatch card (measured, not chosen)

Verification (all at 292239ca6)

  • @objectstack/metadata-protocol full suite: 121 files / 1655 tests green (new file 4/4). DTS build green (measured DEBT-ledger package, no typecheck script); check:type-check-debt --re-measure: 33 entries re-measured, none above recorded (surplus: none).
  • @objectstack/objectql (downstream consumer of @objectstack/metadata-protocol) full suite: 215 files / 3811 tests green; tsc --noEmit green.
  • Derived gates (node scripts/pm/dispatch-gates.mjs over the changed paths), all green locally: cross-package-test-inputs, durability-log-level, filter-alias-parity, changeset-gate-self-tests, objectui-changeset, query-options-erasure, engine-double-contract, where-matcher, nul-bytes, type-check-coverage, type-check-debt (re-measure), adr-0087-registration, changeset-no-major, empty-changeset, docs-audit affected-docs, spec check:generated.

Reverse verification (from the committed state)

Predicted before the run: the two directional cases go red, the byte-stability and gating-half pins stay green (green-either-way by design). Restored origin/main's protocol.ts into the tree (git restore --source=origin/main), re-ran the new file: 2 failed / 2 passed — exactly the predicted split (both reds are the element-level advisories read returning undefined, i.e. the discard this card is about). Restored from HEAD, re-ran: 4/4 green.

Conditional-field byte-stability proof

Case (3) pins the raw element key set (Object.keys(el).sort() = ['name','type','version']) and asserts JSON.stringify(res) contains no advisories substring — the route hands this object to res.json() verbatim, so this is the wire. An advisory-free batch's response bytes are unchanged.


Generated by Claude Code

…ies on each published[] element
publishPackageDrafts (Studio's "publish whole app") destructured only
{ singularType, result } from promoteDraftForPublish, which since #9176
RETURNS the #4463 gate's advisory findings — so they were computed and
discarded, per draft, for every draft in the batch.
Per the maintainer's ruling on #9343: advisories ride EACH published[]
element, same optional omitted-when-empty shape as
PublishMetaItemResponseSchema.advisories on the single-item door; no
parallel top-level map; failed[] elements unaffected (an error finding
still aborts the batch, ADR-0067 D2).
The objectql doubles of the promoteDraftForPublish seam gain the
advisories key the real helper has returned since #9176.
Part of #9343
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fs18A2DdXLVN2h8PaaFBcP
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/api/client-sdk.mdx(via meta.publishItem (sdk), publishItem (sdk))
  • content/docs/concepts/metadata-lifecycle.mdx(via ObjectStackProtocolImplementation (symbol))
  • content/docs/kernel/contracts/metadata-service.mdx(via /:type/:name/publish (route))
  • content/docs/protocol/objectql/state-machine.mdx(via /:name/state/:field (route))

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

  • content/docs/releases/v16.mdx(via ObjectStackProtocolImplementation (symbol))
  • content/docs/releases/v17.mdx(via ObjectStackProtocolImplementation (symbol), publishPackageDrafts (symbol), getLegalNextStates (sdk), meta.getLegalNextStates (sdk), /:type/:name/publish (route))

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

Coarse fallback — 5 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 origin/mainpackageMentionDocs.

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 origin/main → pass the list as args.docs.

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests tooling labels Aug 17, 2026
@os-steve
os-steve marked this pull request as ready for review August 17, 2026 23:38
@os-steve
os-steve added this pull request to the merge queueAug 17, 2026
Merged via the queue into main with commit 40d5b2dAug 17, 2026
28 checks passed
@os-steve
os-steve deleted the claude/issue-9343-batch-publish-advisories branch August 17, 2026 23:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

publishPackageDrafts still discards the runtime authoring gate's per-draft advisories — Studio's "publish whole app" reports none of them

2 participants

@os-steve@claude