You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds a roodask.py script for running RooUtil macros using dask. This is mostly vibe-coded with Claude Opus 4.6. There is a README (generated by the AI).
Problem:output_dir is a str (set via str(Path(...).resolve()) earlier), not a Path. The / operator only works when the left-hand side is a Path. This will raise a TypeError: unsupported operand type(s) for /: 'str' and 'PosixPath' at runtime whenever --hadd is given a relative path.
Fix:
hadd_target=Path(output_dir) /hadd_target
2. work_dir inconsistency between submitter and workers
File:roodask.py, in client.submit(...) call
work_dir=args.work_dir, # ❌ passes the raw/relative CLI string
Problem:args.work_dir is passed as-is (e.g. "./work") to the workers, but the resolved work_dir (a Path) is what the submitter uses locally. On a shared filesystem this is fine if workers share the CWD, but if workers resolve paths differently or the scheduler runs from a different CWD, per-job filelist files will be written to the wrong location (or fail to be found by the binary). The resolved absolute path should be passed instead.
Fix:
work_dir=str(work_dir), # work_dir is already resolved to an absolute Path
3. --skip-compile / --force-compile mutual exclusion not enforced
File:roodask.py, parse_args()
Problem: Both --skip-compile and --force-compile can be specified simultaneously. Their combination is contradictory, and the code gives no error. Whichever branch is checked first (skip_compile is checked before force_compile) will silently "win" — --skip-compile takes priority and --force-compile is silently ignored, which is surprising and potentially confusing.
Fix: Add a mutual-exclusion check after parse_args():
ifargs.skip_compileandargs.force_compile:
print("ERROR: --skip-compile and --force-compile are mutually exclusive", file=sys.stderr)
sys.exit(1)
4. Stale config_template.txt references removed concept
File:rooutil/roodask/config_template.txt
The copilot instructions file explicitly states: "config_template field was removed — the script generates the wrapper automatically". However, config_template.txt is still committed. It won't break execution, but it's dead/confusing artifact that the AI generated and forgot to clean up.
⚠️ Minor Issues (non-critical)
import math is placed mid-function (after reading the filelist). While valid Python, it's against convention and should be at the top of the file with the other imports.
"Error" stderr check is fragile: Any job that prints "Error" to stderr (e.g. a normal ROOT warning that contains the word) will be marked as failed, including messages like TError: no error. A regex check like re.search(r'\bError\b', ...) might be more precise.
No validation that source file actually exists before attempting compilation — a missing file would result in a cryptic g++ error rather than a clear message.
The most urgent fix is bug #1 — it will always crash when --hadd is given a relative path. Bug #2 is important for correctness in distributed (non-local) scheduler setups.
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
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.
This PR adds a roodask.py script for running RooUtil macros using dask. This is mostly vibe-coded with Claude Opus 4.6. There is a README (generated by the AI).