feat: add smoke-test workflow#9
Conversation
📝 WalkthroughWalkthroughAdds a deterministic ROOT input generator, a Jsonnet-configured digitisation smoke workflow, output validation, and CI wiring to run the smoke task. ChangesSmoke testing
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant smoke.sh
participant make_test_input
participant phlex
participant ROOT outputs
CI->>smoke.sh: Run smoke task
smoke.sh->>make_test_input: Generate smoke_input.root
smoke.sh->>phlex: Execute smoke.jsonnet
phlex->>ROOT outputs: Write digitisation outputs
smoke.sh->>ROOT outputs: Verify non-empty files
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b92b278 to
9e96fb7
Compare
e493aae to
90d68ed
Compare
9e96fb7 to
f86ec5b
Compare
90d68ed to
4fb8dae
Compare
31e9724 to
12a54b9
Compare
The pixi smoke task referenced a script that did not exist. Add the missing pieces: a small deterministic generator writing a simulation-like RNTuple covering all detector IDs (no Geant4 or aegir needed, so CI stays self-contained), a workflow running the full digitise-and-output chain over it, and a script asserting the outputs are produced. Run it in CI after the build.
4fb8dae to
0459a7a
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/smoke.sh`:
- Around line 10-19: Update the smoke workflow around the output-file validation
loop to remove smoke_digi_output.root and smoke_digi_validation.root before
invoking phlex, preventing stale files from passing. Replace the size-only
checks with ROOT-aware validation that confirms the expected digitised RNTuples
in smoke_digi_output.root and validation histograms in
smoke_digi_validation.root, while still requiring non-zero content and failing
with a clear error when validation fails.
In `@tools/make_test_input.cpp`:
- Line 25: Validate the parsed n_events value against the maximum representable
uint32_t before the event-generation loop begins, and reject out-of-range input
with the existing argument-error handling. Keep valid counts unchanged and
ensure the loop cannot receive a value that would narrow or wrap the uint32_t
event counter.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bb09b472-e94a-47e0-8515-38da9bfd8d53
📒 Files selected for processing (5)
.github/workflows/pixi-build.ymlCMakeLists.txtscripts/smoke.shtools/make_test_input.cppworkflows/smoke.jsonnet
Delete previous digitisation outputs before running phlex so stale files cannot pass the checks, and verify with PyROOT that the expected per-detector RNTuples and validation histograms exist and have entries.
The pixi
smoketask referencedscripts/smoke.sh, which did not exist. Add the missing pieces:tools/make_test_input: small deterministic generator writing a simulation-like RNTuple (sim_particles+sim_hits, hits covering all five detector IDs) — no Geant4 or aegir needed, so CI stays self-contained.workflows/smoke.jsonnet: runs the full read → digitise → write chain over the generated file, including the digitised output module.scripts/smoke.sh: generates the input, removes any stale outputs, runs phlex, and validates the results withscripts/validate_smoke.py, which checks via PyROOT that the per-detector RNTuples and validation histograms exist and have entries.smokeafter the build.Stacked on #8 (exercises the whole stack).
Checklist
pre-commit run --all-files)Summary by CodeRabbit
New Features
Tests