mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
feat(ql3): gate startup on legacy data receipt
This commit is contained in:
@@ -2477,6 +2477,47 @@ test('local application imports only reviewed execution subpaths and process bou
|
||||
);
|
||||
});
|
||||
|
||||
test('local application receives only the pure data application commit codec', (t) => {
|
||||
const root = fs.mkdtempSync(
|
||||
path.join(os.tmpdir(), 'ql3-local-data-commit-codec-boundary-'),
|
||||
);
|
||||
const sourceDirectory = path.join(
|
||||
root,
|
||||
'packages/ql3-local-application/src/production-process',
|
||||
);
|
||||
fs.mkdirSync(sourceDirectory, { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(sourceDirectory, 'legacyDataApplicationCommitment.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(sourceDirectory, '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-application', findings);
|
||||
assert.deepEqual(
|
||||
findings.map(({ code, file, specifier }) => ({ code, file, specifier })),
|
||||
[
|
||||
{
|
||||
code: 'FORBIDDEN_PACKAGE_SOURCE_IMPORT',
|
||||
file: 'packages/ql3-local-application/src/production-process/legacyDataApplicationCommitment.ts',
|
||||
specifier: '@qinglong/local-sqlite/data-directory-adoption',
|
||||
},
|
||||
{
|
||||
code: 'FORBIDDEN_PACKAGE_SOURCE_IMPORT',
|
||||
file: 'packages/ql3-local-application/src/production-process/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-'),
|
||||
|
||||
@@ -540,10 +540,10 @@ test('current QL3 workspace has exactly eighteen reviewed package boundaries', (
|
||||
rootSourceFileRoles: localSqlite.rootSourceFileRoles,
|
||||
},
|
||||
{
|
||||
sourceFiles: 201,
|
||||
sourceFiles: 202,
|
||||
rootSourceFiles: 1,
|
||||
rootSourceLines: 31,
|
||||
nestedSourceFiles: 200,
|
||||
nestedSourceFiles: 201,
|
||||
rootSourceFileRoles: { 'index.ts': 'public_export' },
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user