Skip to content

Hodor review: tell the agent where wums is installed, keep its clone off /tmp - #222

Open
davidwalter2 wants to merge 2 commits into
WMass:mainfrom
davidwalter2:261104_hodorReviewDeps
Open

davidwalter2 wants to merge 2 commits into
WMass:mainfrom
davidwalter2:261104_hodorReviewDeps

Conversation

@davidwalter2

Copy link
Copy Markdown
Collaborator

The hodor review of #209 hung three times (Oct 27, Oct 28, Nov 5: 4h17, 2h56 and 1h17, each until cancelled), every time in the same tool call:

find / -name "sparse_hist*" ... 2>/dev/null | head -20

Why it searched. #209 reads SparseHist internals (hess._flat_indices, SparseHist._underflow_offset), so the reviewer wanted wums/sparse_hist.py. wums is pip-installed, outside the review workspace, and nothing told the agent where. On the runner host / includes AFS, CVMFS and EOS. With fewer matches than head reads, find never gets SIGPIPE, and hodor's bash tool has no default timeout. WRemnants hit the same with empty submodules and fixed it in WMass/WRemnants#721.

1. The agent is told where wums is. The review step asks the runner's python3 where wums is installed and passes that path with --additional-instructions. The note also says to keep searches to the workspace and that path, to locate other packages with python3 -c 'import NAME; print(NAME.__file__)', and never to search from /.

  • On the runners this is the CI venv's wums 0.2.0, the release CI tests against. Its sparse_hist.py is identical to wums main.
  • The path is the same on all five runners (the shared venv). This matters because hodor includes the instructions in its review cache key, so a re-run on another runner still reuses the review.
  • If wums is not importable, the note says so and the review runs anyway.

2. TMPDIR=$RUNNER_TEMP. hodor clones into a mkdtemp dir and removes it only on a normal exit. 13 checkouts from reviews that did not exit normally had piled up in the host's /tmp since Sep 14, and during the #209 review the agent's grep in /tmp read one of them. RUNNER_TEMP is emptied after every job.

Testing. Dry-ran the new shell as cmsmwbot on lxplus8s10 with runner 4's PATH: it resolves /home/c/cmsmwbot/CombineTF2CI/env/lib64/python3.12/site-packages/wums and builds the note. Also ran the fallback with a python3 that cannot import wums.

Notes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NoPngS6bHp2yDKhxbv4aW3

…off /tmp

The review of WMass#209 hung three times in `find / -name "sparse_hist*"`:
the PR uses SparseHist internals, wums is pip-installed outside the
review workspace, and on the runner host / includes AFS, CVMFS and EOS.
Pass the installed wums path (from the runner's python3) and a
confine-searches note with --additional-instructions, as WRemnants has
done since #721, and set TMPDIR to RUNNER_TEMP so reviews that do not
exit normally no longer leave checkouts in the shared host's /tmp.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01NoPngS6bHp2yDKhxbv4aW3

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues Found

No issues found.

Summary

Total issues: 0 critical, 0 important, 0 minor.

Overall Verdict

Status: Patch is correct

Explanation: The change correctly threads a dynamically detected wums path into hodor's --additional-instructions flag with sound shell quoting and a truthful graceful fallback when wums is not importable, and I verified the flag exists in the pinned WMass/hodor commit 8bb33632. The TMPDIR export is scoped to this step and achieves the stated goal of keeping hodor's mkdtemp workspace off the shared host's /tmp. No correctness, quoting, or contract issues found.

Review details
  • Model: cern/Kimi-K3-FLATIRON

Review metrics: 4 turns · 5 tool calls · 6m 45s

  • Tokens: 30.6K input · 20.0K cached (65%) · 5.6K output

@cmsmwbot cmsmwbot Bot added the fit label Nov 5, 2026
@cmsmwbot
cmsmwbot Bot requested review from bendavid and kdlong November 5, 2026 13:34

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues Found

Minor (P3)

  • [P3] Reject rate 0 in the shape-card normalization check, not just rate > 0 (rabbit/datacard_converter.py:261-262)
    • The new parity check between the datacard rate and the template integral only runs when rate > 0, so a rate of 0 passes silently: rabbit then writes the template histogram as the process yield even though the datacard declares zero events for it. Under the check's own stated contract (the rate line must agree with the template, with only -1 meaning 'take it from the template'), a card with rate 0 and a nonzero template is a divergence the check was added to catch, and it is exactly the silently-wrong-model failure this validation guards against. Extend the guard to cover zero (e.g. >= 0, keeping only -1 exempt) so such cards raise like the positive-mismatch case.

Summary

Total issues: 0 critical, 0 important, 1 minor.

Overall Verdict

Status: Patch has blocking issues

Explanation: The core changes are sound: the jit/fwdrev resolution against sparse external Hessians is consistent with the MC-stat drop logic, the forward-mode switch from the CSR matmul to sparse_dense_matmul is numerically equivalent and correctly threaded, the rateParam fnmatch/per-process-kappa rewrite fixes the previous only-first-process and phantom-process bookings, and the counting-card rate fix is correct. One gap remains in the new shape-card rate-parity check: its rate > 0 guard lets rate == 0 slip through unvalidated, so a card declaring zero yield converts to a full-template-yield model without error despite the check's contract that only -1 means 'take it from the template'.

Review details
  • Model: cern/Kimi-K3-FLATIRON

Review metrics: 18 turns · 31 tool calls · 17m 18s

  • Tokens: 695.2K input · 643.5K cached (93%) · 28.0K output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant