Repository navigation
fix: IO tools report failures as errors (#218) - #225
Merged
Merged
Conversation
read_brep, import_file and export_scene returned isError false on bad input, and two try? store.write calls swallowed a failed manifest write. Refs #218. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by nemotron-3-ultra-550b-a55b:free · Input: 199K · Output: 7.3K · Cached: 99.4K |
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.
What & why
IOTools returned
isError: falseon failure paths, and twotry? store.write(...)calls swallowed a failed manifest write.Changed to
isError: true:read_brep: BREP file not found, body id already exists, manifest write failure.import_file: File not found, format not determinable, manifest write failure.export_scene: No scene loaded, Body ids not found, "No bodies to export." (the call was asked to produce a file and produced none, so I treated it as a failure; flag if you would rather keep it informational).Left deliberately:
import_file"Format auto-detection failed." (.autoafterImportFormat.resolve), which looks unreachable, so I could not write a test that reaches it.Refs #218
Checklist
New or changed behavior is covered by a unit test in the same PR (
IOToolsErrorPathTests, 5 tests). Each assertsisErrorand the error text; mutating paths assert manifest.json bytes unchanged.Proven to fail: tests written first and run against the unfixed source.
Write failure is injected by marking manifest.json immutable (
.immutableattribute): readable, but the atomic replace inManifestStore.writefails.Full
swift test: 277 tests in 45 suites pass.Notes for the reviewer
🤖 Generated with Claude Code