test(objectql): guard overlay-only cross-package collision provenance (ADR-0048 #1828)#3252
Merged
Merged
Conversation
… (ADR-0048 #1828) Adds the getMetaItems case that unit tests missed and dogfooding caught: two packages with ONLY a sys_metadata overlay each (no registered artifact) shipping the same `type/name`. The list-decorate step grafts each row's artifact via `getArtifactItem(type, name, <row's own package>)`; with no composite artifact it must not fall back to the OTHER package's bare-key hydrated overlay, or both rows get stamped with the last-hydrated package's `_packageId`. Reverting the `getArtifactItem` package-scope guard fails this test (`expected 'Globex home' to be 'Acme home'`), so it locks the fix. Test-only; no runtime change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKFjwN2EVXPB2CJwNzPs8c
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 13 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 19, 2026 11:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only follow-up to #3231 (ADR-0048 #1828, already merged).
Why
#3231 fixed the unscoped metadata list collapse and a provenance bug in
SchemaRegistry.getArtifactItem— but that second bug was invisible to the unit suite and only surfaced by dogfooding a real collision against the running server. The unit tests added in #3231 all register a backing artifact for the colliding name, so the list-decorate step resolves each row's provenance via the composite artifact and never exercises the bare-key fallback that was broken.This adds the missing case so the fix is locked at the unit level.
What
A
getMetaItemstest with two packages that have only asys_metadataoverlay each (no registered artifact) shipping the sametype/name:getArtifactItem(type, name, <row's own package>)._packageId.Reverting the
getArtifactItempackage-scope guard fails this test (expected 'Globex home' to be 'Acme home'), so it genuinely guards the fix — not a vacuous assertion.Verification
protocol-meta.test.ts— 78 passed (the new test + the existing ADR-0048 follow-up: unscoped metadata list dedupes by bare name (collapses same-name collisions across packages) #1828 suite).getArtifactItemguard reverted, the new test fails as expected; restored → green.Test-only; no runtime change, so no changeset (the PR carries
skip-changeset).🤖 Generated with Claude Code
https://claude.ai/code/session_01DKFjwN2EVXPB2CJwNzPs8c
Generated by Claude Code