From da2c5e14eabb7b0972ab86bb856a3b98e211c737 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 10 Aug 2026 16:49:09 +0000 Subject: [PATCH] test(objectql): control-plane leg of ADR-0029 D9's pin asserts the full ADR-0112 envelope (#7470) The control-plane leg of protocol-object-overlay-layer.test.ts asserted only a message substring, because deleteMetaItem's catch re-wrap used to drop `code` (a repository refusal reached the caller as 403 with `code: undefined`). PR #7466 (2c28df96e) fixed the producer, so the constraint is gone: the leg now asserts `code` + `status`, exactly like its project-kernel sibling, and the message-substring check is dropped (the sibling carries none). Reverse-verified: with packages/metadata-protocol/src/protocol.ts reverted to 2c28df96e^ and rebuilt, exactly this one test goes red (expected undefined to be 'NOT_OVERRIDABLE'); restored, 16/16 green. Refs #7470, #7426, #7466. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MwoubC3jL271FYt9rGXwxb --- packages/objectql/src/protocol-object-overlay-layer.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/objectql/src/protocol-object-overlay-layer.test.ts b/packages/objectql/src/protocol-object-overlay-layer.test.ts index 5e2a425099..50358931af 100644 --- a/packages/objectql/src/protocol-object-overlay-layer.test.ts +++ b/packages/objectql/src/protocol-object-overlay-layer.test.ts @@ -400,7 +400,8 @@ describe('ADR-0029 D9.7 — the delete is a SUBTRACTION, and #7012\'s guard is r .deleteMetaItem({ type: 'object', name: 'myapp_invoice' }) .then(() => null, (e: any) => e); expect(refused).toBeInstanceOf(Error); - expect(String(refused.message)).toContain('NOT_OVERRIDABLE'); + expect(refused.code).toBe('NOT_OVERRIDABLE'); + expect(refused.status).toBe(403); const b = await bootWithPackage(seed, { controlPlane: true }); await withObjectWritable(() => b.protocol.deleteMetaItem({ type: 'object', name: 'myapp_invoice' }));