Skip to content

Commit ea873b0

Browse files
committed
fix(metadata-protocol): the promote doors' D9.9 check is not asked of sealed managed content
An object a code package ships is sealed (ADR-0131 D6): the save door answers its package door, NOT_OVERRIDABLE / 403, ahead of D9.9, and the promotion reaches the same refusal at the store. The new promote-door check asked classifyObjectContribution with no sealed-item test in front, so its packaged mismatch arm answered 422 OBJECT_OVERLAY_PACKAGE_MISMATCH with a prescription the sealed rule refuses. Guarded with isSealedManagedItem, per the seat's route (A). Claude-Session: https://claude.ai/code/session_01GP3comALHRcRBixS2TEnLF Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3f0acc1 commit ea873b0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎packages/metadata-protocol/src/protocol.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24492,7 +24492,17 @@ export class ObjectStackProtocolImplementation implements
2449224492
// before `repo.promoteDraft` writes, so a batch publish aborts on it
2449324493
// as on the refusals below (ADR-0067 D2). Both doors reach it: the
2449424494
// per-item publish and `publishPackageDrafts` promote through here.
24495-
if (draftForGate && singularType === 'object') {
24495+
//
24496+
// ⛔ Not asked of SEALED managed content ({@link isSealedManagedItem}):
24497+
// an object a code package ships. The save door answers that row's
24498+
// package door first ({@link refusePackagedBaseOverride},
24499+
// `NOT_OVERRIDABLE` / 403, ahead of its D9.9 call), and the promotion
24500+
// reaches the same refusal at the store (`repo.promoteDraft` →
24501+
// `assertAllowed`). Asking `classifyObjectContribution` there would
24502+
// answer its packaged `mismatch` arm instead — a second dialect for
24503+
// one row, whose prescription ("bind to the owner") the sealed rule
24504+
// refuses. One row, one refusal: the save door's.
24505+
if (draftForGate && singularType === 'object' && !this.isSealedManagedItem(singularType, request.name)) {
2449624506
const layer = this.classifyObjectContribution(request.name, promoteInto);
2449724507
if (layer.kind === 'mismatch') {
2449824508
throw ObjectStackProtocolImplementation.overlayPackageMismatchError(

0 commit comments

Comments
 (0)