Skip to content

Commit 91b48bc

Browse files
committed
test(cli): probe the package-union key walk at a nested strip site; the connector entry root is closed
Claude-Session: https://claude.ai/code/session_017xRBcVy4VXmkQjn2MGeaWk Co-authored-by: Claude <noreply@anthropic.com>
1 parent 406ef40 commit 91b48bc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎packages/cli/test/package-union-readers.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const app = { name: 'unr_app', label: 'Union', navigation: [{ id: 'nav_tickets',
9595
const ticketZh = { 'zh-CN': { objects: { unr_ticket: { label: '工单', pluralLabel: '工单', fields: { title: { label: '标题' } } } },
9696
apps: { unr_app: { label: '联合', navigation: { nav_tickets: { label: '工单' } } } } } };
9797
const noteZh = { 'zh-CN': { objects: { unr_note: { label: '笔记', fields: { name: { label: '名称' } } } } } };
98-
const conn = { name: 'unr_conn', label: 'Conn', type: 'api', zzzUnionProbeKey: 1 };
98+
const conn = { name: 'unr_conn', label: 'Conn', type: 'api', retryConfig: { zzzUnionProbeKey: 1 } };
9999
`;
100100

101101
const CONFIGS: Record<string, string> = {
@@ -121,6 +121,9 @@ export default defineStack({ manifest: appManifest, objects: [ticket, note], app
121121
`,
122122
// An undeclared connector key. \`strict: false\` keeps it past the producer's
123123
// parse, so the doors' own pre-parse walk is the only carrier into \`--json\`.
124+
// It sits one level down, in \`retryConfig\` (a strip-mode shape the walk still
125+
// visits): the connector entry's own root is closed, so a top-level key there
126+
// is refused by the artifact load rather than warned about.
124127
keyTwo: `${PIECES}
125128
const svc = defineStack({ manifest: svcManifest, objects: [note], connectors: [conn] } as any, { strict: false });
126129
const appStack = defineStack({ manifest: appManifest, objects: [ticket], apps: [app] } as any);
@@ -259,6 +262,6 @@ describe('#22238 — the undeclared-authoring-key walk reads the package union',
259262
it('`os validate --json` carries the finding in `warnings` for a two-package app', () => {
260263
const run = r.validateTwo;
261264
expect(run.code, `${run.stdout}\n${run.stderr}`).toBe(0);
262-
expect(named(run)).toEqual([expect.stringContaining('connectors.unr_conn.zzzUnionProbeKey')]);
265+
expect(named(run)).toEqual([expect.stringContaining('connectors.unr_conn.retryConfig.zzzUnionProbeKey')]);
263266
});
264267
});

0 commit comments

Comments
 (0)