Conversation
The new GitHub Actions workflow runs ruff check and ruff format --check, which surfaced four unused imports and one unformatted file pre-existing on main. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test_path_containment: on macOS, tempfile dirs live under /var which is a symlink to /private/var, so resolve_under returns a resolved path that doesn't equal the unresolved root. Match the sibling deeply-nested test by calling root.resolve() in the assertion. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous f'file://{profile}' produced a well-formed URL only on
POSIX, where the path starts with '/' and yields 'file:///tmp/...'.
On Windows the same expression produced 'file://D:\\a\\...', which
soffice parses as a host of 'D:' followed by a backslash-laden
path — never resolves, so soffice hangs waiting for a profile that
will never exist.
pathlib's Path.as_uri() emits the platform-correct form:
POSIX: file:///tmp/foo
Windows: file:///D:/a/foo
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
On Windows, unlinking an open file fails with WinError 32 ("The
process cannot access the file because it is being used by another
process"). On POSIX it silently succeeds, so leaks went unnoticed.
TemporaryDirectory cleanup walks the tree and unlinks, so any
unclosed handle within propagates as a PermissionError.
Production fixes:
- LibreOfficeEngine._read_calculated: close the workbook in a
finally block. read_only=True keeps the underlying zip handle
open until close() is called, so the soffice tempdir could not be
cleaned up on Windows. Cascade fix for ~10 downstream tests
(recalc, snapshot, testing.Model, mcp tools, end-to-end).
- safe_load_workbook: close the workbook if _stream_cell_count
raises, so XlsxTooLargeError doesn't leak the handle.
Test fixes:
- test_safe_load_workbook streaming_cell_count_passes_under_cap:
close the wb before exiting the tempdir context.
- test_bulk build_loads_csv_into_sqlite: close the sqlite
connection before exiting the tempdir context.
- test_mcp_cmd._read_one_response: replace select.select() with a
thread + queue. select.select() on Windows only works on sockets,
not on subprocess stdout pipes (WinError 10038).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
No description provided.