Skip to content

feat: add smoke-test workflow#9

Merged
olantwin merged 3 commits into
mainfrom
feat-smoke-test
Jul 22, 2026
Merged

feat: add smoke-test workflow#9
olantwin merged 3 commits into
mainfrom
feat-smoke-test

Conversation

@olantwin

@olantwin olantwin commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

The pixi smoke task referenced scripts/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 with scripts/validate_smoke.py, which checks via PyROOT that the per-detector RNTuples and validation histograms exist and have entries.
  • CI: run smoke after the build.

Stacked on #8 (exercises the whole stack).

Checklist

  • Commit message follows conventional commits
  • Pre-commit checks pass (pre-commit run --all-files)
  • CI checks pass

Summary by CodeRabbit

  • New Features

    • Added an automated smoke-test pipeline for the digitisation workflow.
    • Added a utility to generate deterministic sample input data for validation.
    • Smoke tests now verify that digitised output and validation files are created successfully.
  • Tests

    • CI now runs smoke tests after the existing build and test steps.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a deterministic ROOT input generator, a Jsonnet-configured digitisation smoke workflow, output validation, and CI wiring to run the smoke task.

Changes

Smoke testing

Layer / File(s) Summary
Build smoke input generator
tools/make_test_input.cpp, CMakeLists.txt
Adds the make_test_input executable, which writes deterministic simulated particles and hits to an events RNTuple.
Smoke pipeline and validation
workflows/smoke.jsonnet, scripts/smoke.sh
Configures the digitisation workflow and validates that its two ROOT output files are created and non-empty.
CI smoke task wiring
.github/workflows/pixi-build.yml
Adds smoke to the reusable workflow task list.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the main change: adding a smoke-test workflow.
Description check ✅ Passed The description matches the template and includes all required checklist items, with clear details on the added smoke-test components.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-smoke-test

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@olantwin
olantwin force-pushed the feat-digitised-output-module branch from b92b278 to 9e96fb7 Compare July 20, 2026 14:33
@olantwin
olantwin force-pushed the feat-digitised-output-module branch from 9e96fb7 to f86ec5b Compare July 20, 2026 14:52
@olantwin
olantwin force-pushed the feat-digitised-output-module branch from 31e9724 to 12a54b9 Compare July 21, 2026 16:49
Base automatically changed from feat-digitised-output-module to main July 21, 2026 16:58
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.
@olantwin

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between b642436 and 0459a7a.

📒 Files selected for processing (5)
  • .github/workflows/pixi-build.yml
  • CMakeLists.txt
  • scripts/smoke.sh
  • tools/make_test_input.cpp
  • workflows/smoke.jsonnet

Comment thread scripts/smoke.sh
Comment thread tools/make_test_input.cpp
olantwin added 2 commits July 22, 2026 12:06
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.
@olantwin
olantwin merged commit 1023799 into main Jul 22, 2026
4 checks passed
@olantwin
olantwin deleted the feat-smoke-test branch July 22, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant