Skip to content

refactor(arch): final architectural review closure — executor refactor + zero hexagonal exceptions#116

Merged
matdev83 merged 1 commit into
mainfrom
refactor/arch-final-closure
Jul 8, 2026
Merged

refactor(arch): final architectural review closure — executor refactor + zero hexagonal exceptions#116
matdev83 merged 1 commit into
mainfrom
refactor/arch-final-closure

Conversation

@matdev83

@matdev83 matdev83 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

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 exception entries, and refreshes the authoritative architecture map.

  • Phase 4 executor refactor (F-04): extracts buildRoutePlan / openInitialAttempt / assembleExecutorStream into dedicated files; executor.go drops from ~380 to ~118 lines (delegate-only Execute). Introduces grouped ExecutorConfig + NewExecutor, a TestExecutor() test-wiring helper, and testkit builder; migrates ~76 test files off &Executor{} literals. Tightens the executor.go critical-file budget 380 → 150 and adds a characterization matrix test.
  • Hexagonal closure (F-08, F-02, F-09): featurebundle.MergedFeatureSurface now uses SDK hook slices instead of hooks.Config (drops internal/core/hooks import); BuildFeatureHooks + hooks.New move to internal/infra/runtimebundle (composition root). Baseline reclassifies featurebundle, runtimebundle, and internal/core/extensions to aligned with done backlogs; featurebundle added to retired_exceptions. archtest now requires zero exception entries.
  • Governance + docs (F-12): expands the no-init() guard to cover internal/standardplugins (where InstallStandardBundleOn now lives); updates docs/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.go at 118 lines
  • lipstd check-config + routes against config/examples/dogfood-local-stub.yaml — PASS (no API keys required)
  • Expanded TestStandardBundlePackagesHaveNoInitFunctions guard passes for standardplugins

Test plan

  • CI make quality-checks green
  • CI go test -parallel=8 -tags=precommit,integration ./... green
  • CI golangci-lint v2 + govulncheck clean
  • Reviewer confirms no client-visible behavior change (internal package relocation only; regression tests green)
  • Reviewer confirms no DI container / init() registration introduced
  • Reviewer confirms hexagonal baseline has zero exception and no stale planned backlogs

…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>
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@matdev83, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ceb73944-c127-4176-ab2e-37d724cdc359

📥 Commits

Reviewing files that changed from the base of the PR and between 4c61bbb and 930be47.

