Skip to content

Commit 5bb397d

Browse files
fix(metadata-protocol): the merged list files a stored row's copy under its package column, not its body's _packageId (#38699)
<!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ85EvBuHuozE2mBvNkfHbq3F)_ Fixes #38573 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:托管环境上,元数据列表(含技能列表)里一条已保存的技能只按它所属应用列出一次,不再同时挂到正文里写的另一个应用下;没有所属应用的旧记录不再被当成别的应用的。 - 为什么做:AI 区,应用技能归属;替云端的应用技能卡(cloud#4973)解决协议路径上的归属错误。 - 出错会怎样:影响托管环境的元数据列表读取;只改读取、不改存储,撤回此改动即恢复原样。 - 要你做什么:无。 ## What changes `getMetaItems` lays the stored `sys_metadata` rows over the items the `metadata` service lists (`protocol-meta-list-reads.ts`, the runtime merge). On a hosted kernel that service is a primed `MetadataManager`: its `list` answers the BODY of each stored row it read, and a body can carry a `_packageId` stamp naming another package than the row's package column. The stored rows themselves are served with the column's binding (`withRowBinding`), but the service's copy re-entered under its body stamp, so for a row bound to P with a body stamped Q: - the env-wide list served it twice (P and Q); - a list scoped to Q served it as Q's item (the line-764 package filter read the stamp); - a legacy row with an empty column stood in for Q's slot and was listed as Q's. The merge now reads the service through `IMetadataService.listPackageBindings` (#37039) when the service offers it, and restates each item a stored row holds (`source: 'row'`) with that row's column through `withRowBinding`, the rule every other read of a stored row already states its package by. An item no stored row holds (`source: 'registration'`) keeps its body unchanged, so #7654's package-less override over a code baseline still stands in for the code package. A service without `listPackageBindings` is read through `list` as before (the contract says such a service cannot tell the two apart). Responsibility: the runtime merge slotted service items by `item._packageId` since before #37039 added a binding read; the fix and its consumer contract both live in this repository, and cloud's `SkillRegistry` (cloud PR #5223) already reads the protocol's merged list as the row binding. ## Tests New top-level `describe` in the existing harness `packages/metadata-protocol/src/protocol.meta-list-runtime-baseline-dedup.test.ts` (the runtime-merge harness), pins on `skill` and `agent`: - a row bound to P with a body stamped Q is listed once, under P; a legacy row is listed under no package; - the list scoped to Q holds neither; - the list scoped to P holds its row once; - a registration item stays under its registration package; - CONTROL: a service without `listPackageBindings` still reads bodies (both slots, as before). Red on `origin/main` 5ac1ee0 with only the test added: 4 failed / 13 passed (the env-wide and Q-scoped cases on both types; the received list was `differs|com.example.crm`, `differs|com.example.policy`, `legacy|com.example.crm`). Green with the fix: 17/17. <details><summary>Local runs (heads 36ab001 and 88569ee)</summary> - `pnpm --filter @objectstack/metadata-protocol test`: Test Files 374 passed, 9 skipped; Tests 23698 passed, 45 skipped; lock VERDICT command-exit 0. - `pnpm --filter @objectstack/metadata-protocol typecheck`: VERDICT command-exit 0. - Derived gate families (`dispatch-gates.mjs --commands`, 67, `--ran` reconciled 67/67) at 36ab001: 63 exit 0; `check:test-source-alias` exit 1 (this harness reached the protocol's lazy `@objectstack/lint` load inside a case), fixed in 88569ee with a module-top import and re-run exit 0. - NOT MEASURED (exit 3, prerequisite): `check:dual-build-cjs-loads` and `check:lean-entry-closure` need every package's `dist/` (no full build in this container); `check-plugin-teardown-shape.mjs --self-test` needs an unshallow clone (checker health only, not a PR verdict). CI runs all three. - Focused file at 88569ee: 17/17. </details> ## Acceptance notes - Each `getMetaItems` call with a `metadata` service that offers `listPackageBindings` now runs one more loader walk for row columns (`MetadataManager.listPackageBindings` is uncached; `DatabaseLoader` reads through its row cache). Not measured on a live kernel. - The by-name read (`readItemFromMetadataService`) was not examined for the same body-stamp question; this PR changes the list only. ## Verification `pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.meta-list-runtime-baseline-dedup.test.ts` — expect 17 passed; revert the source hunk and expect 4 failed. --- _Generated by [Claude Code](https://claude.ai/code/session_01JQwxbYAjtLtucYL4W61z6Q)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 991520c commit 5bb397d

