Skip to content

test(objectql): control-plane leg of ADR-0029 D9's pin asserts the full ADR-0112 envelope (#7470) - #7478

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-7470-overlay-pin-full-envelope
Aug 10, 2026
Merged

test(objectql): control-plane leg of ADR-0029 D9's pin asserts the full ADR-0112 envelope (#7470)#7478
os-zhuang merged 1 commit into
mainfrom
claude/issue-7470-overlay-pin-full-envelope

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Fixes #7470

What moved

One file: packages/objectql/src/protocol-object-overlay-layer.test.ts — ADR-0029 D9's pin. The control-plane leg of the D9.7 suite ("a control-plane kernel refuses at the repository, and subtracts under the hatch") is tightened to assert the full ADR-0112 envelope, matching its project-kernel siblings exactly. No non-assertion code changed; the sibling legs are untouched.

Before / after

Before (the only thing that leg could assert while deleteMetaItem's catch re-wrap dropped code — refusals arrived as 403 with code: undefined):

expect(refused).toBeInstanceOf(Error);
expect(String(refused.message)).toContain('NOT_OVERRIDABLE');

After (PR #7466 / 2c28df96e fixed the producer, so the leg asserts refusal identity — code AND status — like the project-kernel siblings; the message-substring check is dropped because the siblings carry none):

expect(refused).toBeInstanceOf(Error);
expect(refused.code).toBe('NOT_OVERRIDABLE');
expect(refused.status).toBe(403);

Scope item 2 of the card (remove or correct any comment explaining the asymmetry): checked — this file contains no comment explaining the substring choice. The doc block above the case describes where the refusal comes from (the repository's assertAllowed, with the two-tier gate skipped on a control-plane kernel), which remains true after the change, so there is nothing to edit.

Verification

  • pnpm --filter @objectstack/objectql exec vitest run src/protocol-object-overlay-layer.test.ts16/16 passed on current main (c6a4eeb10).
  • Reverse verification, direction predicted before running: with packages/metadata-protocol/src/protocol.ts reverted to 2c28df96e^ and rebuilt, exactly one test goes red — this control-plane leg, failing expected undefined to be 'NOT_OVERRIDABLE' (the pre-fix(metadata-protocol): deleteMetaItem's catch re-wrap carries the error code (#7426) #7466 code: undefined defect the old substring assertion could not see; 15 others stayed green). Producer restored: 16/16 green again.
  • pnpm --filter @objectstack/objectql typecheck — clean.
  • node scripts/check-nul-bytes.mjs — OK.

Changeset

Tests-only — releases nothing. Route per scripts/check-empty-changeset.mjs: the skip-changeset label (applied by this session), never an empty changeset file (#4898).

Not folded in: the issue records a prose divergence between the two producers' message brackets ([not_overridable] vs [NOT_OVERRIDABLE]) as optional to fold in "if already in the area". That code lives in packages/metadata-protocol, outside this card's one-file dispatch scope, and the issue itself grades it "not worth a card of its own" — left as recorded on #7470.

Refs: #7470, #7426 / PR #7466 (the cause and its fix), #6960 / PR #7429, #7277 / PR #7306 (ADR-0029 D9), ADR-0112.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MwoubC3jL271FYt9rGXwxb


Generated by Claude Code

…ll 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 (2c28df9) 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
2c28df9^ 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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MwoubC3jL271FYt9rGXwxb
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Aug 10, 2026 4:50pm

Request Review

@os-zhuang os-zhuang added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 10, 2026 — with Claude
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

No hand-written docs reference the 0 changed package(s). ✅

@github-actions github-actions Bot added the tests label Aug 10, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review August 10, 2026 17:00
@os-zhuang
os-zhuang added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit 36237a1 Aug 10, 2026
29 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-7470-overlay-pin-full-envelope branch August 10, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADR-0029 D9's control-plane pin can now assert code + status like its project-kernel sibling (unblocked by #7426)

2 participants