📒 Files selected for processing (112)
  • .kiro/steering/structure.md
  • EchoesVault/daily/2026-07-08.md
  • EchoesVault/pages/architecture-overview.md
  • EchoesVault/pages/codex-app-server-backend.md
  • EchoesVault/pages/package-map.md
  • EchoesVault/pages/plugin-system.md
  • EchoesVault/pages/product-overview.md
  • README.md
  • cmd/lipstd/hooks_compose_test.go
  • docs/adr/0001-registry-driven-composition.md
  • docs/adr/0005-architecture-guardrails-and-complexity-budgets.md
  • docs/architecture-guardrails.md
  • docs/architecture.md
  • docs/feature-bridge-retirement-checklist.md
  • internal/archtest/critical_files.go
  • internal/archtest/guardrails_test.go
  • internal/archtest/hexagonal_migration_baseline_test.go
  • internal/core/auxreq/client_test.go
  • internal/core/runtime/attempt_stream_recovery_test.go
  • internal/core/runtime/attempt_stream_recv_test.go
  • internal/core/runtime/attempt_stream_scope_test.go
  • internal/core/runtime/attempt_stream_traffic_bench_test.go
  • internal/core/runtime/completion_executor_test.go
  • internal/core/runtime/executor.go
  • internal/core/runtime/executor_affinity_test.go
  • internal/core/runtime/executor_assemble_stream.go
  • internal/core/runtime/executor_assemble_stream_test.go
  • internal/core/runtime/executor_backend_credentials_test.go
  • internal/core/runtime/executor_backend_panic_test.go
  • internal/core/runtime/executor_backend_seam_test.go
  • internal/core/runtime/executor_bench_test.go
  • internal/core/runtime/executor_characterization_matrix_test.go
  • internal/core/runtime/executor_characterization_phase4_test.go
  • internal/core/runtime/executor_characterization_test.go
  • internal/core/runtime/executor_circuitbreaker_test.go
  • internal/core/runtime/executor_clock_test.go
  • internal/core/runtime/executor_concurrency_test.go
  • internal/core/runtime/executor_config.go
  • internal/core/runtime/executor_downgrade_route_trace_test.go
  • internal/core/runtime/executor_health_test.go
  • internal/core/runtime/executor_hooks_limits_test.go
  • internal/core/runtime/executor_interleaved_session_test.go
  • internal/core/runtime/executor_interleaved_test.go
  • internal/core/runtime/executor_invocation_metadata_test.go
  • internal/core/runtime/executor_local_stub_integration_test.go
  • internal/core/runtime/executor_modelcatalog_context_test.go
  • internal/core/runtime/executor_modelcatalog_e2e_test.go
  • internal/core/runtime/executor_modelcatalog_negotiate_test.go
  • internal/core/runtime/executor_noninterference_test.go
  • internal/core/runtime/executor_open_attempt_diagnostics_test.go
  • internal/core/runtime/executor_open_attempt_interleaved_test.go
  • internal/core/runtime/executor_open_attempt_internal_test.go
  • internal/core/runtime/executor_open_loop.go
  • internal/core/runtime/executor_open_loop_test.go
  • internal/core/runtime/executor_panic_span_test.go
  • internal/core/runtime/executor_parallel_failover_test.go
  • internal/core/runtime/executor_prepare_context_test.go
  • internal/core/runtime/executor_prepare_request_meta_test.go
  • internal/core/runtime/executor_prepare_stages_test.go
  • internal/core/runtime/executor_principal_test.go
  • internal/core/runtime/executor_route_plan.go
  • internal/core/runtime/executor_route_plan_test.go
  • internal/core/runtime/executor_route_preference_test.go
  • internal/core/runtime/executor_scope_test.go
  • internal/core/runtime/executor_secure_session_test.go
  • internal/core/runtime/executor_session_start_events_test.go
  • internal/core/runtime/executor_session_workspace_test.go
  • internal/core/runtime/executor_snapshot_test.go
  • internal/core/runtime/executor_test.go
  • internal/core/runtime/executor_test_wiring.go
  • internal/core/runtime/executor_token_accounting_preflight_test.go
  • internal/core/runtime/executor_token_accounting_stream_test.go
  • internal/core/runtime/executor_transport_span_test.go
  • internal/core/runtime/executor_transport_test.go
  • internal/core/runtime/failclosed/nil_secure_session_execute_test.go
  • internal/core/runtime/interleaved_diagnostics_test.go
  • internal/core/runtime/interleaved_hybrid_parallel_test.go
  • internal/core/runtime/interleaved_internal_test.go
  • internal/core/runtime/interleaved_stream_test.go
  • internal/core/runtime/lifecycle_cancel_test.go
  • internal/core/runtime/lifecycle_contract_test.go
  • internal/core/runtime/parallel_race_cancel_test.go
  • internal/core/runtime/parallel_race_test.go
  • internal/core/runtime/replay_lineage_test.go
  • internal/core/runtime/scope_phase6_compatibility_test.go
  • internal/core/runtime/scope_phase6_secret_safety_test.go
  • internal/core/runtime/scope_resolver_test.go
  • internal/core/runtime/secure_session_recorder_mandatory_test.go
  • internal/core/runtime/ttft_timeout_test.go
  • internal/core/runtime/v1_review_matrix_test.go
  • internal/featurebundle/merge_surface.go
  • internal/infra/runtimebundle/bootstrap_plan.go
  • internal/infra/runtimebundle/build_executor.go
  • internal/infra/runtimebundle/build_feature_hooks.go
  • internal/infra/runtimebundle/build_feature_hooks_test.go
  • internal/infra/runtimebundle/control_plane_runtime_noninterference_test.go
  • internal/infra/runtimebundle/feature_yaml_hooks_test.go
  • internal/pluginreg/custom_registry_hooks_test.go
  • internal/pluginreg/proof_reference_features_test.go
  • internal/plugins/backends/openaicodex/plugin_test.go
  • internal/plugins/frontends/openailegacy/codex_body_routing_test.go
  • internal/plugins/frontends/openairesponses/cancel_e2e_test.go
  • internal/plugins/frontends/openairesponses/codex_body_routing_test.go
  • internal/standardplugins/feature_yaml_test.go
  • internal/stdhttp/cancel_test.go
  • internal/stdhttp/control_plane_mount_test.go
  • internal/stdhttp/mount_test.go
  • internal/testkit/conformance/harness.go
  • internal/testkit/executor_builder.go
  • internal/testkit/executor_secure_stub.go
  • internal/testkit/executor_stub.go
  • testdata/architecture/hexagonal_migration_baseline.json

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@matdev83 matdev83 merged commit 29d8b1a into main Jul 8, 2026
2 checks passed
@matdev83 matdev83 deleted the refactor/arch-final-closure branch July 8, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant