Skip to content

refactor: complete architecture cleanup - #109

Merged
zatevakhin merged 8 commits into
refactor/componentsfrom
refactor/phase11-cleanup
Aug 30, 2026
Merged

refactor: complete architecture cleanup#109
zatevakhin merged 8 commits into
refactor/componentsfrom
refactor/phase11-cleanup

Conversation

@zatevakhin

Copy link
Copy Markdown
Collaborator

Phase 11 architecture cleanup

This publishes the independently approved Phase 11 aggregate as one review PR:

  • 2c4daf2: remove App migration forwarding helpers and the duplicate reconciler.
  • 97e9e55: remove temporary test exports/aliases and cross-module wildcard imports.
  • 2e8a28d: remove the crate-wide dead-code blanket and compiler-identified dead surfaces while narrowing visibility.
  • 5761124: add the architecture checker and 20 self-tests, and enforce architecture plus all-feature Rust commands in CI.
  • 8005080: document the module map, event/effect and ACP flow, boundaries, exceptions, and testing in README.
  • e1b308b: reject nested and combined crate dead-code allowance bypasses.
  • 54a6c919: scan every same-line crate inner attribute.

Approved range: 520870a57b0ce3b0983e6af1ed5f632c0b78e27e..54a6c9194ffb17b10a3052485fd226e93503a5f2 (42 files, +1248/-697). Independent Linus review approved the cleanup through 2e8a28d, then approved the final corrected aggregate with no findings.

Validation on exact head

  • Architecture checker: 20/20 self-tests; repository scan passes all 145 Rust files.
  • Python/YAML: checker py_compile passes without residue; all five CI YAML files parse.
  • Rust: formatting, check, Clippy with -D warnings, and build pass for all targets/features.
  • Tests: two debug and two release all-target/all-feature runs each pass 1,159/1,159 with 0 failed and 0 ignored; inventory is 1,159 tests and 0 benchmarks.
  • Focused suites pass: diagnostics 15, application 62, runtime 182, handlers 49, ACP state 87, mesh 50, UI 124, App 39, ACP contracts 13, and features 170.

Compatibility retained includes the supported delegate_models migration, hidden --acp-websocket, twelve pub(crate) App fields, generated-theme allowance, item DTO allowances, and cfg(test) render adapters. Protected paths, Cargo manifests/lockfile, and generated themes are unchanged.

Environmental validation remains intentionally unclaimed for live ACP/backend, external WebSocket, subprocess stdio, terminal, clipboard, interactive UI, and the Phase 0 performance baseline. Knowledge query/ingest is unavailable because of a provider database schema error and is not a source-validation blocker.

This PR is ready for user review. It is intentionally left open and must not be merged yet.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7096be71-16b9-401d-a3fd-554287184924

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@zatevakhin
zatevakhin merged commit eef12f7 into refactor/components Aug 30, 2026
4 checks passed
zatevakhin added a commit that referenced this pull request Sep 1, 2026
* refactor: remove migration forwarding helpers

* refactor: remove temporary test re-exports

* refactor: enforce crate dead-code checks

* ci: enforce architecture boundaries

* docs: document module and event flow

* ci: close dead-code policy bypass

* ci: scan every crate inner attribute

* ci: remove architecture boundary check
zatevakhin added a commit that referenced this pull request Sep 5, 2026
* refactor: introduce application runtime crate

* refactor: split runtime lifecycle modules

* test: colocate runtime module coverage

* refactor: route legacy tools through shared parser

* refactor: centralize tool detail behavior

* fix: keep tool detail parsing production-aligned

* test: retain UTF-8 replay coverage

* refactor: move legacy state helpers to app

* test: cover ACP replay edge cases

* fix: make ACP replay cards idempotent

* fix: dedupe terminal ACP thinking replays

* test: migrate phase 2 slice 4 response coverage

* test(ui): use native ACP fixtures

* refactor: remove legacy server message reducer

* test: restore native session state coverage

* fix: discover nested session parents on load

* refactor: extract phase 3 domain types

* refactor: extract session domain types

* refactor: extract semantic tool details

* test: cover semantic tool detail regeneration

* refactor: complete semantic tool previews

* fix: keep tool detail parsing filesystem-free

* refactor: extract chat domain entries

* refactor: extract model and profile domain types

* refactor: remove model profile protocol bridges

* refactor: remove domain compatibility bridges

* refactor: extract auth domain core

* test: cover oauth auth-method command serialization

* refactor: separate session page wire types

* test: strengthen session page adapter coverage

* test: align session adapters with active ingress

* refactor: separate session mutation results

* fix: preserve rejected undo frontier

* refactor: separate oauth domain state

* fix: separate auth ui feedback

