Repository navigation
fix(harness): propagate Windows coding-tool config write failures - #258
Draft
shubhamsinnh wants to merge 1 commit into
Draft
shubhamsinnh wants to merge 1 commit into
shubhamsinnh wants to merge 1 commit into
Conversation
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.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::writeso a failed config write now aborts the launch instead of silently launching a child with a truncated coding-tool config.write_all's result on Windows and returns the same error the Unix branch uses on failure.self.pathunset soDrophas nothing to clean up.Written for commit a407f47. Summary will update on new commits.