Skip to content

Layer 1: clean command support boundaries#2871

Merged
Hmbown merged 4 commits into
Hmbown:codex/v0.9.0-stewardshipfrom
aboimpinto:feat/2791-command-parity-harness
Jun 7, 2026
Merged

Layer 1: clean command support boundaries#2871
Hmbown merged 4 commits into
Hmbown:codex/v0.9.0-stewardshipfrom
aboimpinto:feat/2791-command-parity-harness

Conversation

@aboimpinto
Copy link
Copy Markdown
Contributor

Summary

Refs #2791.
Refs #2870.
Reference / proof PR: #2851.

This is Layer 1 of the staged command-boundary refactor. It keeps the current command folder structure intact and focuses on cleanup before the parity-harness and group-boundary layers.

What changed

  • Removed command/public helper APIs that production code no longer calls.
  • Moved config persistence used by both commands and UI code into config_persistence.rs.
  • Moved auto model routing used by commands, UI, runtime routing, and subagents into model_routing.rs.
  • Removed stale command lookup/test-only surfaces that kept dead APIs alive.
  • Hardened related tests on Windows by isolating user-global home/config state and temp Git repo line-ending behavior.
  • Added .gitattributes rules so Rust sources stay LF-normalized on Windows.

What this intentionally does not do

  • No command folder restructuring yet.
  • No registry/parse/help split yet.
  • No temporary command-by-command dual loader.
  • No user_commands restructuring.

Those are tracked as later layers in #2870.

Why

#2851 showed that some behavior under commands is not command-owned. Config persistence and model routing are used by UI/runtime/subagent paths too, so keeping them under commands makes ownership blurry. This layer moves that shared behavior to neutral TUI modules and removes dead command APIs before we add the parity harness and then reshape the command boundary.

Validation

  • cargo test --workspace
  • Full test log scan: warning_count=0
  • Full test log scan: actual_failures=0
  • git diff --check

Paulo Aboim Pinto

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aboimpinto has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

Thanks @aboimpinto for taking the time to contribute.

This repository is currently observing a maintainer-managed contribution gate in dry-run mode, so this pull request is staying open. When enforcement is enabled, pull requests from contributors who are not listed in .github/APPROVED_CONTRIBUTORS will be closed automatically.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant PR access by commenting /lgtm on a pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the codebase by extracting configuration persistence and model routing logic into dedicated modules (config_persistence and model_routing), cleaning up unused functions and dead code across commands and skills, and configuring core.autocrlf to false in git-related tests to ensure cross-platform stability. Additionally, the parent directory search for project context files is now capped at the home directory. The review feedback highlights opportunities to optimize path traversal in project_context.rs by replacing redundant, repeated filesystem canonicalization calls inside loops with direct equality checks on pre-canonicalized paths.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/tui/src/project_context.rs
Comment thread crates/tui/src/project_context.rs
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aboimpinto has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@aboimpinto aboimpinto marked this pull request as ready for review June 7, 2026 01:25
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aboimpinto has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Hmbown Hmbown merged commit 59d12f3 into Hmbown:codex/v0.9.0-stewardship Jun 7, 2026
1 check passed
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.

2 participants