Skip to content

[ai] fix: replace private _state API with public session.process:write(nil)#20

Merged
pablopunk merged 1 commit into
mainfrom
ai/pablopunk__pi.nvim-4df0
Jun 21, 2026
Merged

[ai] fix: replace private _state API with public session.process:write(nil)#20
pablopunk merged 1 commit into
mainfrom
ai/pablopunk__pi.nvim-4df0

Conversation

@pablopunk

Copy link
Copy Markdown
Owner

What

Replace private Neovim internal API (session.process._state.stdin:close()) with the public session.process:write(nil) API.

Found by

Scanner — bug: uses private _state API for stdin access in runner

Fix

  • Replaced _state.stdin:close() with session.process:write(nil) in runner.lua M.finish
  • Retained pcall protection and kill(15) fallback for robustness
  • Updated test mock to handle write(nil) and set stdin_closed flag
  • Removed stale _state mock fields from test setup

Tested

  • make test passes (33 cases, 0 fails)

🤖 [ai] — auto-fix by Hermes Autonomous Orchestrator

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@pablopunk, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 26 minutes and 13 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb7ba7d8-212b-48b4-8af7-523c1bca7dd0

📥 Commits

Reviewing files that changed from the base of the PR and between 4ba6db0 and 2612b30.

📒 Files selected for processing (2)
  • lua/pi/runner.lua
  • tests/test_pi_commands.lua

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 and usage tips.

@pablopunk pablopunk added the ai AI-generated PR from Hermes orchestrator label Jun 21, 2026
@pablopunk

Copy link
Copy Markdown
Owner Author

@codex review this and tell me why would we need this

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 2612b305fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pablopunk pablopunk merged commit 4458f7c into main Jun 21, 2026
5 checks passed
@pablopunk pablopunk deleted the ai/pablopunk__pi.nvim-4df0 branch June 21, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai AI-generated PR from Hermes orchestrator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant