|
3 | 3 | // |
4 | 4 | // Ranked target spine, as rank groups lowest to highest. `A ◄ B` means B may not |
5 | 5 | // be outranked by A (the back-edge order the gate rejects), NOT that every displayed import exists: |
6 | | -// { contracts, request, selectors } ◄ core ◄ { commands, cli-schema } |
| 6 | +// { contracts, request, selectors } ◄ core ◄ commands |
7 | 7 | // ◄ { client, daemon-server } ◄ daemon-client ◄ cli |
8 | 8 | // (authoritative ranks: `TARGET_DAG_RANK` in model.ts. The former rank-0 kernel |
9 | 9 | // zone lives in packages/kernel since #1490 W0; R11 owns its boundary.) |
10 | | -// `commands` and `cli-schema` share a rank, so the spine cannot order them; R2 declares the |
11 | | -// direction instead — cli-schema renders the command facets and reads them, commands never |
12 | | -// imports cli-schema (#2543). |
| 10 | +// `commands/schema/` renders the rest of commands/'s facets and reads them; commands never |
| 11 | +// imports it back (#2543). It shares the commands zone (#2679 folded the standalone |
| 12 | +// cli-schema zone into it), so the ranked spine and the R2 zone-policy table cannot see the |
| 13 | +// edge — `commands-schema-boundary.ts` enforces the direction as a folder-scoped rule instead. |
13 | 14 | // |
14 | 15 | // This gate enforces five things, across four scopes: |
15 | 16 | // - GLOBALLY, across every production source file: the remaining R2 move rule and |
@@ -103,6 +104,7 @@ import { |
103 | 104 | readTrackedPlatformPackageDeclarations, |
104 | 105 | } from './platform-package-repository.ts'; |
105 | 106 | import { policyLead, policyViolation, ZONE_POLICIES } from './zone-policy.ts'; |
| 107 | +import { checkCommandsSchemaBoundary } from './commands-schema-boundary.ts'; |
106 | 108 | import { contractsImplementationAuthorityViolations } from './contracts-implementation-policy.ts'; |
107 | 109 | import { substrateDomainShapeViolations } from './substrate-domain-shape.ts'; |
108 | 110 | import { selectorPipelineOwnershipViolations } from './selector-pipeline-ownership.ts'; |
@@ -436,6 +438,7 @@ export type LayeringRule = (context: LayeringContext) => LayeringViolation[]; |
436 | 438 | */ |
437 | 439 | export const LAYERING_RULE_IDS = [ |
438 | 440 | 'zone-policies', |
| 441 | + 'commands-schema-boundary', |
439 | 442 | 'value-import-cycles', |
440 | 443 | 'runtime-execution-integrity', |
441 | 444 | 'source-execution-compatibility', |
@@ -468,6 +471,7 @@ export type LayeringRuleId = (typeof LAYERING_RULE_IDS)[number]; |
468 | 471 |
|
469 | 472 | export const LAYERING_RULES: Readonly<Record<LayeringRuleId, LayeringRule>> = { |
470 | 473 | 'zone-policies': (context) => checkLayeringRules(context.edges), |
| 474 | + 'commands-schema-boundary': (context) => checkCommandsSchemaBoundary(context.edges), |
471 | 475 | 'value-import-cycles': (context) => checkCycles(context.edges), |
472 | 476 | 'runtime-execution-integrity': (context) => runtimeExecutionIntegrityViolations(context.sources), |
473 | 477 | 'source-execution-compatibility': (context) => |
|
0 commit comments