Skip to content

AGENTS: add a AGENTS file in ompi/tests - #14359

Merged
hppritcha merged 1 commit into
open-mpi:mainfrom
hppritcha:add_ompi_tests_agent
Aug 27, 2026
Merged

AGENTS: add a AGENTS file in ompi/tests#14359
hppritcha merged 1 commit into
open-mpi:mainfrom
hppritcha:add_ompi_tests_agent

Conversation

@hppritcha

Copy link
Copy Markdown
Member

I've been noticing that my agents end up spending a good deal of tokens and money (which I just ran out of) trying to re-figure out how the various parts and pieces work in ompi/tests.

Here's what my agent said about this file it wrote:

Yes, I think a scoped AGENTS.md is a good idea here, and I've created one, following the same pattern as the existing ompi/mpiext/AGENTS.md.

It covers exactly the friction points from the earlier task:

  1. A table mapping every ompi/test/ subdirectory to its scope and — critically — how it's actually run (make check vs. make check-abi vs. make check-mpirun vs. "built but not run"), so an agent doesn't have to read a dozen Makefile.ams to figure out spc/monitoring are noinst_PROGRAMS, or that mpirun/ needs an install first.
  2. Cross-cutting conventions every simple directory follows (the Makefile.mca-dso-check include, the libmpi+libopen_mpi+libopen-pal LDADD pattern, the "editing Makefile.am only needs make" rule, and the single-process-by-design scope of most directories).
  3. A dedicated mpi-abi/ deep-dive — this was the single biggest time sink last time: it explains the case-table → .cbody.in/.prologue.in → generated-C pipeline, the required EXTRA_DIST wiring (the mistake I actually made and had to fix), the optional table keys (requires_feature, skip_exit_codes, etc.), and gives copy-pasteable commands (verified to work, just re-ran them) for iterating on a probe before touching the Makefile, plus the full install-then-check-abi sequence.
  4. A decision guide at the end so an agent can quickly pick the right home for a new test instead of defaulting to the wrong directory.

I verified every factual claim in the document against the actual Makefile.ams and against live runs (test_abi_units.py, the probe-rendering snippet, and cross-checked the spc/monitoring "not run by make check" claim against their noinst_PROGRAMS declarations) rather than guessing.:q

@hppritcha

Copy link
Copy Markdown
Member Author

@jsquyres ping

@hppritcha
hppritcha requested review from devreal and removed request for jsquyres August 26, 2026 15:59
@hppritcha

Copy link
Copy Markdown
Member Author

@devreal ping - this could have saved me around $100 in tokens for claude-opus if it had been present.

devreal
devreal previously approved these changes Aug 26, 2026

@devreal devreal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just a minor nit.

Comment thread ompi/test/AGENTS.md
I've been noticing that my agents end up spending a good deal of tokens and money (which I just ran out of)
trying to re-figure out how the various parts and pieces work in ompi/tests.

Here's what my agent said about this file it wrote:

Yes, I think a scoped `AGENTS.md` is a good idea here, and I've created one, following the same pattern as the existing `ompi/mpiext/AGENTS.md`.

It covers exactly the friction points from the earlier task:

1. **A table mapping every `ompi/test/` subdirectory** to its scope and — critically — how it's actually run (`make check` vs. `make check-abi` vs. `make check-mpirun` vs. "built but not run"), so an agent doesn't have to read a dozen `Makefile.am`s to figure out `spc`/`monitoring` are `noinst_PROGRAMS`, or that `mpirun/` needs an install first.
2. **Cross-cutting conventions** every simple directory follows (the `Makefile.mca-dso-check` include, the `libmpi`+`libopen_mpi`+`libopen-pal` LDADD pattern, the "editing `Makefile.am` only needs `make`" rule, and the single-process-by-design scope of most directories).
3. **A dedicated `mpi-abi/` deep-dive** — this was the single biggest time sink last time: it explains the case-table → `.cbody.in`/`.prologue.in` → generated-C pipeline, the required `EXTRA_DIST` wiring (the mistake I actually made and had to fix), the optional table keys (`requires_feature`, `skip_exit_codes`, etc.), and gives copy-pasteable commands (verified to work, just re-ran them) for iterating on a probe before touching the Makefile, plus the full install-then-`check-abi` sequence.
4. **A decision guide** at the end so an agent can quickly pick the right home for a new test instead of defaulting to the wrong directory.

I verified every factual claim in the document against the actual `Makefile.am`s and against live runs (`test_abi_units.py`, the probe-rendering snippet, and cross-checked the `spc`/`monitoring` "not run by make check" claim against their `noinst_PROGRAMS` declarations) rather than guessing.:q

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
@hppritcha

Copy link
Copy Markdown
Member Author

squashed the extra line, please review when you have a chance @devreal

@hppritcha
hppritcha requested a review from devreal August 26, 2026 20:03
@hppritcha
hppritcha merged commit 9bbe927 into open-mpi:main Aug 27, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants