fix: macOS multiprocessing failures + unused import in CI - #152
Merged
Conversation
Two pre-existing CI failures on master, discovered while verifying the
swkotor.exe autonomous recovery loop end-to-end:
- tests/test_rewrite_queue.py's two concurrency tests create
multiprocessing.Process with the default start method, which is "spawn"
on macOS (vs "fork" on Linux). Spawn re-imports the target function in a
fresh interpreter rather than reusing the parent's loaded image -- this
fails on macOS CI with ModuleNotFoundError ("tests" package not reliably
importable by the fresh interpreter) and, for a locally-nested function,
AttributeError (can't pickle a <locals> function at all). Reproduced
locally on Linux via an explicit spawn context to confirm the exact
failure class, then fixed by forcing multiprocessing.get_context("fork")
explicitly (available on both Linux and macOS, the only two CI
platforms) and moving the previously-nested _writer to module level as
defense in depth.
- source_parity_synthesize.py: removed an unused `.state.now` import
(ruff F401), unrelated pre-existing dead import blocking the lint step.
601 unit tests pass; ruff clean.
4 tasks
bodencrouch
pushed a commit
that referenced
this pull request
Jul 30, 2026
bodencrouch
added a commit
that referenced
this pull request
Jul 30, 2026
* fix: inc_abs_global never wires target-side relocation evidence
render_target_coff_for_candidate() can reconstruct the objdiff target
side with a matching symbol relocation for absolute-address references
(absolute_address_relocations(), already used by
bink_buffer_set_direct_draw_forwarder), but inc_abs_global() set
evidence={"absoluteAddress": ...} instead of the
absoluteAddressRelocations shape the consumer actually reads. The
target side was always rendered as a raw byte blob with the address
baked in literally, so any correct candidate referencing the global
through a compiler-visible symbol relocation could never byte-match --
confirmed against the real MSVC8/wine toolchain on FUN_004a23b0 in
swkotor-parity-inv, where an instruction-for-instruction identical
inline-asm rewrite still reported DIFF_ARG_MISMATCH. With the fix,
the same candidate reaches objdiff differences: 0.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ros3797gzvmswnJudQ1Znk
* fix: remove unused .state.now import (pre-existing ruff F401)
Pre-existing on master; blocks CI's ruff lint step. Unrelated to the
relocation-evidence fix itself; fixing since it's a one-line, zero-risk
removal blocking merge readiness.
* fix: macOS multiprocessing failures + unused import in CI (#152)
Two pre-existing CI failures on master, discovered while verifying the
swkotor.exe autonomous recovery loop end-to-end:
- tests/test_rewrite_queue.py's two concurrency tests create
multiprocessing.Process with the default start method, which is "spawn"
on macOS (vs "fork" on Linux). Spawn re-imports the target function in a
fresh interpreter rather than reusing the parent's loaded image -- this
fails on macOS CI with ModuleNotFoundError ("tests" package not reliably
importable by the fresh interpreter) and, for a locally-nested function,
AttributeError (can't pickle a <locals> function at all). Reproduced
locally on Linux via an explicit spawn context to confirm the exact
failure class, then fixed by forcing multiprocessing.get_context("fork")
explicitly (available on both Linux and macOS, the only two CI
platforms) and moving the previously-nested _writer to module level as
defense in depth.
- source_parity_synthesize.py: removed an unused `.state.now` import
(ruff F401), unrelated pre-existing dead import blocking the lint step.
601 unit tests pass; ruff clean.
Co-authored-by: Copilot <th3w1zard1@users.noreply.github.com>
---------
Co-authored-by: Copilot <th3w1zard1@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Boden Crouch <boden.crouch@gmail.com>
bodencrouch
added a commit
that referenced
this pull request
Jul 30, 2026
…150) * docs: add [all] extra and document ilspycmd as external prerequisite ilspycmd is ILSpy's .NET global tool (dotnet tool install -g ilspycmd), not a PyPI package -- it cannot be expressed as a pip dependency, and adding it to optional-dependencies would break `pip install agentdecompile[all]` for everyone (confirmed: pip/uv cannot resolve it under any name). Added an [all] extra bundling the real pip-installable optional features (currently `semantic`) and documented ilspycmd installation separately in the README as an external prerequisite. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ros3797gzvmswnJudQ1Znk * fix: macOS multiprocessing failures + unused import in CI (#152) Two pre-existing CI failures on master, discovered while verifying the swkotor.exe autonomous recovery loop end-to-end: - tests/test_rewrite_queue.py's two concurrency tests create multiprocessing.Process with the default start method, which is "spawn" on macOS (vs "fork" on Linux). Spawn re-imports the target function in a fresh interpreter rather than reusing the parent's loaded image -- this fails on macOS CI with ModuleNotFoundError ("tests" package not reliably importable by the fresh interpreter) and, for a locally-nested function, AttributeError (can't pickle a <locals> function at all). Reproduced locally on Linux via an explicit spawn context to confirm the exact failure class, then fixed by forcing multiprocessing.get_context("fork") explicitly (available on both Linux and macOS, the only two CI platforms) and moving the previously-nested _writer to module level as defense in depth. - source_parity_synthesize.py: removed an unused `.state.now` import (ruff F401), unrelated pre-existing dead import blocking the lint step. 601 unit tests pass; ruff clean. Co-authored-by: Copilot <th3w1zard1@users.noreply.github.com> --------- Co-authored-by: Copilot <th3w1zard1@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <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.
Summary
Two pre-existing CI failures on master, found while verifying the swkotor.exe autonomous recovery loop end-to-end.
tests/test_rewrite_queue.py's two concurrency tests createmultiprocessing.Processwithout specifying a start method, defaulting to "spawn" on macOS (vs "fork" on Linux). Spawn re-imports the target in a fresh interpreter instead of reusing the parent's loaded image — fails on macOS CI withModuleNotFoundError(test package not reliably importable there) and, for the one locally-nested function,AttributeError(can't pickle a<locals>function at all).spawncontext before fixing, to confirm root cause rather than guessing.multiprocessing.get_context("fork")explicitly (available on both Linux and macOS — the only two CI platforms) and moving the previously-nested_writerto module level as defense in depth.source_parity_synthesize.py: removed an unused.state.nowimport (ruffF401) — unrelated pre-existing dead import blocking the lint CI step.Test plan
spawnmultiprocessing contextruff checkclean🤖 Generated with Claude Code
https://claude.ai/code/session_01Ros3797gzvmswnJudQ1Znk