refactor(arch): final architectural review closure — executor refactor + zero hexagonal exceptions#116
Conversation
…r + zero hexagonal exceptions
Completes the Final Architectural Review Closure Plan with no deferrals.
Phase 4 executor refactor (F-04):
- Extract buildRoutePlan + routePlanState into executor_route_plan.go
- Extract openInitialAttempt loop into executor_open_loop.go
- Extract assembleExecutorStream into executor_assemble_stream.go
- executor.go now delegates prepareRequest -> buildRoutePlan -> openInitialAttempt
-> assembleExecutorStream (~118 lines, down from ~380)
- Introduce grouped ExecutorConfig structs + NewExecutor in executor_config.go;
add TestExecutor() test wiring helper and testkit executor_builder.go
- Migrate ~76 test files from &Executor{} literals to TestExecutor() + field assignments
- Tighten executor.go critical-file budget 380 -> 150
- Add executor_characterization_matrix_test.go mapping resolution-plan scenarios
Hexagonal closure (F-08, F-02, F-09):
- featurebundle MergedFeatureSurface uses SDK hook slices instead of hooks.Config;
internal/core/hooks import removed from featurebundle
- BuildFeatureHooks + hooks.New moved to internal/infra/runtimebundle (composition root)
- Baseline: featurebundle, runtimebundle, internal/core/extensions reclassified to
aligned; backlogs done; featurebundle added to retired_exceptions
- archtest now requires zero exception entries (closure target)
Governance + docs (F-12):
- Expand no-init() guard to include internal/standardplugins (registration code moved
there from pluginreg)
- Update docs/architecture.md, architecture-guardrails.md, ADR 0001 + 0005,
feature-bridge-retirement-checklist.md, README.md, steering/structure.md, and
EchoesVault pages for the new package map
Verification: make test-unit PASS, make quality-checks PASS, make arch-report
(11 aligned / 0 extract / 0 exception), lipstd check-config + routes smoke PASS.
No client-visible behavior change; no DI containers or init registration introduced.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (112)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Completes the Final Architectural Review Closure Plan with no deferrals — lands the remaining Phase 4 executor refactor, retires the last hexagonal exceptions to reach zero
exceptionentries, and refreshes the authoritative architecture map.buildRoutePlan/openInitialAttempt/assembleExecutorStreaminto dedicated files;executor.godrops from ~380 to ~118 lines (delegate-onlyExecute). Introduces groupedExecutorConfig+NewExecutor, aTestExecutor()test-wiring helper, andtestkitbuilder; migrates ~76 test files off&Executor{}literals. Tightens theexecutor.gocritical-file budget 380 → 150 and adds a characterization matrix test.featurebundle.MergedFeatureSurfacenow uses SDK hook slices instead ofhooks.Config(dropsinternal/core/hooksimport);BuildFeatureHooks+hooks.Newmove tointernal/infra/runtimebundle(composition root). Baseline reclassifiesfeaturebundle,runtimebundle, andinternal/core/extensionstoalignedwithdonebacklogs;featurebundleadded toretired_exceptions. archtest now requires zeroexceptionentries.init()guard to coverinternal/standardplugins(whereInstallStandardBundleOnnow lives); updatesdocs/architecture.md,architecture-guardrails.md, ADR 0001 + 0005, the feature-bridge retirement checklist,README.md,steering/structure.md, and EchoesVault pages for the new package map.Verification
make test-unit— PASS (all packages)make quality-checks— PASS (gofmt, modules, build, vet, goroutine allowlist, regex hot-path, archtest guardrails)make arch-report— 11 aligned / 0 extract / 0 exception;executor.goat 118 lineslipstd check-config+routesagainstconfig/examples/dogfood-local-stub.yaml— PASS (no API keys required)TestStandardBundlePackagesHaveNoInitFunctionsguard passes forstandardpluginsTest plan
make quality-checksgreengo test -parallel=8 -tags=precommit,integration ./...greeninit()registration introducedexceptionand no staleplannedbacklogs