Skip to content

Commit e18aa8f

Browse files
committed
chore(gates): point the descriptor-registry gates at the package path
The rules that name the registry by path follow it: R66's `COMMAND_DESCRIPTOR_MODULE`, R16's record-runtime join subject, and the Fallow `AssertTrue` totality-guard key. The two descriptor hubs leave `HUB_ENTRY_FILES` because the package manifest now publishes them — the eager-closure gate discovers them as facades, and one entry gets one rule. `command-registry` joins the ranked spine at rank 1, beside the contracts and selectors it depends on. Two illustrative paths in gate comments and a model test are re-pointed at root files that still exist. No `APPROVED_OVER_CEILING` row: rename detection carries every moved entry's merge-base baseline, so all twelve fall under the no-growth rule rather than a ceiling. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_016DkNZCMWtm1KUbseKANADi
1 parent f0b876f commit e18aa8f

9 files changed

Lines changed: 12 additions & 13 deletions

‎.fallowrc.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
},
247247
{
248248
"comment": "Type-level `AssertTrue<...>` registry-totality guards. Exported only so `noUnusedLocals` keeps them alive; a consumer would defeat the point.",
249-
"file": "{src/core/command-descriptor/registry.ts,src/core/interactors/register-builtins.ts,src/core/platform-descriptor/registry.ts,src/daemon/request-platform-providers.ts}",
249+
"file": "{packages/command-registry/src/registry.ts,src/core/interactors/register-builtins.ts,src/core/platform-descriptor/registry.ts,src/daemon/request-platform-providers.ts}",
250250
"exports": [
251251
"CommandOwnerFileClaimsAreComplete",
252252
"BuiltinPluginsCoverAllPlatforms",

‎scripts/__tests__/eager-closure-budgets.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ export function discoverFacadeEntryFiles(repoRoot: string): string[] {
102102
export const HUB_ENTRY_FILES: readonly string[] = [
103103
'src/cli.ts',
104104
'src/platform-runtime.ts',
105-
'src/core/command-descriptor/registry.ts',
106-
'src/core/command-descriptor/platform-execution-entry.ts',
107105
'src/core/interactors/register-builtins.ts',
108106
'src/daemon/session-teardown.ts',
109107
];

‎scripts/layering/model.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ test('every production zone is deliberately classified as ranked or unranked', (
278278

279279
test('listSourceFiles includes root-level src/*.ts production files', () => {
280280
const files = new Set(listSourceFiles());
281-
for (const rootFile of ['src/cli.ts', 'src/command-catalog.ts', 'src/backend.ts']) {
281+
for (const rootFile of ['src/cli.ts', 'src/runtime.ts', 'src/backend.ts']) {
282282
assert.ok(files.has(rootFile), `expected ${rootFile} in analyzed source files`);
283283
}
284284
assert.ok(![...files].some((file) => file.endsWith('.test.ts')));

‎scripts/layering/model.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export type BackEdgeMap = Record<string, string[]>;
3838
const TARGET_DAG_RANK = new Map([
3939
['ad-replay', 1],
4040
['ad-script', 1],
41+
['command-registry', 1],
4142
['contracts', 1],
4243
['maestro', 1],
4344
['recording', 1],

‎scripts/layering/record-runtime-registry-policy.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('R16 requires the real registry normalization path to assert the record use
66
assert.deepEqual(
77
recordRuntimeRegistryJoinViolations([
88
{
9-
path: 'src/core/command-descriptor/registry.ts',
9+
path: 'packages/command-registry/src/registry.ts',
1010
source: `
1111
import { assertRecordRuntimeExecution as assertRecord } from '@agent-device/contracts/platform';
1212
if (descriptor.name === 'record') assertRecord(platformExecution);
@@ -18,14 +18,14 @@ test('R16 requires the real registry normalization path to assert the record use
1818
assert.deepEqual(
1919
recordRuntimeRegistryJoinViolations([
2020
{
21-
path: 'src/core/command-descriptor/registry.ts',
21+
path: 'packages/command-registry/src/registry.ts',
2222
source: `
2323
// assertRecordRuntimeExecution(platformExecution) is only prose.
2424
const prose = 'record descriptor assertion';
2525
normalize(platformExecution);
2626
`,
2727
},
2828
]),
29-
['src/core/command-descriptor/registry.ts: missing record runtime descriptor join assertion'],
29+
['packages/command-registry/src/registry.ts: missing record runtime descriptor join assertion'],
3030
);
3131
});

‎scripts/layering/record-runtime-registry-policy.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Catches: src/core/command-descriptor/registry.ts's record command descriptor missing the
1+
// Catches: packages/command-registry/src/registry.ts's record command descriptor missing the
22
// runtime-descriptor join assertion — a wiring gap where record's registry entry silently
33
// stops being checked against the request-bound runtime it must join, invisible to a type
44
// check because the assertion's absence is not a type error, just a missing call.
@@ -16,7 +16,7 @@ import { memberName, type ProductionSource, visitAst } from './layering-ast.ts';
1616
export function recordRuntimeRegistryJoinViolations(
1717
sources: readonly ProductionSource[],
1818
): string[] {
19-
const file = sources.find(({ path }) => path === 'src/core/command-descriptor/registry.ts');
19+
const file = sources.find(({ path }) => path === 'packages/command-registry/src/registry.ts');
2020
if (!file) return [missingRecordRuntimeRegistryJoin()];
2121
const parsed = parseSync(file.path, file.source);
2222
const assertionName = importedRecordRuntimeAssertionName(parsed.program);
@@ -35,7 +35,7 @@ export function recordRuntimeRegistryJoinViolations(
3535
}
3636

3737
function missingRecordRuntimeRegistryJoin(): string {
38-
return 'src/core/command-descriptor/registry.ts: missing record runtime descriptor join assertion';
38+
return 'packages/command-registry/src/registry.ts: missing record runtime descriptor join assertion';
3939
}
4040

4141
function importedRecordRuntimeAssertionName(node: unknown): string | undefined {

‎scripts/layering/runtime-execution-policy.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import assert from 'node:assert/strict';
22
import { test } from 'node:test';
33
import { runtimeExecutionIntegrityViolations } from './runtime-execution-policy.ts';
44

5-
const REGISTRY = 'src/core/command-descriptor/registry.ts';
5+
const REGISTRY = 'packages/command-registry/src/registry.ts';
66
const ADMISSION = 'src/daemon/runtime-admission.ts';
77

88
function sources(entries: readonly (readonly [string, string])[]): ReadonlyMap<string, string> {

‎scripts/layering/runtime-execution-policy.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type AstNode = Record<string, unknown>;
1818

1919
export const RUNTIME_EXECUTION_INTEGRITY_RULE = 'R66 runtime-execution-integrity';
2020

21-
const COMMAND_DESCRIPTOR_MODULE = 'src/core/command-descriptor/registry.ts';
21+
const COMMAND_DESCRIPTOR_MODULE = 'packages/command-registry/src/registry.ts';
2222
const RUNTIME_ADMISSION_MODULE = 'src/daemon/runtime-admission.ts';
2323
const RUNTIME_PROOF_TYPES = new Set(['AdmittedRuntimePlan', 'BoundDeviceRuntime']);
2424

‎scripts/layering/tracked-sources.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import { execFileSync } from 'node:child_process';
2121

2222
// `src/**/*.ts` only matches NESTED files, so root-level `src/*.ts` (src/cli.ts,
23-
// src/command-catalog.ts) needs its own pathspec or it silently drops out of every scan.
23+
// src/backend.ts) needs its own pathspec or it silently drops out of every scan.
2424
// Workspace package sources are production files too (#1490 W0).
2525
const TRACKED_SOURCE_PATHSPECS = [
2626
'src/*.ts',

0 commit comments

Comments
 (0)