* test: tighten auth ui state coverage

* test: cover auth notice transitions

* test: cover auth ui notice resets

* refactor: introduce internal command seam

* fix: centralize session command mapping

* refactor: complete internal command bus migration

* fix: remove orphan pending command queue

* refactor: remove legacy protocol scaffolding

* fix: narrow legacy protocol cleanup

* refactor: separate mesh domain values

* fix: align remote session contracts

* fix: honor ACP session list contract

* refactor: separate delegation notification values

* refactor: split protocol contracts

* refactor: complete phase 3 acceptance cleanup

* refactor: extract diagnostics state

* refactor: extract auth state

* refactor: extract profiles state

* refactor: extract mesh state

* refactor: extract navigation state

* refactor: extract models state

* refactor: extract sessions state

* refactor: extract connection state

* refactor: extract composer state

* refactor: extract delegates state

* refactor: extract chat state owner

* refactor: extract render state

* refactor: centralize application effects

* fix: address application effect review

* fix: preserve phase 5 effect ordering

* fix: make effect scheduling fair

* fix: remove terminal event drain starvation

* refactor: split the ACP subsystem (#95)

* refactor: establish acp subsystem boundaries

* refactor: isolate acp jsonrpc transport contracts

* refactor: extract acp runtime and extensions

* refactor: route acp commands and transports

* test: close acp lifecycle contracts

* fix: preserve websocket prompt failures on teardown

* fix: satisfy websocket teardown lint

* fix: satisfy replay buffer clippy lint

* refactor: extract feature reducers (#96)

Squash-integrates the independently reviewed Phase 7 feature reducer extraction from refactor/feature-reducers.

* refactor: separate domain and rendering (#97)

Integrate the approved Phase 8 domain/rendering separation into refactor/components. Source validation and hosted CI are green; preserve the reviewed source branch for provenance.

* refactor: split input and UI by feature (#99)

Integrate the approved Phase 9 input and UI feature split into refactor/components. Source validation and hosted CI are green; preserve the reviewed source branch for provenance.

* test: harden persistence isolation (#100)

Integrate the independently approved Phase 10 persistence-safety baseline into refactor/components. The exact source is test-only, local and hosted validation are green, and the retained source branch preserves provenance.

* test: colocate start-page session input tests (#101)

* test: colocate start-page session input tests

* test: preserve session input adapter coverage

* test: colocate session popup input tests (#102)

* test: colocate session popup input tests

* test: preserve session popup toggle routing

* test: strengthen new session input contracts

Squash-integrates the independently approved corrected Phase 10 New Session test-contract range.

* test: colocate delegate input tests

Squash-integrates the independently approved Phase 10 Delegate input test-ownership slice after successful hosted CI.

* test: colocate delegate renderer tests

Moves seven Delegate-only Ratatui renderer contracts to the Delegate owner module while retaining root UI composition and cross-feature contracts.

* test: colocate elicitation and state tests (#106)

* test: colocate elicitation and state tests

* test: preserve state input edge contracts

* test: colocate chat renderer tests (#107)

* test: close ACP contract coverage (#108)

* test: close ACP contract coverage

* test: preserve exact ACP contract assertions

* refactor: complete architecture cleanup (#109)

* refactor: remove migration forwarding helpers

* refactor: remove temporary test re-exports

* refactor: enforce crate dead-code checks

* ci: enforce architecture boundaries

* docs: document module and event flow

* ci: close dead-code policy bypass

* ci: scan every crate inner attribute

* ci: remove architecture boundary check

* fix(tui): batch terminal events to reduce input lag

Replace cancellation-sensitive EventStream polling with a bounded terminal event queue and coalesce compatible input events between redraws.

Preserve scheduler fairness and rendering-dependent behavior by limiting batches by count and duration, deferring incompatible events, and pausing terminal input while the external editor is active.

* fix: address CodeRabbit security and correctness findings

Redact sensitive command data, harden Unicode and timestamp rendering, and clamp popup geometry for small terminals.

Make editor handoff and JSON-RPC requests failure-safe, preserve event ordering, and fix state, arithmetic, diagnostics, and protocol robustness issues.

* chore: flake.lock update

* fix(acp): keep long-running prompts correlated until completion

Exclude session/prompt from the generic WebSocket response timeout so terminal responses are not discarded after 60 seconds. Scope prom')pt failures by session, finalize failed turns, and ignore stale failures that could otherwise leave the UI stuck in streaming state.

* test(ui): add deterministic ratatui snapshot coverage

- add geometry-preserving buffer test helpers
- snapshot start, help, and diagnostics views
- replace crude text searches with cell and region assertions
- use fixed render state and log timings for deterministic tests
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