mirror of
https://github.com/motajs/template.git
synced 2026-11-29 09:54:30 +08:00
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:
1 parent
5c962520ef
commit
07fd6c9786
3 files changed
+198
-43
No files matched your search
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user