6161// server (R81). The global spine
6262// ranks all five layers at daemon-server's rank, so R5/R6/R80 are blind inside the zone.
6363// - Over WORKSPACE PACKAGE EXPORTS: no package but test-kit publishes test support (fixtures,
64- // fakes, mocks, harnesses, `__tests__/`, `./testing/*`); a shrink-only burn-down list holds
65- // today's offenders , and production code may not import them or test-kit (R83).
64+ // fakes, mocks, harnesses, `__tests__/`, `./testing/*`); the offender set is a merge-base
65+ // ratchet , and production code may not import those exports or test-kit (R83).
6666// - Over CONTRACTS PRODUCTION SOURCE: contracts owns vocabulary only — host, process, and timer
6767// mechanics belong in capture-kit or an adapter (R18).
6868// R6, R9, and the R10 R7 counts are ratchets with no written-down reference: each is the same
@@ -138,14 +138,17 @@ import { checkDaemonPlatformBoundary } from './daemon-platform-boundary.ts';
138138import { checkDaemonPlatformRuntimeInventory } from './daemon-platform-runtime-inventory.ts' ;
139139import { checkDaemonClientEntry } from './daemon-client-entry.ts' ;
140140import { checkDaemonProcessReach } from './daemon-process-reach.ts' ;
141- import { checkPackageExportSurface } from './package-export-surface.ts' ;
142- import { TEST_ONLY_EXPORT_BURN_DOWN } from './package-export-surface-burn-down.ts' ;
141+ import {
142+ checkPackageExportSurface ,
143+ packageExportSurfaceSummary ,
144+ } from './package-export-surface.ts' ;
143145import { checkDaemonLayers , DAEMON_ROOT } from './daemon-layers.ts' ;
144146import { checkSessionAuthorityOverlay , handlerOwnedOverlay } from './session-authority-overlay.ts' ;
145147import {
146148 DAEMON_SOURCE_ROOT ,
147149 listTrackedPlatformZoneFiles ,
148150 listTrackedProductionSources ,
151+ listTrackedPackageFiles ,
149152 listTrackedSrcUtilsFiles ,
150153 listTrackedTypeScriptFiles ,
151154} from './tracked-sources.ts' ;
@@ -441,8 +444,9 @@ function report(
441444 `concrete platform imports in every executable and type-only form; ` +
442445 `no production daemon file reaches the root platform-runtime family or a hub that ` +
443446 `does (R76); the daemon process reaches no caller-side replay source module over ` +
444- `static or dynamic edges (R82); package exports publish no new test support, with ` +
445- `${ TEST_ONLY_EXPORT_BURN_DOWN . length } burn-down entries left (R83); and the handler-owned SessionState/SessionStore ` +
447+ `static or dynamic edges (R82); ` +
448+ `${ packageExportSurfaceSummary ( ratchets . testOnlyExports , reference . testOnlyExports ) } ; and ` +
449+ `the handler-owned SessionState/SessionStore ` +
446450 `authority overlay holds at or under the merge-base (R75, ` +
447451 `${ handlerOwnedShapeFiles } shape / ${ handlerOwnedAuthorityFiles } authority files); and ` +
448452 `every production daemon file lives under a layer folder with no upward static edges ` +
@@ -603,7 +607,8 @@ export const LAYERING_RULES: Readonly<Record<LayeringRuleId, LayeringRule>> = {
603607 context . sourceFiles . filter ( ( file ) => file . startsWith ( DAEMON_SOURCE_ROOT ) ) ,
604608 context . edges ,
605609 ) ,
606- 'package-export-surface' : ( ) => checkPackageExportSurface ( readTrackedPackageManifests ( repoRoot ) ) ,
610+ 'package-export-surface' : ( context ) =>
611+ checkPackageExportSurface ( context . ratchets . testOnlyExports , context . reference . testOnlyExports ) ,
607612} ;
608613
609614export function main ( ) : number {
@@ -616,7 +621,10 @@ export function main(): number {
616621 const parse = memoizedImportParser ( ) ;
617622 const edges = resolveImportEdges ( sources , workspaceSpecifierTargets ( repoRoot ) , parse ) ;
618623 // Measured once and threaded: the rules and the success line must report the same numbers.
619- const ratchets = measureRatchets ( sources , edges ) ;
624+ const ratchets = measureRatchets ( sources , edges , {
625+ manifests : readTrackedPackageManifests ( repoRoot ) ,
626+ packageFiles : listTrackedPackageFiles ( repoRoot ) ,
627+ } ) ;
620628 const reference = mergeBaseRatchets ( repoRoot , parse ) ;
621629 const context : LayeringContext = {
622630 sourceFiles,
0 commit comments