feat(ql3): prepare adopted deployment bundles

This commit is contained in:
whyour
2026-08-21 14:09:59 +08:00
parent 07cb5ea0a8
commit 190117a662
10 changed files with 2231 additions and 6 deletions
@@ -2567,6 +2567,47 @@ test('service-manager Owner consumers receive only the pure data commit codec',
);
});
test('adopted deployment material receives only the pure data commit codec', (t) => {
const root = fs.mkdtempSync(
path.join(os.tmpdir(), 'ql3-adopted-bundle-codec-boundary-'),
);
const bundleDirectory = path.join(
root,
'packages/ql3-local-owner-cli/src/deployment/adopted-bundle',
);
fs.mkdirSync(bundleDirectory, { recursive: true });
fs.writeFileSync(
path.join(bundleDirectory, 'material.ts'),
[
"import { normalize } from '@qinglong/local-sqlite/data-directory-application-commit';",
"import { mutate } from '@qinglong/local-sqlite/data-directory-adoption';",
].join('\n'),
);
fs.writeFileSync(
path.join(bundleDirectory, 'neighbor.ts'),
"import { normalize } from '@qinglong/local-sqlite/data-directory-application-commit';",
);
t.after(() => fs.rmSync(root, { recursive: true, force: true }));
const findings = [];
auditSourceImports(root, 'packages/ql3-local-owner-cli', findings);
assert.deepEqual(
findings.map(({ code, file, specifier }) => ({ code, file, specifier })),
[
{
code: 'FORBIDDEN_LOCAL_ADOPTION_CLI_AUTHORITY_IMPORT',
file: 'packages/ql3-local-owner-cli/src/deployment/adopted-bundle/material.ts',
specifier: '@qinglong/local-sqlite/data-directory-adoption',
},
{
code: 'FORBIDDEN_LOCAL_ADOPTION_CLI_AUTHORITY_IMPORT',
file: 'packages/ql3-local-owner-cli/src/deployment/adopted-bundle/neighbor.ts',
specifier: '@qinglong/local-sqlite/data-directory-application-commit',
},
],
);
});
test('local AI application imports only the reviewed dynamic composition subpaths', (t) => {
const root = fs.mkdtempSync(
path.join(os.tmpdir(), 'ql3-local-ai-application-boundary-'),
+2 -2
View File
@@ -207,10 +207,10 @@ test('current QL3 workspace has exactly eighteen reviewed package boundaries', (
rootSourceFileRoles: localOwnerCli.rootSourceFileRoles,
},
{
sourceFiles: 131,
sourceFiles: 134,
rootSourceFiles: 1,
rootSourceLines: 50,
nestedSourceFiles: 130,
nestedSourceFiles: 133,
rootSourceFileRoles: { 'cli.ts': 'binary_entry' },
},
);