Skip to content

test(lifecycle): journey witnesses track the current promise ids - #4452

Merged
Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-t1-witnesses-current
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-t1-witnesses-current

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

python -m tests.lifecycle.witnesses reported generated_obligations.json is stale on main. Cause: main's daa2f73 dropped the journey known cells for six J|... rows (their tracking issues #4173, #4192, #4193, #4211 are in the closed state) without re-running --write, and no test ran the witnesses check, so the drift was silent. No promise ids or witness paths were renamed.

  • tests/quality/generated_obligations.json: regenerated. J|E02|5|O6, J|J04|5|O6, J|J08|3|O6, J|J09|2|O6, J|J09|3|O6 and J|J11|1|O6 move from known-failing to required (witness: test_journeys.py::test_journey[...]); a pre-approved tightening. Nothing is loosened.
  • tests/quality/test_promise_obligations.py::test_generated_witnesses_match_the_collected_tables_and_journeys: runs the witnesses check in a subprocess and fails when the file is stale (gate tables and journeys both), with the message "run python -m tests.lifecycle.witnesses --write and commit generated_obligations.json". Collection only; no world build. It lives in test_promise_obligations.py because that module runs in the required Architecture Ratchet Contracts job; test_generated_obligations.py is in no CI job file list, which is how the drift went unseen.

Issue and approved scope

Issue: Refs #4113

Human scope-approval comment: test-tooling follow-up routed by the Stream T lead under the PM's no-residuals ruling.

Does this PR complete the issue, or what remains? Restores and gates the witness index; 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)

  • New test on main's file (before regenerating): failed (stale)

  • After python -m tests.lifecycle.witnesses --write: pytest tests/quality/test_promise_obligations.py -> 27 passed

  • Node-set diff: +1 test (test_generated_witnesses_match_the_collected_tables_and_journeys).

#4448 regenerates the same six rows identically (plus its own two G rows), so the two merge cleanly in either order.

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.

generated_obligations.json drifted when journey known cells were dropped
without --write. Regenerate it and add a test that runs the witnesses
check, so a stale file fails CI.

Co-authored-by: Copilot App <[email protected]>

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.

🟡 Changes recommended

The freshness-check module is omitted from required PR CI jobs, allowing known-cell changes without regeneration to pass unchecked; it must be included with any necessary ratchet-classification update.

1 open issue
What changed in this PR

This test-only PR refreshes the lifecycle witness index after six known-failing journey cells became required, and adds a regression check for stale generated data. No product behavior changes.

Changes:

  • Moves six journey obligations from known-failing to required without renaming IDs or witness paths.
  • Adds a subprocess-based freshness check covering gate tables and journeys.
File Description
tests/​quality/​test_generated_obligations.py Adds a test that checks the generated witness index is current.
tests/​quality/​generated_obligations.json Reclassifies six journey obligations as required.

Review effort: Balanced

Comment on lines +164 to +165
def test_generated_witnesses_match_the_collected_tables_and_journeys() -> None:
"""generated_obligations.json is current: a dropped or added known cell needs --write."""
…acts module

tests/quality/test_generated_obligations.py is not in any CI job's file
list; test_promise_obligations.py runs in Architecture Ratchet Contracts.

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…nt promise ids

Co-authored-by: Copilot App <[email protected]>

# Conflicts:
#	tests/quality/generated_obligations.json
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 31b7d57 into main Nov 21, 2026
38 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-t1-witnesses-current 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