Skip to content

ci(quality): run the generated-obligations contract in Ratchet Contracts - #4465

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-t1-quality-modules-in-ci
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-t1-quality-modules-in-ci

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Description

tests/quality/test_generated_obligations.py was in no CI job's file list, so none of its 19 tests ran in CI. This is how the generated_obligations.json drift went unseen (see #4452).

  • .github/workflows/ci.yml: the module joins the required Architecture Ratchet Contracts pytest list.
  • tests/quality/test_generated_obligations.py: RATCHET_TEST_SCOPE = "repository". The existing test_ci_topology inventory check then pins it to exactly that list, in both directions.
  • tests/quality/test_ci_topology.py::test_every_quality_module_runs_in_some_workflow_job: fails when any tests/quality/test_*.py is not a pytest target, or under a target directory, of some workflow job. That way a new orphan cannot recur.

Per-assert notes for data turned red: none. All 19 tests in the module pass on current main (19 passed; the slowest is 13.7s on a loaded local host).

Issue and approved scope

Issue: Refs #4113

Human scope-approval comment: steward follow-up on #4452 (wire the module into a required job and assert every quality module has a job), routed by the Stream T lead.

Does this PR complete the issue, or what remains? Closes the CI gap; no product change.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally

  • All existing tests pass

  • Added tests for new functionality (if applicable)

  • pytest tests/quality/test_generated_obligations.py on main -> 19 passed

  • Negative control: the new topology test with main's ci.yml -> 1 failed (no workflow job runs these modules: ['tests/quality/test_generated_obligations.py'])

  • pytest tests/quality/test_ci_topology.py with this change -> 279 passed

  • python -m tests.quality.taxonomy --changed -> clean

Node-set diff: +1 test (test_every_quality_module_runs_in_some_workflow_job). The ratchet job additionally runs 19 existing tests.

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

Review note: this touches .github/workflows/ci.yml, so it needs a CODEOWNERS review.

…very quality module has a job

tests/quality/test_generated_obligations.py was in no CI job's file list,
so none of its 19 tests ran in CI. It joins the required Architecture
Ratchet Contracts list (RATCHET_TEST_SCOPE pins it there), and
test_ci_topology now fails when any tests/quality/test_*.py has no job.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.37.0 milestone Nov 20, 2026
Copilot AI balanced review requested due to automatic review settings November 20, 2026 18:35
@danielmeppiel Daniel Meppiel (danielmeppiel) changed the title ci: every tests/quality module runs in a CI job ci(quality): run the generated-obligations contract in Ratchet Contracts Nov 20, 2026

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the CI coverage and quality-test collection changes.

No open issues 🎉

What changed in this PR

Closes the CI coverage gap identified in #4452 by adding generated-obligation checks to a required job and guarding against future uncollected quality-test modules. No product behavior changes.

Changes:

  • Adds the 19 existing generated-obligation tests to Architecture Ratchet Contracts.
  • Declares their repository-wide ratchet scope so existing inventory checks enforce job placement.
  • Adds a topology check requiring every tests/quality/test_*.py module to appear in a workflow's pytest targets, directly or through a parent directory.
File Description
tests/​quality/​test_generated_obligations.py Declares repository-wide ratchet scope.
tests/​quality/​test_ci_topology.py Detects quality-test modules missing from workflow pytest targets.
.github/​workflows/​ci.yml Runs generated-obligation tests in the required ratchet job.

Review effort: Balanced

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 5cf0579 into main Nov 21, 2026
30 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-t1-quality-modules-in-ci branch November 21, 2026 05:24
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.

2 participants