Repository navigation
refactor(commands): adopt portable config shapes for the complete config group (FEAT-028) - #6973
Conversation
10fe2a8 to
57d09b0
Compare
57d09b0 to
c622222
Compare
…fig group Reconciled onto current origin/main (39f0733). The config Slash Command Group no longer depends on App/TUI: every command parses, branches and renders in the portable group, and the host returns typed facts and operation outcomes. Carries upstream behavior added since the original base: - /connect and /disconnect (now portable commands in the group inventory, 19 registrations); - /pet style and /pet language (new portable pet appearance controls); - mode receipts use the localized display name and the Full Access (Work) label; - legacy sandbox token clearing (LEGACY_SANDBOX_TOKEN_SLOT) instead of Daytona. Contract: capability bits and facet traits for the group; unified ConfigAction with portable payload mirrors; ConfigReply with keyed/literal ConfigMessage (self-recursive, no Box). Safe rendering: capabilities and required templates are validated before any effect; prepared rendering substitutes validated templates and never re-translates after a mutation; a missing capability, invalid replacement contract or unprepared key fails loudly with no action; the interactive reply renderer shares the same policy. /settings, the audit and the subagent report return structured rows the group renders; /workbar surfaces setter errors; /import-claude plans use the host display projection. Guards: the migration frontier advances from [config, core] to [core], and the live-gate expectation moves with it. CI lane fixes: the portable proof imports, the moved test helper path, the settings row formatting (to_string instead of a useless format!), the contributor credit surface, and the preflight large-Err allowance. Verification: clippy (workspace, all-targets, all-features, -D warnings with the project's allowances) clean; config-proof PASS (35 portable tests) + 7 negative controls; migration-manifest tests PASS; boundary guard PASS; 353 config/settings tests pass; broad commands/app/ui/settings 2796 pass with only the pre-existing upstream failure tui::ui::tests::persisted_queued_native_skill_is_denied_after_host_withdrawal (reproduces on clean origin/main); cargo fmt clean.
c622222 to
593d7d7
Compare
Refs codewhale-hq#5316; CI follow-up for PR codewhale-hq#6973. Use the same Work-mode usage string in the portable handler and metadata, restoring help filtering by "mode [work". Restore upstream login guidance pointing plugin-provider sign-in to /connect. Include connect/disconnect in the migrated registry test inventory and align the moved YOLO test with the existing Full Access (Work) receipt; keep all permission/state assertions. Reproduced all five failures from macOS job 115447780813 and Linux job 115447780694 locally before editing: 5 tests run, 0 passed, 5 failed. After the fix: 5 tests run, 5 passed. Related commands/help/settings scope: 1357 tests run, 1357 passed. Portable config proof: 35 tests run, 35 passed; 7 proof negative controls and 63 migration-manifest tests passed. Formatting and git diff --check passed. Hosted confirmation remains pending. PR intentionally remains draft. Signed-off-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com>
|
I can't thank you enough for the quality of care you bring to Codewhale. This is so wonderful and helpful. |
Registration slot10 is status; slot12 is mode. Preserve the nineteen-command migration, declared mode capabilities and whole-config proof. Strengthen two existing fixtures through the actual /jihua and /zidong dispatcher without adding test functions or comment text. The separate proposed cold-build CI/debug settings patch is retained as an artifact: GitHub rejected its push because the current OAuth App lacks workflow scope. This source-only commit leaves the workflow unchanged; no deadline, gate or assertion is disabled. Exact scoped source review and artifact Rustfmt parsing passed. Full own-branch compilation, before/after alias execution, npm/web and actual native CI are pending; no Windows or release acceptance claim. Draft readiness unchanged. Refs codewhale-hq#6973
…tion debt Preserve @aboimpinto's original command-shape work. Remove the obsolete config-host dead-code blanket. Reuse the existing runtime bridge to run import I/O off Tokio workers and the protected no-replace writer so instructions created concurrently remain intact. Strengthen the existing import fixture to execute its first copy on a multithreaded runtime. No new test function or code comment. Scoped frozen canonical ECD+63-path Mac evidence: Summary [1.183s] 129 tests run: 129 passed, 15219 skipped. Summary [0.478s] 35 tests run: 35 passed, 0 skipped. Existing Python harnesses: 34 + 7 + 63 tests; 0 failed. npm: 540 Node + 772 Vitest = 1312 passed; 0 failed; 7 skipped. Web, fmt, diff and actual CI-flags workspace/all-target/all-feature Clippy (9m58s) passed; existing linker warning retained. Only the three repaired source files match those frozen verified bytes. The own-PR tree uses main's older private-directory helper and dependency graph; fresh hosted own-head CI is required. Windows no-clobber/package acceptance has not been run locally. Original a424 native greens and actual fork-advisory ratchet failures remain historical. Refs codewhale-hq#6973
Retain the original command-shape commits and verified three-file import/ratchet repair, plus current main's five removed suppressions and exact 215 dead-code budget. The original portable-config workflow rename remains; no new timeout or debug setting is added. All non-PR paths equal current main. Canonical scoped Mac evidence is recorded in the repair commit; complete new own-head hosted CI/reviews remain required before merge. Refs codewhale-hq#6973
|
Thank you, @aboimpinto, for carrying all19 config-group registrations onto portable command contracts while keeping persistence and host effects in their owning adapters. Your original commits remain in this PR. The d7 head completed allthree native suites (macOS19,084/0, Ubuntu19,081/0, Windows18,350passed/0failed with one recorded browser-launcher leak), plus35portable cases and CI-flags Clippy. The fresh review found gaps in the existing capability checks; b323af876b restores exhaustive identity/facet assertions, including the analogous config-policy check. Local changed-surface checks passed66existing cases and npm1,312/0/7; new exact-head CI is running. Your branch will remain, and I will finish the verified work as this PR. 0.10.2 is still an unshipped candidate; current-head Windows/package acceptance is not yet claimed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 Changes recommended
Exact-authority tests now wildcard away the newly introduced config facets, weakening capability-boundary regression coverage.
5 open findings
Include LOGIN and WORK_SURFACE in capability identity coverage · New Reject config-related facets in diagnostics authority test · New Assert new facets are absent from debug authority · New Reject new config facets in export authority test · New Assert new config facets are absent from structcopy authority · New
What changed in this PR
Refactors all 19 config commands behind portable contracts while retaining TUI-specific effects in host adapters.
Changes:
- Adds config facets, actions, typed reports, and portable handlers.
- Expands the portability proof from config policy to the complete config group.
- Migrates Claude import, settings rendering, registration, and capability wiring.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Runs the complete config portability proof. |
Cargo.lock |
Renames the portability package. |
Cargo.toml |
Updates the workspace proof member. |
crates/command-contract/src/config.rs |
Defines portable config facets and payloads. |
crates/command-contract/src/facets.rs |
Extends mode-policy operations. |
crates/command-contract/src/handler.rs |
Adds config capability slots and contexts. |
crates/command-contract/src/lib.rs |
Exports the config contract module. |
crates/command-contract/src/outcome.rs |
Adds the unified config action vocabulary. |
crates/command-contract/src/tests.rs |
Tests capability identities and contexts. |
crates/command-contract/src/types.rs |
Adds portable mode, screen, and workbar types. |
crates/tui/src/commands/config_group.rs |
Registers portable config handlers. |
crates/tui/src/commands/config_host.rs |
Converts portable replies and actions. |
crates/tui/src/commands/config_main_import_host.rs |
Hosts Claude import I/O and application. |
crates/tui/src/commands/config_main_host.rs |
Hosts concrete config operations. |
crates/tui/src/commands/config_policy_host.rs |
Reuses unified config action conversion. |
crates/tui/src/commands/config_policy_host_tests.rs |
Updates config registry tests. |
crates/tui/src/commands/config_policy_permissions_tests.rs |
Exercises permissions through the contract. |
crates/tui/src/commands/contract/config_main.rs |
Implements concrete config facets. |
crates/tui/src/commands/contract/config_messages.rs |
Resolves portable localization keys. |
crates/tui/src/commands/contract.rs |
Wires config facets into context bundles. |
crates/tui/src/commands/debug_diagnostics_surface_tests.rs |
Adapts diagnostics authority checks. |
crates/tui/src/commands/debug_mutation_host_tests.rs |
Adapts debug authority checks. |
crates/tui/src/commands/groups/config/import_claude.rs |
Moves Claude plan rendering into portable code. |
crates/tui/src/commands/groups/config/mod.rs |
Defines the 19-command portable inventory. |
crates/tui/src/commands/groups/config/policy.rs |
Exposes portable policy modules. |
crates/tui/src/commands/groups/config/status.rs |
Exposes the safety-message helper. |
crates/tui/src/commands/groups/core/workflow.rs |
Routes workflow settings to the host adapter. |
crates/tui/src/commands/groups/mod.rs |
Registers the new config group adapter. |
crates/tui/src/commands/mod.rs |
Integrates portable config dispatch. |
crates/tui/src/commands/session_export_test_support.rs |
Updates export context destructuring. |
crates/tui/src/commands/session_structcopy_host_tests.rs |
Updates structcopy context checks. |
crates/tui/src/import_claude.rs |
Produces contract-owned import plans. |
crates/tui/src/settings.rs |
Produces typed settings reports. |
scripts/check-command-config-proof.py |
Validates the complete portable group. |
scripts/check-portable-config-policy.sh |
Removes the policy-only proof runner. |
scripts/check-portable-config.sh |
Adds the complete-group proof runner. |
scripts/command-migration-topology.json |
Removes config from the migration frontier. |
scripts/dev-test.sh |
Renames the portable-config test target. |
scripts/test_check_command_config_policy_proof.py |
Removes policy-only negative controls. |
scripts/test_check_command_config_proof.py |
Adds complete-group negative controls. |
scripts/test_check_command_migration_manifest.py |
Updates the expected frontier. |
tests/portable-config-policy/src/lib.rs |
Removes the narrow proof root. |
tests/portable-config/Cargo.toml |
Configures the complete-group proof crate. |
tests/portable-config/src/lib.rs |
Mounts the actual config group root. |
web/lib/release-credits.ts |
Adds the unreleased contributor credit. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Refs codewhale-hq#6973 The new config/login/work-surface slots were omitted from five existing authority guards. Include both new identity bits, destructure every facet and reject all unrelated slots; the analogous config-policy guard now checks the same five slots. Production capabilities and existing assertions remain unchanged. No new test functions or code comments. Verified in the frozen combined canonical source, with all six repaired file hashes equal to this commit: Summary 2 tests run: 2 passed, 77 skipped (command-contract); Summary 63 tests run: 63 passed, 15356 skipped (TUI including both export helper callers); Summary 1 test run: 1 passed, 15418 skipped (config-policy). All 66 result ordinals and identities audited. Existing macOS __eh_frame linker warning retained. npm: 540 Node plus 772 Vitest passed; 0 failed; 7 skipped. Web, fmt and diff checks pass. No clean own-head binary or new-head Windows run claimed; fresh hosted CI/review remain required. Prior d7 full three-platform pass is retained as historical evidence, not qualification of this new head. Source review matched the six existing test files to immutable d7 preimages. Original contributor history and branch are preserved.
|
Thank you, @Hmbown, for the kind words, the careful follow-through, and for preserving my commits and branch. I have fast-forwarded to your I also read the completed logs from exact-head CI 38548061013, rather than relying on the predecessor's results:
Claude's automated review was disabled for the fork; the Codex review run reports failure without a code finding. Neither is being counted as a successful review. The five actionable Copilot findings are addressed and verified. I am leaving your current head and ready-for-review state unchanged for your merge decision. This confirms the tested PR source, not a release or final packaged-Windows acceptance. Paulo Aboim Pinto |
Brings in codewhale-hq#6973; the only conflict was web/lib/release-credits.ts, where both PRs add a contributor. Kept both (@aboimpinto, @AdityaVG13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBKbhx19BRbZtvWK8rVKjz
codewhale-hq#6973 moved config_fancy_animations_keeps_ghostty_full_motion out of config.rs into config_main_host.rs, so config.rs conflicted. Took main's config.rs; the next commit adds the four EnvVarGuard::remove lines to the test where it lives now. Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>

Summary
Refs #5316
This is a large, behavior-preserving refactor: remove the
configSlash Command Group's concreteApp/TUI dependencies and replace them with Shapes connections. The PR is large because the existing Slash Command Group is large—that is how it was designed. No product-behavior change is intended.The migration covers all 19 current registrations, including upstream's
/connectand/disconnect. The physical crate move remains separate work.What changed
["core"].Historical contributor status and verification (
599119aa5)The original contributor verification below belongs to
599119aa5; the current draft/head status is recorded in the maintainer update below.Head
599119aa5fixes the five failures reported on593d7d717by both the macOS job and the Linux job:/modemetadata now shares the handler's Work-mode usage, restoring help filtering./loginagain directs plugin-provider sign-in to/connect./connectand/disconnect.These were real reconciliation defects, not unrelated upstream failures. Earlier broad local verification did not establish that those fixes were present in the pushed tree; this follow-up records the committed repair explicitly.
Verification for
599119aa5Local execution was on Linux. A passing macOS/Windows run, full hosted CI approval, merge and release are not yet claimed.
Paulo Aboim Pinto
Current maintainer repair — 2026-10-14
Current head
b323af876bpreserves Paulo's original commits and all19 command registrations. The existing bridge runs import copying off Tokio workers and the protected no-replace writer keeps concurrently created standing instructions intact. Normal TUI import is/import-claude --applyon the multithread composition runtime; unsupported current-thread embedding keeps its explicit copy-failed outcome. Current main's215 dead-code budget and the contributor's portable proof workflow remain.The predecessor d7b5a4c completed full own-head CI: macOS19,084 passed/0failed/33skipped, Ubuntu19,081/0/34 plus a separate35-case portable proof, Windows18,350 passed(one recorded browser-launcher leak)/0failed/27skipped. Named owner recovery passed on allthree. Actual CI-flags Clippy9m23 and all ratchets passed. These raw results were audited and remain historical evidence.
A fresh review then identified five gaps in the existing authority checks. This six-file correction includes both LOGIN/WORK_SURFACE identity bits and explicitly rejects CONFIG/PET/TRUST/LOGIN/WORK_SURFACE from unrelated debug/export/structcopy/config-policy envelopes. All old assertions remain; no production capability change, new test function or code comment. The five finding threads remain open pending exact new-head verification.
Focused local execution used a separate frozen combined canonical source, with allsix corrected files equal to this commit: command-contract2passed/0failed; TUI63passed/0failed/15,356outsidefilter including both export helper callers; the additional config-policy case1passed/0failed/15,418outsidefilter. All66 unique test identities/ordinals were audited. npm1,312passed/0failed/7skipped and web/fmt/diff passed. The existing macOS linker warning remains visible. This is not a clean own-head binary, new-head Windows run, live provider call or final distribution proof.
Fresh exact-head CI38548061013 is running on b323af8. Complete current CI, every review and the merge gate remain required. Prior a424 advisory ratchet failures and d7 reviews are retained; neither is waived or relabeled as current approval. The source branch and original human history will remain. 0.10.2 has not shipped.
Refs #6973