Skip to content

Commit 6f8c259

Browse files
committed
test(metadata-protocol): seed the stored overlay object spec-valid
Claude-Session: https://claude.ai/code/session_019oFY6Hi35J7atvgVFnmoaK Co-authored-by: Claude <noreply@anthropic.com>
1 parent deac6d1 commit 6f8c259

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎packages/metadata-protocol/src/protocol.runtime-authoring-gate.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3777,7 +3777,12 @@ describe('runtime authoring gate on VIEW writes that name no package — the who
37773777
// universe is the registry FOLDED with the store, so it is there.
37783778
rows.set(keyOf({ type: 'object', name: 'tenant_ticket', organization_id: null, state: 'active' }), {
37793779
id: 'r_obj', type: 'object', name: 'tenant_ticket', organization_id: null, state: 'active',
3780-
metadata: JSON.stringify(object('tenant_ticket')),
3780+
metadata: JSON.stringify({
3781+
name: 'tenant_ticket',
3782+
label: 'Tenant Ticket',
3783+
sharingModel: 'private',
3784+
fields: { title: { type: 'text', label: 'Title' } },
3785+
}),
37813786
});
37823787
const protocol = new ObjectStackProtocolImplementation(engine, () => new Map(), 'env_test') as any;
37833788
return { protocol, rows };
@@ -3873,7 +3878,7 @@ describe('runtime authoring gate on VIEW writes that name no package — the who
38733878
});
38743879

38753880
// The boot path runs no authoring rule.
3876-
await expect(protocol.loadMetaFromDb()).resolves.toMatchObject({ errors: 0, invalid: 0 });
3881+
await expect(protocol.loadMetaFromDb()).resolves.toMatchObject({ loaded: 2, errors: 0, invalid: 0 });
38773882

38783883
// The next save is a write, and is judged.
38793884
const err = await saveView(protocol, stored).catch((e: any) => e);

0 commit comments

Comments
 (0)