Skip to content

Fix process input validation and empty tool-result replay - #162

Draft
Maximooch wants to merge 3 commits into
mainfrom
tests/log-derived-regressions
Draft

Maximooch wants to merge 3 commits into
mainfrom
tests/log-derived-regressions

Conversation

@Maximooch

Copy link
Copy Markdown
Owner

Malformed process requests currently reach field indexing or numeric operations and raise internal exceptions. Separately, a completed tool call with an empty string result is discarded from Codex replay, removing evidence of the completed action. This PR fixes those two log-driven defects.

Changes

  • Validate process identifiers, commands, numeric bounds/types, stdin text, and stop modes before dispatch; return the existing structured error shape and launch no child for invalid inputs.
  • Preserve empty completed tool results while continuing to reject missing content and orphaned replay items. Cover the historical 72-call/30-result shape with synthetic data rather than private transcripts.
  • Load replay fixtures explicitly as UTF-8, replace Unix-only polling fixtures with native Python children, and run the targeted suite on Windows/Linux with Python 3.11/3.12.

Three commits separate input validation, replay preservation, and test portability/CI. No broader runtime redesign or historical-session migration is included.

Validation

  • Original reproductions: 8 process-input cases and the empty-result replay case failed before fixes.
  • Final focused run: 182 passed on native Windows, including expanded malformed-input cases, real process I/O/cleanup, polling, replay, context preservation, and existing OAuth adapter tests. No live model calls.
  • Ruff checks on changed modern Python files and git diff --check pass.
  • Broader exploratory run: 205 passed, 2 failed in existing test_process_permission_contract.py::test_new_policy_applies_to_each_operation cases (process_start/process_write_stdin). Both failures also reproduce with the original HEAD ProcessTools.execute method restored in memory; the fixture mocks the process service. They are disclosed, not weakened or skipped by this PR.
  • Remote CI pending when opened; dedicated regression matrix added in this PR.

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
penguin Ready Ready Preview Oct 28, 2026 10:42pm UTC

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch was successfully deployed

1 active deployment
Preview — a809e147 Deployed Oct 28, 2026 by vercel[bot]
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