Skip to content

Simplify __main__ Preload Wrapper#122

Merged
SSobol77 merged 2 commits into
mainfrom
chore/cleanup-main-preload-wrapper
Jul 7, 2026
Merged

Simplify __main__ Preload Wrapper#122
SSobol77 merged 2 commits into
mainfrom
chore/cleanup-main-preload-wrapper

Conversation

@SSobol77

@SSobol77 SSobol77 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

This PR removes the mirrored dead fallback/probe logic from src/ecli/main.py::_preload_cli_document.

Changes:

  • delegates directly to editor.preload_cli_document(candidate)
  • removes unreachable fallback stages
  • removes blind method-name probe loops
  • removes touch-before-open last resort
  • preserves existing-file preload behavior
  • preserves nonexistent-file clean-buffer behavior
  • preserves no-disk-touch-before-save semantics

Validation:

  • make clean-logs
  • uv run ruff check src tests
  • uv run ruff format --check src tests
  • uv run python scripts/check_runtime_imports.py
  • uv run pytest -q tests/cli
  • uv run pytest -q tests/core/test_file_open_safety.py
  • uv run pytest -q tests/core
  • uv run pytest -q tests/ui
  • uv run pytest -q tests/utils tests/core tests/extensions tests/packaging tests/docs

Manual smoke:

  • real PTY run with /tmp/ecli-main-preload-wrapper-new-file.py
  • file did not exist before save
  • file was created only after Ctrl+S
  • logs contained no Traceback, TypeError, logging error, CRITICAL, or ERROR

Non-goals:

  • no core preload/open_or_create changes
  • no runtime UX changes
  • no packaging changes
  • no docs changes
  • no F7/F10/F11/TextMate changes

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 15 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: 8ba9e4d9-00b8-460f-91bd-41544d96ebbb

📥 Commits

Reviewing files that changed from the base of the PR and between 009283f and 0f2b24f.

📒 Files selected for processing (2)
  • src/ecli/__main__.py
  • tests/cli/test_main_preload_wrapper.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/cleanup-main-preload-wrapper

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.

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@SSobol77 SSobol77 merged commit ab3fcff into main Jul 7, 2026
6 checks passed
@SSobol77 SSobol77 deleted the chore/cleanup-main-preload-wrapper branch July 7, 2026 23:16
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