Skip to content

ci: add peak RSS memory check to check-geometry-configs#1120

Open
wdconinc wants to merge 4 commits into
eic:mainfrom
wdconinc:ci/check-memory-footprint
Open

ci: add peak RSS memory check to check-geometry-configs#1120
wdconinc wants to merge 4 commits into
eic:mainfrom
wdconinc:ci/check-memory-footprint

Conversation

@wdconinc
Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.

Adds a peak RSS (resident set size) check to the check-geometry-configs CI job. Each geometry config is loaded with checkGeometry wrapped by /usr/bin/time -v; the peak RSS is printed for every config on every run, and the job fails if any config exceeds a hardcoded threshold (MEMORY_LIMIT_KB, initially 4 GB).

This prevents silent growth of the geometry memory footprint, analogous to eic/containers#289 which caps compressed container image size. The limit is a hardcoded constant in the workflow file, so increasing it requires a conscious, reviewable PR.

The initial limit of 4 GB is deliberately generous — the first CI run on this PR will reveal actual peak RSS values for all configs, and the limit will be tightened to baseline + ~20% headroom in a follow-up commit.

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Optimization (issue #__)
  • Updated constants (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.

Strategy defined by human; implementation by GitHub Copilot CLI, reviewed by human.

Wrap each checkGeometry invocation with /usr/bin/time -v to measure
peak resident set size (RSS). The peak RSS is printed for every config
on every run, providing a visible trend in CI logs. The job fails if any
config exceeds MEMORY_LIMIT_KB (currently 4 GB), preventing silent
growth of the geometry memory footprint.

This is analogous to eic/containers#289 which caps compressed container
image size: the limit is a hardcoded constant in the workflow file, so
changing it requires a conscious, reviewable PR.

The initial limit of 4 GB is deliberately generous. The first CI run
will report actual peak RSS values for all configs; the limit will be
tightened to baseline + ~20% headroom in a follow-up commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 30, 2026 01:18
@wdconinc wdconinc enabled auto-merge (squash) May 30, 2026 01:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a CI safeguard to prevent geometry memory footprint regressions by measuring per-detector peak RSS during the check-geometry-configs workflow and failing the job if a config exceeds a configured threshold.

Changes:

  • Wraps each checkGeometry invocation with /usr/bin/time -v to capture peak RSS per geometry config.
  • Introduces a hardcoded MEMORY_LIMIT_KB threshold and fails the job when exceeded.
  • Aggregates per-config results into a single job exit code after iterating all configs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/check-geometry-configs.yml
Comment thread .github/workflows/check-geometry-configs.yml Outdated
@github-actions github-actions Bot added the topic: infrastructure Regarding build system, CI, CD label May 30, 2026
@wdconinc
Copy link
Copy Markdown
Contributor Author

Fails as intended and error is prominent.
Screenshot_20260530-085037

@wdconinc
Copy link
Copy Markdown
Contributor Author

Sorry, this was filed from a fork, I just noticed.

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

Labels

topic: infrastructure Regarding build system, CI, CD

Development

Successfully merging this pull request may close these issues.

2 participants