5 files changed

Lines changed: 316 additions & 1 deletion

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the merged metadata list files a stored row's copy under the row's package column, never under the package its body names
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`getMetaItems` (`GET /api/v1/meta/:type`) lays the stored rows over the items the `metadata` service lists. On a hosted kernel that service holds a copy of each stored row it read, and its `list` answers that copy's body, so a body whose `_packageId` named another package than the row's package column put the copy in that package's slot: the row was listed twice (once under its column, once under the body's package), a list scoped to the body's package (`?package=`) served it as that package's item, and a row with no package column was listed as the body's package's. A skill bound to one app could be listed as another app's skill.
11+
12+
The merge now reads the service's items through `listPackageBindings` when the service offers it, and files each item a stored row holds under that row's column, as the stored rows themselves are served: a row bound to one package is listed once, under it, and a row with an empty column is listed under no package. An item no stored row holds keeps the package its registration files it under. A `metadata` service without `listPackageBindings` is read as before. The binding read is kept on the footing the service keeps `list` on: one answer per type, served again while the service's change counter (`revision`) stands and for no longer than the service memoizes `list`, so a read inside an open transaction (a flow re-sync during a package move) does not wait on the stored rows each time.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
/**
4+
* [#38573] `listedPackageBoundItems`: the merged list read's binding read keeps
5+
* the service's `list` footing. Before, the merge asked `listPackageBindings`
6+
* on every call, uncached, and on the dogfood stack a package move's flow
7+
* re-sync waited up to 281 ms for it inside the move's transaction, so the
8+
* moved flow was armed after the move answered (`package-move-in.dogfood`,
9+
* A3: 404 at the package's address).
10+
*/
11+
import { describe, expect, it, vi, type Mock } from 'vitest';
12+
import type { MetadataPackageBinding } from '@objectstack/spec/contracts';
13+
import { DEGRADED_LIST_BOUND_MS, LIST_BOUND_MS, listedPackageBoundItems } from './listed-package-bindings.js';
14+
15+
const ROW_PKG = 'com.example.policy';
16+
const BODY_PKG = 'com.example.crm';
17+
18+
function service(opts: { revision?: number; degraded?: boolean; bindings?: boolean } = {}) {
19+
const items: MetadataPackageBinding[] = [
20+
{ name: 'differs', data: { name: 'differs', _packageId: BODY_PKG }, packageId: ROW_PKG, source: 'row' },
21+
{ name: 'legacy', data: { name: 'legacy', _packageId: BODY_PKG }, packageId: null, source: 'row' },
22+
{ name: 'shipped', data: { name: 'shipped', _packageId: BODY_PKG }, packageId: BODY_PKG, source: 'registration' },
23+
];
24+
const svc: Record<string, unknown> = {
25+
list: vi.fn(async () => items.map((b) => b.data)),
26+
...(opts.revision !== undefined ? { revision: opts.revision } : {}),
27+
};
28+
if (opts.bindings !== false) {
29+
svc.listPackageBindings = vi.fn(async () => ({ items, degraded: opts.degraded ?? false, errors: [] }));
30+
}
31+
return svc as unknown as {
32+
list: Mock<(type: string) => Promise<unknown[]>>;
33+
listPackageBindings: Mock<(type: string) => Promise<{ items: MetadataPackageBinding[]; degraded: boolean; errors: string[] }>>;
34+
revision?: number;
35+
};
36+
}
37+
38+
const filed = (items: unknown[]) => (items as Array<{ name: string; _packageId?: string }>).map((i) => `${i.name}|${i._packageId ?? '(none)'}`);
39+
40+
describe('[#38573] listedPackageBoundItems', () => {
41+
it("files a row's copy under its column, a legacy row under none, and a registration as registered", async () => {
42+
expect(filed(await listedPackageBoundItems(service({ revision: 1 }), 'skill'))).toEqual([
43+
`differs|${ROW_PKG}`, 'legacy|(none)', `shipped|${BODY_PKG}`,
44+
]);
45+
});
46+
47+
it("reads the bindings once while the service's revision stands and the list bound has not passed (BEFORE: once per call)", async () => {
48+
const svc = service({ revision: 7 });
49+
let now = 1_000;
50+
for (let i = 0; i < 3; i++) await listedPackageBoundItems(svc, 'skill', () => now);
51+
now += LIST_BOUND_MS - 1;
52+
expect(filed(await listedPackageBoundItems(svc, 'skill', () => now))).toEqual([
53+
`differs|${ROW_PKG}`, 'legacy|(none)', `shipped|${BODY_PKG}`,
54+
]);
55+
expect(svc.listPackageBindings).toHaveBeenCalledTimes(1);
56+
expect(svc.list).not.toHaveBeenCalled();
57+
});
58+
59+
it('reads again once the revision moves, per type', async () => {
60+
const svc = service({ revision: 1 });
61+
await listedPackageBoundItems(svc, 'skill');
62+
await listedPackageBoundItems(svc, 'agent');
63+
svc.revision = 2;
64+
await listedPackageBoundItems(svc, 'skill');
65+
expect(svc.listPackageBindings.mock.calls.map((c) => c[0])).toEqual(['skill', 'agent', 'skill']);
66+
});
67+
68+
it("reads again once the service's list bound passes: 30 s, 2 s for a degraded answer", async () => {
69+
let now = 0;
70+
const healthy = service({ revision: 1 });
71+
await listedPackageBoundItems(healthy, 'skill', () => now);
72+
now = LIST_BOUND_MS;
73+
await listedPackageBoundItems(healthy, 'skill', () => now);
74+
expect(healthy.listPackageBindings).toHaveBeenCalledTimes(2);
75+
76+
now = 0;
77+
const degraded = service({ revision: 1, degraded: true });
78+
await listedPackageBoundItems(degraded, 'skill', () => now);
79+
now = DEGRADED_LIST_BOUND_MS - 1;
80+
await listedPackageBoundItems(degraded, 'skill', () => now);
81+
now = DEGRADED_LIST_BOUND_MS;
82+
await listedPackageBoundItems(degraded, 'skill', () => now);
83+
expect(degraded.listPackageBindings).toHaveBeenCalledTimes(2);
84+
});
85+
86+
it('keeps no answer the revision moved under while it was read', async () => {
87+
const svc = service({ revision: 1 });
88+
const read = svc.listPackageBindings.getMockImplementation()!;
89+
svc.listPackageBindings.mockImplementationOnce(async (type: string) => {
90+
svc.revision = 2;
91+
return read(type);
92+
});
93+
await listedPackageBoundItems(svc, 'skill');
94+
await listedPackageBoundItems(svc, 'skill');
95+
expect(svc.listPackageBindings).toHaveBeenCalledTimes(2);
96+
});
97+
98+
it('keeps no failed read: the next call reads again', async () => {
99+
const svc = service({ revision: 1 });
100+
svc.listPackageBindings.mockRejectedValueOnce(new Error('sys_metadata unreachable'));
101+
await expect(listedPackageBoundItems(svc, 'skill')).rejects.toThrow('sys_metadata unreachable');
102+
expect(filed(await listedPackageBoundItems(svc, 'skill'))).toContain(`differs|${ROW_PKG}`);
103+
expect(svc.listPackageBindings).toHaveBeenCalledTimes(2);
104+
});
105+
106+
it('a service with no revision is read every time: no counter is guessed', async () => {
107+
const svc = service();
108+
await listedPackageBoundItems(svc, 'skill');
109+
await listedPackageBoundItems(svc, 'skill');
110+
expect(svc.listPackageBindings).toHaveBeenCalledTimes(2);
111+
});
112+
113+
it("a service with no listPackageBindings answers its list bodies as they are", async () => {
114+
const svc = service({ revision: 1, bindings: false });
115+
expect(filed(await listedPackageBoundItems(svc, 'skill'))).toEqual([
116+
`differs|${BODY_PKG}`, `legacy|${BODY_PKG}`, `shipped|${BODY_PKG}`,
117+
]);
118+
expect(svc.list).toHaveBeenCalledTimes(1);
119+
});
120+
});
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
/**
4+
* [#38573, #37039] The metadata service's items for the merged list read,
5+
* each filed under the package it is bound to: a stored row's copy under the
6+
* row's package column ({@link withRowBinding}), ⛔ never under the
7+
* `_packageId` its body carries; an item no stored row holds as its
8+
* registration files it.
9+
*
10+
* ## Why it is memoized here
11+
*
12+
* `IMetadataService.list` is memoized by the service (`MetadataManager`: a
13+
* short-TTL answer, retracted on every change it learns of), and the merged
14+
* list read is on every caller's path, the flow engine's re-sync after a
15+
* metadata write among them. `listPackageBindings` is not: each call walks
16+
* the loaders again and reads the stored rows' columns, which inside an open
17+
* transaction waits for the transaction's lock (measured: up to 281 ms on the
18+
* SQLite dogfood stack during a package move, against 0.1 ms for `list`), and
19+
* the flow engine then armed a moved flow after the move had answered. So the
20+
* binding read keeps the list's footing: one answer per `(service, type)`,
21+
* served again while the service's change counter (`revision`, ADR-0156 D2:
22+
* moved by every path that changes what `list` answers) stands where it
23+
* stood, and only for as long as the service memoizes `list` itself
24+
* ({@link LIST_BOUND_MS}; {@link DEGRADED_LIST_BOUND_MS} for a partial answer).
25+
*
26+
* A service without a numeric `revision` is read every time, as before: ⛔ no
27+
* counter is guessed (ADR-0156 D2). A read the counter moved under is
28+
* answered to its callers and kept by no one. A service without
29+
* `listPackageBindings` cannot tell a row's binding from a body's (its
30+
* contract): its `list` bodies are answered as they are.
31+
*/
32+
33+
import type { MetadataPackageBinding } from '@objectstack/spec/contracts';
34+
import { withRowBinding } from './protocol-package-bindings.js';
35+
36+
/** The service's healthy `list` memo bound (`MetadataManager.LIST_CACHE_TTL_MS`). */
37+
export const LIST_BOUND_MS = 30_000;
38+
/** The service's bound for a `list` answer a lost loader left partial (`DEGRADED_LIST_CACHE_TTL_MS`). */
39+
export const DEGRADED_LIST_BOUND_MS = 2_000;
40+
41+
interface BindingService {
42+
list(type: string): Promise<unknown[]> | unknown[];
43+
listPackageBindings?(type: string): Promise<{ items: MetadataPackageBinding[]; degraded: boolean; errors: string[] }>;
44+
revision?: unknown;
45+
}
46+
47+
interface Kept {
48+
revision: number;
49+
at: number;
50+
read: Promise<{ items: unknown[]; degraded: boolean }>;
51+
}
52+
53+
const kept = new WeakMap<object, Map<string, Kept>>();
54+
55+
function bound(service: BindingService, type: string): Promise<{ items: unknown[]; degraded: boolean }> {
56+
return service.listPackageBindings!(type).then(({ items, degraded }) => ({
57+
items: items.map(({ data, packageId, source }) => (source === 'row' ? withRowBinding(data, packageId) : data)),
58+
degraded,
59+
}));
60+
}
61+
62+
/** The service's items for `type`, each under its binding; see the module header. */
63+
export async function listedPackageBoundItems(service: BindingService, type: string, now: () => number = Date.now): Promise<unknown[]> {
64+
if (typeof service.listPackageBindings !== 'function') return service.list(type);
65+
const revision = service.revision;
66+
if (typeof revision !== 'number') return (await bound(service, type)).items;
67+
let byType = kept.get(service);
68+
if (byType === undefined) kept.set(service, byType = new Map());
69+
const held = byType.get(type);
70+
if (held !== undefined && held.revision === revision) {
71+
const answer = await held.read;
72+
const age = now() - held.at;
73+
if (age < (answer.degraded ? DEGRADED_LIST_BOUND_MS : LIST_BOUND_MS)) return answer.items;
74+
}
75+
const entry: Kept = { revision, at: now(), read: bound(service, type) };
76+
byType.set(type, entry);
77+
try {
78+
const answer = await entry.read;
79+
// A change the counter recorded while the read ran: the answer is the
80+
// callers', and the next read starts again.
81+
if (service.revision !== revision && byType.get(type) === entry) byType.delete(type);
82+
return answer.items;
83+
} catch (error) {
84+
if (byType.get(type) === entry) byType.delete(type);
85+
throw error;
86+
}
87+
}

