You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(registry): finish descriptor-family collocation and reduce the root below 1000 lines #4054
registry.ts is 2192 lines and changed nine times in the audited window. It remains one large edit surface despite ADR0027 allowing statement-neutral extraction.
Owner and scope
packages/command-registry/src/registry.ts, named descriptor-family modules and source-coupled tests. ADR0027 eager-closure rule is unchanged.
Required behavior
Extract cohesive command-family descriptor declarations inside command-registry. Retain the one synchronous typed composer, literal unions, exhaustive derived views and eager-loading semantics. Keep raw descriptor data and its named family tests together. Do not add async construction, broad barrels, a generator or growth waivers. Split into independently reviewable sequential PRs if the gross diff exceeds repo limits. This is PR2 after D1a: finish remaining family extraction and make root<1000 an actual completion requirement. If D1a is unmerged, use an explicitly dependent gh-stack layer; do not merge prerequisites without authorization.
API or evidence example
descriptors/.ts supplies literal family data; registry.ts synchronously assembles the canonical ordered tuple and existing derived views.
Observable completion
registry.ts is below 1000 lines after remaining family extraction.
Registry tests, typecheck, eager-closure and package-size checks, pnpm format; broad refactor requires pnpm check serialized. Stage new modules before layering. Independent review at named commit.
Base audit SHA: 144bd59890277fd4717995588ad817597c9d6552. Re-read the issue and all Decision: comments before work. Read applicable AGENTS.md routes. Keep one owner boundary per PR. Independent review and serialized exact-head validation are coordinated by the umbrella orchestrator.
Decision: accept the registry-entrypoint finding at184ab81e67. At be22676ace3f6a11d23af23a45c588a474e514be, restore selectFindStepUses/selectSnapshotStepUses re-exports and restore their existing tests to the public entrypoint. Remove the three family tuple exports from registry. Move tuple-membership source navigation into the existing development-only ownerFilesForCommand API, using private in-package imports and no new command-name list or public export. CLI explanation consumes that existing API. Source navigation is evaluated only when requested, rather than adding module-scope metadata work.
Typecheck, full format and scoped lint pass after merging duplicate selector-test imports. Runtime tests and own-base closure/facade/production owner-file stripping evidence remain parent-owned and pending; independent review at184ab81e67 is not claimed as an approval of later heads. Root stays under1000 and the two gh-stack layers retain their explicit dependency. No publication or merge yet.
Current state: Upper-layer draft PR #4076 targets #4075's branch at own base 28d1d6e5388e7819b2330a5a6663847a594079d1; head is be22676ace3f6a11d23af23a45c588a474e514be. The required export-contract finding is corrected: both selectors remain exported, tuple exports are removed, and an AST comparison reports no added/removed registry value or type exports. Attribution uses the existing development-only owner-file API. Root size is 762 lines. Parent evidence: 33 files/107 focused tests, build, 501-bundle stripping, clean-install package validation passed; explicit own-base closure analysis covers all 427 entries with no growth findings. Full own-base gate is queued; current-head independent recheck and CI size/coverage/integration remain. No merge-readiness claim.
Decision: preserve selector API at its live declaration owner: The full gate at be22676ace confirmed the production-export issue anticipated by Sonnet: the two compatibility re-exports have no production consumer. Removing them would violate the issue's unchanged-export contract. Keep the two selectors and the snapshot/diff/find descriptors that use them in registry.ts. Other device declarations remain static literal groups in the same private family module. No factory, wrapper, export waiver, new module or command-name ownership list is added.
Corrected head b7d64e4ca8964728dd2e77588ac386999101d958: root 868 lines; all 84 normalized descriptors match own base 28d1d6e538 in order and content; module-scope weight remains 74. Value/type export sets match. The same 33 focused files/107 tests, typecheck, lint and production-export audit pass. Explicit own-base closure comparison covers 427 entries with no growth findings. Build and owner-file stripping over 501 bundles pass.
Current-head package validation failed after tarball lint, clean install and all 15 entry imports: devices --json hit typed daemon_transport_timeout, timeoutMs 90000. Its own temporary state was cleaned by the smoke test's finally; the package directory was retained by the checker for inspection. This is not attributed to the registry or to host contention. Unchanged-base package/unit/related comparisons are next; the corrected affected stage will run serialized. The old full gate and new standalone package check remain failed. No full-pass or merge-readiness claim.
Current state: Independent Terra recheck at b7d64e4ca8964728dd2e77588ac386999101d958 found no required findings. It checked selector/declaration collocation, synchronous literal composition and group-based owner-file attribution, and found no concrete regression in the delta from be22676ace. It ran no checks; parent execution evidence remains separate. The package-smoke timeout remains unresolved and unproven as to cause.
The current exact-head affected plan fails open to the full set (66 checks), including package validation. That selection is retained. Earlier wording that described this stage as independent of the package check was incorrect. The stage is running as selected; no pass is claimed, and no selection is reduced. The subsequent unchanged-base comparisons use fresh dependencies/builds and preserve the reviewed heads.
Current state: Exact-head affected validation at b7d64e4ca8964728dd2e77588ac386999101d958 selected the full 66-check set and passed format, lint, typecheck, layering, DI seams, Fallow, native duplicate checks, MCP metadata, build, package, Node integration and macOS coverage. It then failed related tests: 4,955 passed / two failed across 656 files. Failures: Apple-output guard record exceeds its 20-second fake-harness budget; simulator recording times out at five seconds. Full unit and later stages did not run. Receipt .tmp/validation/run-Qv6hTQ/receipt.json, exactCommit true.
Package validation passed in that exact run. The earlier standalone devices transport timeout at the same head remains unexplained; its base comparison also passed. The provider failures match earlier base observations, but do not yet have a controlled same-command attribution for this scope. A locked comparison of the same two files at audit base, registry head and recording-fix head is running next. Terra's final-head review found no required findings. No gate pass or merge-readiness claim.
Current state: Both registry stack layers are merged externally at the heads validated in this review round: #4075 at 7fe445bc687ec3a6c5c50c0e80602f61f01ab64a, and #4076 at 2b0c79b50cfecef206ea6f465fe8827116b5bc29. Full local validation passed tooling, Fallow and unit at both heads. Receipts: lower .tmp/validation/run-4I5ydK/receipt.json; upper .tmp/validation/run-2x6jaj/receipt.json; both exactCommit true. Upper validation used its own lower-layer base. The attempted ready transition found the PRs already closed; no merge was performed by the orchestrator.
The guidance budget remains 40,000 bytes; both heads use 39,987 bytes. Five guidance tests and ten R66 tests pass. Range-diff is retained locally and shows the expected ownership-row conflict resolutions. Historical failed provider/time-budget checks remain historical failures; these full-command passes do not establish their cause or imply skipped CI lanes passed.
Activity
thymikee commentedon Oct 29, 2026
Decision: accept the registry-entrypoint finding at184ab81e67. At
be22676ace3f6a11d23af23a45c588a474e514be, restore selectFindStepUses/selectSnapshotStepUses re-exports and restore their existing tests to the public entrypoint. Remove the three family tuple exports from registry. Move tuple-membership source navigation into the existing development-only ownerFilesForCommand API, using private in-package imports and no new command-name list or public export. CLI explanation consumes that existing API. Source navigation is evaluated only when requested, rather than adding module-scope metadata work.Typecheck, full format and scoped lint pass after merging duplicate selector-test imports. Runtime tests and own-base closure/facade/production owner-file stripping evidence remain parent-owned and pending; independent review at184ab81e67 is not claimed as an approval of later heads. Root stays under1000 and the two gh-stack layers retain their explicit dependency. No publication or merge yet.
thymikee commentedon Oct 29, 2026
Current state: Upper-layer draft PR #4076 targets #4075's branch at own base
28d1d6e5388e7819b2330a5a6663847a594079d1; head isbe22676ace3f6a11d23af23a45c588a474e514be. The required export-contract finding is corrected: both selectors remain exported, tuple exports are removed, and an AST comparison reports no added/removed registry value or type exports. Attribution uses the existing development-only owner-file API. Root size is 762 lines. Parent evidence: 33 files/107 focused tests, build, 501-bundle stripping, clean-install package validation passed; explicit own-base closure analysis covers all 427 entries with no growth findings. Full own-base gate is queued; current-head independent recheck and CI size/coverage/integration remain. No merge-readiness claim.thymikee commentedon Oct 29, 2026
Decision: preserve selector API at its live declaration owner: The full gate at
be22676aceconfirmed the production-export issue anticipated by Sonnet: the two compatibility re-exports have no production consumer. Removing them would violate the issue's unchanged-export contract. Keep the two selectors and the snapshot/diff/find descriptors that use them inregistry.ts. Other device declarations remain static literal groups in the same private family module. No factory, wrapper, export waiver, new module or command-name ownership list is added.Corrected head
b7d64e4ca8964728dd2e77588ac386999101d958: root 868 lines; all 84 normalized descriptors match own base28d1d6e538in order and content; module-scope weight remains 74. Value/type export sets match. The same 33 focused files/107 tests, typecheck, lint and production-export audit pass. Explicit own-base closure comparison covers 427 entries with no growth findings. Build and owner-file stripping over 501 bundles pass.Current-head package validation failed after tarball lint, clean install and all 15 entry imports:
devices --jsonhit typeddaemon_transport_timeout, timeoutMs 90000. Its own temporary state was cleaned by the smoke test's finally; the package directory was retained by the checker for inspection. This is not attributed to the registry or to host contention. Unchanged-base package/unit/related comparisons are next; the corrected affected stage will run serialized. The old full gate and new standalone package check remain failed. No full-pass or merge-readiness claim.thymikee commentedon Oct 29, 2026
Current state: Independent Terra recheck at
b7d64e4ca8964728dd2e77588ac386999101d958found no required findings. It checked selector/declaration collocation, synchronous literal composition and group-based owner-file attribution, and found no concrete regression in the delta frombe22676ace. It ran no checks; parent execution evidence remains separate. The package-smoke timeout remains unresolved and unproven as to cause.The current exact-head affected plan fails open to the full set (66 checks), including package validation. That selection is retained. Earlier wording that described this stage as independent of the package check was incorrect. The stage is running as selected; no pass is claimed, and no selection is reduced. The subsequent unchanged-base comparisons use fresh dependencies/builds and preserve the reviewed heads.
thymikee commentedon Oct 29, 2026
Current state: Exact-head affected validation at
b7d64e4ca8964728dd2e77588ac386999101d958selected the full 66-check set and passed format, lint, typecheck, layering, DI seams, Fallow, native duplicate checks, MCP metadata, build, package, Node integration and macOS coverage. It then failed related tests: 4,955 passed / two failed across 656 files. Failures: Apple-output guardrecordexceeds its 20-second fake-harness budget; simulator recording times out at five seconds. Full unit and later stages did not run. Receipt.tmp/validation/run-Qv6hTQ/receipt.json, exactCommit true.Package validation passed in that exact run. The earlier standalone
devicestransport timeout at the same head remains unexplained; its base comparison also passed. The provider failures match earlier base observations, but do not yet have a controlled same-command attribution for this scope. A locked comparison of the same two files at audit base, registry head and recording-fix head is running next. Terra's final-head review found no required findings. No gate pass or merge-readiness claim.thymikee commentedon Oct 29, 2026
Current state: Both registry stack layers are merged externally at the heads validated in this review round: #4075 at
7fe445bc687ec3a6c5c50c0e80602f61f01ab64a, and #4076 at2b0c79b50cfecef206ea6f465fe8827116b5bc29. Full local validation passed tooling, Fallow and unit at both heads. Receipts: lower.tmp/validation/run-4I5ydK/receipt.json; upper.tmp/validation/run-2x6jaj/receipt.json; both exactCommit true. Upper validation used its own lower-layer base. The attempted ready transition found the PRs already closed; no merge was performed by the orchestrator.The guidance budget remains 40,000 bytes; both heads use 39,987 bytes. Five guidance tests and ten R66 tests pass. Range-diff is retained locally and shows the expected ownership-row conflict resolutions. Historical failed provider/time-budget checks remain historical failures; these full-command passes do not establish their cause or imply skipped CI lanes passed.