fix(03-16): scope circular compatibility cycles explicitly

- classify only all-compatibility cycles outside the approved gate
- preserve fail-closed data and common boundary reporting
This commit is contained in:
AncTe committed 2026-09-11 15:10:25 +08:00
1 parent 5c962520ef
commit 07fd6c9786
3 files changed
+198 -43

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { describe, expect, it } from 'vitest';
import { classifyCycle, isInScope } from './check-data-circular';
describe('circular gate scope classifier', () => {
// 仅兼容路径组成的 legacy cycle 应被排除在门禁范围之外
it('classifies a legacy-only cycle as outside scope', () => {
const cycle = [
'packages-user\\data-state\\src\\legacy\\move.ts',
'packages-user/data-state/src/legacy/map.ts'
];
expect(classifyCycle(cycle).compatibilityOnly).toBe(true);
expect(isInScope(cycle)).toBe(false);
});
});