‎packages/metadata-protocol/src/protocol-meta-list-reads.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import { storedEntryRow } from './protocol-stored-overlay-types.js';
5050
import { viewIdentityPatch } from './protocol-view-normalization.js';
5151
import { isServedOverrideRowOf, type ServedOverrideRow } from './served-override.js';
5252
import { installedManifestsOfEngine } from './installed-manifests.js';
53+
import { listedPackageBoundItems } from './listed-package-bindings.js';
5354
import { listedChangedAt, storedEntryChangedAt, storedRowChangedAt, takeListedRowChangedAt, withListedRowChangedAt } from './listed-row-changed-at.js';
5455
import { packagelessRowWithheld, withServedObjectDecorations } from './protocol-meta-item-face.js';
5556
import {
@@ -747,7 +748,15 @@ export async function readFlattenedMetaItems(host: Pick<ProtocolHost, 'artifactL
747748
const services = host.getServicesRegistry?.();
748749
const metadataService = services?.get('metadata');
749750
if (metadataService && typeof metadataService.list === 'function') {
750-
let runtimeItems = await metadataService.list(request.type);
751+
// [#38573, #37039] A stored row's copy the service holds (a hosted
752+
// kernel's primed `MetadataManager`) is filed under its row's
753+
// package column, as the stored rows above are ({@link withRowBinding}),
754+
// ⛔ never under the `_packageId` its body carries: that stamp put
755+
// the copy in another package's slot (the row listed twice, and
756+
// under the stamp's package in a list scoped to it) and a legacy
757+
// row with no column under the stamp's package. Read on the
758+
// service's `list` footing ({@link listedPackageBoundItems}).
759+
let runtimeItems = await listedPackageBoundItems(metadataService, request.type);
751760
// [#23645] The service's copy of a stored object row is not the
752761
// base this merge lays the stored rows over: the rows above
753762
// already serve every live one, and a copy of a deleted one

‎packages/metadata-protocol/src/protocol.meta-list-runtime-baseline-dedup.test.ts‎

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
* altered an identity it promised not to. Measured in the PR body.
6060
*/
6161
import { describe, expect, it } from 'vitest';
62+
// Clocked windows measure behaviour, never loading: the list reaches `@objectstack/lint`
63+
// through a dynamic import, so its first load is paid here, during collection.
64+
import '@objectstack/lint';
6265
import { ObjectStackProtocolImplementation } from './protocol.js';
6366
import { assertEngineFindOnePredicate, type EngineFindOneQueryInput } from '@objectstack/metadata-core';
6467

@@ -288,3 +291,87 @@ describe('[#7654] the /meta list serves one row per name after a runtime PUT', (
288291
});
289292
});
290293
});
294+
295+
/**
296+
* [#38573, #37039, #28673] On a hosted kernel the `metadata` service is a
297+
* primed `MetadataManager`: its `list` answers the BODY of each stored row it
298+
* read, and a body may carry a `_packageId` stamp naming another package than
299+
* the row's package column (or one while the column is empty: a legacy row).
300+
* The stored rows themselves are served with their column's binding
301+
* (`withRowBinding`), so a copy of the same row re-entering under its body's
302+
* stamp lands in another package's slot: the list served the row twice (once
303+
* under its column, once under its stamp), the list scoped to the stamp's
304+
* package served it as that package's item, and a legacy row stood in for the
305+
* stamp's package. `listPackageBindings` answers each item with its row's
306+
* column, and the merge files a stored row's copy by it.
307+
*/
308+
describe('[#38573] the merged list files a stored row by its package column, never its body stamp', () => {
309+
const ROW_PKG = 'com.example.policy';
310+
const BODY_PKG = 'com.example.crm';
311+
312+
interface Binding { name: string; data: unknown; packageId: string | null; source: 'row' | 'registration' }
313+
314+
/** A primed `metadata` service: `list` answers bodies, `listPackageBindings` the bindings. */
315+
function primedProtocol(engine: any, byType: Record<string, Binding[]>, opts: { withBindings?: boolean } = {}) {
316+
const p = new ObjectStackProtocolImplementation(engine);
317+
const service: Record<string, unknown> = {
318+
list: async (type: string) => (byType[type] ?? []).map((b) => b.data),
319+
};
320+
if (opts.withBindings !== false) {
321+
service.listPackageBindings = async (type: string) => ({ items: byType[type] ?? [], degraded: false, errors: [] });
322+
}
323+
(p as any).getServicesRegistry = () => new Map<string, any>([['metadata', service]]);
324+
return p;
325+
}
326+
327+
const names = (items: any[]): string[] => items.map((i) => `${i.name}|${i._packageId ?? '(none)'}`).sort();
328+
329+
for (const type of ['skill', 'agent'] as const) {
330+
describe(`type \`${type}\``, () => {
331+
const body = (name: string) => ({ name, label: name, _packageId: BODY_PKG });
332+
const engine = () => makeEngine({
333+
rows: [
334+
row({ type, name: 'differs', package_id: ROW_PKG, metadata: body('differs') }),
335+
row({ type, name: 'legacy', metadata: body('legacy') }),
336+
],
337+
});
338+
const service = {
339+
[type]: [
340+
{ name: 'differs', data: body('differs'), packageId: ROW_PKG, source: 'row' as const },
341+
{ name: 'legacy', data: body('legacy'), packageId: null, source: 'row' as const },
342+
],
343+
};
344+
345+
it("lists a row bound to P with a body stamped Q once, under P (BEFORE: under P and under Q)", async () => {
346+
const res: any = await primedProtocol(engine(), service).getMetaItems({ type });
347+
expect(names(res.items)).toEqual([`differs|${ROW_PKG}`, 'legacy|(none)']);
348+
});
349+
350+
it("the list scoped to the body's package holds neither row (BEFORE: both, as its items)", async () => {
351+
const res: any = await primedProtocol(engine(), service).getMetaItems({ type, packageId: BODY_PKG });
352+
expect(names(res.items)).toEqual([]);
353+
});
354+
355+
it("the list scoped to the row's package holds its row once", async () => {
356+
const res: any = await primedProtocol(engine(), service).getMetaItems({ type, packageId: ROW_PKG });
357+
expect(names(res.items).filter((n) => n.startsWith('differs|'))).toEqual([`differs|${ROW_PKG}`]);
358+
});
359+
});
360+
}
361+
362+
it('an item no stored row holds is listed under the package its registration files it under', async () => {
363+
const res: any = await primedProtocol(makeEngine(), {
364+
skill: [{ name: 'shipped', data: { name: 'shipped', _packageId: ROW_PKG }, packageId: ROW_PKG, source: 'registration' }],
365+
}).getMetaItems({ type: 'skill' });
366+
expect(names(res.items)).toEqual([`shipped|${ROW_PKG}`]);
367+
});
368+
369+
it("CONTROL: a service with no listPackageBindings cannot tell a row's binding from a body's, and the list reads its bodies as before", async () => {
370+
const res: any = await primedProtocol(makeEngine({
371+
rows: [row({ type: 'skill', name: 'differs', package_id: ROW_PKG, metadata: { name: 'differs', _packageId: BODY_PKG } })],
372+
}), {
373+
skill: [{ name: 'differs', data: { name: 'differs', _packageId: BODY_PKG }, packageId: ROW_PKG, source: 'row' }],
374+
}, { withBindings: false }).getMetaItems({ type: 'skill' });
375+
expect(names(res.items)).toEqual([`differs|${BODY_PKG}`, `differs|${ROW_PKG}`]);
376+
});
377+
});

0 commit comments

Comments
 (0)