Skip to content

fix(harness): propagate Windows coding-tool config write failures - #258

Draft
shubhamsinnh wants to merge 1 commit into
RunanywhereAI:mainfrom
shubhamsinnh:fix/windows-config-write-errors
Draft

shubhamsinnh wants to merge 1 commit into
RunanywhereAI:mainfrom
shubhamsinnh:fix/windows-config-write-errors

Conversation

@shubhamsinnh

@shubhamsinnh shubhamsinnh commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

On Windows, writing the temporary config could fail but still return success, allowing a child process to start with an incomplete file.

The write result is now checked. On failure, the handle is closed, cleanup is attempted, and an error is returned so the calling code stops before launching the child. The path is recorded only after a successful write.

Build and startup were checked. A controlled mid-write failure was not reproduced; that error path was verified by inspection only.

CI and formatting pass. The local full suite had 565 passes and two Windows symlink-privilege failures. Strict Clippy reports four pre-existing lints in untouched files.


Summary by cubic

Fixes the Windows branch of TemporaryConfig::write so a failed config write now aborts the launch instead of silently launching a child with a truncated coding-tool config.

  • Checks write_all's result on Windows and returns the same error the Unix branch uses on failure.
  • Drops the handle, removes the partial candidate, and leaves self.path unset so Drop has nothing to clean up.
  • Unix behavior is unchanged; all existing call sites already abort on that error.

Written for commit a407f47. Summary will update on new commits.

View guided diff

The Windows branch of TemporaryConfig::write discarded write_all's
result and returned success, so a child could launch with a truncated
configuration.

Check the write, drop the handle, remove the partial candidate, and
return the same structured error the Unix branch uses. The path is only
recorded after a successful write, and every existing call site already
aborts the launch on that error.

Build and existing tests pass. A mid-write failure could not be injected
without a controlled full volume or quota on this machine, so that
specific runtime path is covered by inspection rather than claimed as
executed.
@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

No deployments
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