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
c03: delete the four re-export shims and migrate their last consumers
`docs/design/TUI_DECONSTRUCTION.md:176,185-186` forbids landing temporary
re-export shims whose last consumers are deferred: "do not land temporary
re-export shims with their last consumers left for an unspecified future
migration. Keep shims only for genuine external compatibility contracts and
identify that contract."
Four survived the earlier C03 slices — `tui/app/types.rs`, `tui/file_mention.rs`,
`tui/agent_roster.rs`, `tui/approval.rs` — and none named such a contract. There
was nothing to protect: no crate outside `crates/tui` referenced the moved
symbols. So this migrates every remaining internal consumer to the owning crate
and removes all four in one commit, because landing three of four is precisely
the deferred-consumer state the rule exists to prevent.
`crates/tui/src/turn_route_plan.rs` now imports `codewhale_config::AppMode`
directly. `AppModeUi` stays in `tui::app` — it is genuinely UI-specific and not a
shim.
`docs/design/TUI_DECONSTRUCTION.md` is updated in the same commit so the
dependency list describes the tree as it now is rather than as it was.
Also closes the coverage gap this packet's own done-evidence depended on.
`cargo test -p codewhale-config --lib app_mode` previously reported
`0 passed; 0 failed` with 693 filtered out — a filter matching nothing, which
the repo's rules count as a gap and not a pass — while C03 claimed "unchanged
serialization behavior". `AppMode`'s new owner now carries focused tests for the
setting round-trip, parse/label/cycle order, and the fallback for unknown values.
cargo test -p codewhale-config --lib --locked app_mode
test result: ok. 5 passed; 0 failed; 693 filtered out (was 0 passed)
cargo test -p codewhale-tui --lib --locked -- approval agent_roster context_reference app_mode
test result: ok. 298 passed; 0 failed; 12317 filtered out
cargo test -p codewhale-execpolicy -p codewhale-config --locked
test result: ok. 697 passed; 0 failed; 1 ignored
test result: ok. 112 passed; 0 failed
(plus 10, 5, 1, 1 passed across the remaining targets)
cargo check --workspace --all-targets --locked: 0 errors, 0 unused warnings
The fallback test deserves a note, since its first draft asserted the opposite:
`from_setting` returns `Agent` for an empty or unrecognized value, which is the
long-standing shipped behavior and is unchanged here. Mode is not the permission
surface — as `AppMode::parse` documents, the bypass posture the legacy YOLO
spellings imply travels on the permission surface, not on a mode.
Refs: Linear C03 / SHA-6179, GitHub #5316.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X57KRgwqYkmmtVQScczqiL
0 commit comments