You are performing an adversarial code review of a single commit that just landed on a…
- User
You are performing an adversarial code review of a single commit that just landed on a production branch. Your job is to try to break it — find bugs, edge cases, subtle regressions. Be opinionated. Don't hedge.
Target
- Working directory:
/Users/user_c042661f/Documents/reigh-workspace/reigh-worker - Commit to review:
550320a3(titledchore: Sprint 3 — ltx2/ hot-zone resync + IC-LoRA test coverage) - Get the diff with:
git show 550320a3
Context
This commit is Sprint 3 of a 4-sprint Wan2GP fork migration:
- Bumps the
Wan2GPsubmodule from35f48f1to181bb71a(branchheads/reigh-sprint-3onbanodoco/Wan2GP) - Claims
clear_conditioningpreserved byte-identical against saved oracle fixture - Adds 3 new test files + 1 binary fixture (
tests/fixtures/clear_conditioning_oracle.pt) - Modifies
source/task_handlers/tasks/task_registry.pyto add basename-based IC-LoRA dedup - Unignores the new test files + fixture in
.gitignore
A separate regression audit already confirmed zero pre-existing Wan2GP files were content-modified (
wgp.pybyte-identical, all 97 pre-existingmodels/ltx2/*.pySHA-identical). So you can focus on the reigh-worker side of the diff, not the submodule internals.Your adversarial checks
-
IC-LoRA dedup logic in
source/task_handlers/tasks/task_registry.py— read the diff around the dedup code. Look for: case-sensitivity bugs in basename comparison, off-by-one in list mutation, silent acceptance of duplicate basenames with different path casing, behavior under empty input, behavior when strength is zero or negative. -
New tests —
tests/test_task_registry_ic_lora_dedup.py+tests/test_travel_guidance_ic_lora_override.py— are the assertions actually testing the stated behavior? Any assertion that would pass even with broken code? Any mock that's too permissive? -
tests/test_clear_conditioning_byte_identity.py— the test claims byte-identity via sha256 against an oracle fixture. Verify the oracle fixture is generated by deterministic input — if it's captured from live inference output, the test will rot as soon as torch/CUDA versions shift. -
unignore scope — read the diff. Does the unignore of Sprint 3 artifacts accidentally admit other files that should stay ignored? Any pattern too broad?
- Working directory:
- Assistant
Reviewing commit
550320a3for production-risk regressions. I’m pulling the diff and the touched test files first, then I’ll trace whether the new assertions actually fail when the implementation is wrong. - Assistant
The diff is narrow enough to audit directly. I’m pulling line-numbered source for the new helper, the related travel-guidance code, and the fixture-capture script so I can separate real coverage from tests that only look reassuring.
- Assistant
I have one concrete risk already in the dedup path and one in the test strategy. I’m tightening the line references now and checking whether the helper’s basename semantics match the downstream filename resolution rules.
- Assistant
The fixture test is cleaner than the commit message suggests: it’s not replaying live inference, it replays fixed CPU tensors. I’m checking
clear_conditioningitself now to see whether the saved oracle only exercises a trivial slice and misses the edge cases where this function can still regress. - Assistant