Skip to content

test(journeys): stable index of the 25 lifecycle journeys - #4152

Merged
Daniel Meppiel (danielmeppiel) merged 7 commits into
mainfrom
danielmeppiel-journey-index
Nov 20, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 7 commits into
mainfrom
danielmeppiel-journey-index

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

This PR adds tests/lifecycle/journeys/index.yaml, the stable catalogue of all 25 lifecycle journeys, transcribed from the steward's journey model. It also adds tests/quality/test_journey_index.py, which pins the index's schema. The release-acceptance skill and the journey runner read this index.

Schema.

  • Top level: schema_version: 1, oracles (O1-O13: name, invariant, check, applies), normalizers (N1-N7) and journeys.
  • Each journey has id, persona, title, golden, tier, docs, fixtures and steps.
  • Each step has n, cmd (literal), argv (only when cmd is nothing but plain apm invocations), kind (apm | shell | edit | manual), exit (an int, or a string when conditional), key_lines (must print), forbidden_lines (must not print), files and oracles.
  • Ids, step numbers, commands, exits, lines and oracle ids are kept exactly as the model gives them. A programmatic comparison with the source JSON matches field by field.

Docs paths. These were verified against docs/src/content/docs/.

  • Pages that moved are remapped. Examples: integrations/ci-cd.md -> consumer/run-in-ci.mdx; producer/versioning-strategies.md -> producer/release-a-version.md; .md -> .mdx renames.
  • A model path with no page today is kept under docs_unresolved, and that journey gets docs_missing: true.
  • The test fails if an unresolved page reappears, so the entry must be moved back into docs.

Test.

  • Exactly 25 unique ids matching ^(J0[1-9]|J1[0-5]|P0[1-4]|E0[1-6])$.
  • The golden set is exactly {J01, J02, J03, E01}.
  • Steps are numbered contiguously from 1.
  • Every step oracle is defined. A step may also name an invariant I1-I9 that some oracle's invariant field covers, as the model does (for example I3).
  • kind and argv rules; the index is ASCII only; oracles is exactly O1-O13 and normalizers exactly N1-N7.
  • Consistency with tests/lifecycle/journeys/{consumer,producer,enterprise}/*.yaml: same ids and step counts. It is skipped, with a stated reason, while no persona files exist. Once they exist it requires all 25.
  • It runs in the ratchet job.

Issue and approved scope

Issue: Part of #4110

Human scope-approval comment: #4110 (comment)

Remaining work for #4110: the per-persona journey files, goldens, the journey runner and the regen tool.

Type of change

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

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)
Check Command Result
Red before changed id: J01 to J16 in the index; uv run --extra dev pytest -q tests/quality/test_journey_index.py 1 failed: bad journey id 'J16'
Mutation cases (in-test) -k mutated 8 mutations (bad id, duplicate id, missing step, undefined oracle, missing O13, schema_version, missing docs page, unknown kind) each fail the check; a separate test covers the golden-set mutation
Green uv run --extra dev pytest -q tests/quality/test_journey_index.py 11 passed, 1 skipped (persona files not yet present)
Ratchet inventory uv run --extra dev pytest -q tests/quality/test_ci_topology.py -k ratchet passed
Lint ruff check, ruff format --check, complexity ratchet clean (no src/ change)

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md:
    user-visible effect first, 25 words or fewer, ending with (#PR);
    breaking changes only under upgrade notes; no Highlights; see
    .github/instructions/changelog.instructions.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed <a id="req-XXX"></a> anchor + prose + Appendix C
    row).
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.
  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.
  • N/A -- this PR does not change OpenAPM-observable behaviour.

…ema test (#4110)

tests/lifecycle/journeys/index.yaml transcribes the steward's journey model:
oracles O1-O13, normalizers N1-N7 and 25 journeys with literal commands,
argv for plain apm steps, exit expectations, key and forbidden lines,
files and oracles. Docs paths are verified against docs/src/content/docs;
moved pages are remapped and missing pages kept in docs_unresolved.
tests/quality/test_journey_index.py pins the schema and runs in the
ratchet job.

Co-authored-by: copilot-swe-agent[bot] <[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 08:51
Co-authored-by: copilot-swe-agent[bot] <[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

Unresolved findings allow malformed command arguments, make the approved consumer-only rollout fail CI, leave audit commands non-executable, and omit .gitignore from the commit required to produce a clean working tree.

4 open issues
What changed in this PR

This PR adds a stable catalogue of 25 lifecycle journeys for future journey-runner and release-acceptance tooling, supporting the test infrastructure work linked to #4110.

Changes:

  • Defines consumer, producer, and enterprise journeys with commands, expected outcomes, oracles, and documentation references.
  • Adds schema checks and mutation tests, plus a consistency check for future persona journey files.
  • Includes the schema tests in CI's ratchet job and adds a changelog entry.
File Description
tests/​quality/​test_journey_index.py Validates catalogue structure, identifiers, documentation paths, and persona-file consistency.
tests/​lifecycle/​journeys/​index.yaml Defines all 25 journeys, 13 oracles, and seven normalizers.
CHANGELOG.md Records the new journey catalogue as an internal change.
.github/​workflows/​ci.yml Adds the catalogue schema tests to the ratchet job.

Review effort: Balanced

Comment thread tests/lifecycle/journeys/index.yaml Resolved
Comment thread tests/quality/test_journey_index.py Resolved
Comment thread tests/quality/test_journey_index.py Resolved
Comment thread tests/lifecycle/journeys/index.yaml Resolved
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…field names

key_lines/forbidden_lines/kind/argv from tests/lifecycle/journeys/index.yaml (#4152) normalize to the same record as devx-journeys.json.

Co-authored-by: Copilot App <[email protected]>
…pages (#4110)

Map each catalogue source page to the current page under
docs/src/content/docs/ that documents the step (.md and .mdx). Only
producer/releasing-from-any-ci.md has no page today and stays in
docs_unresolved. A dedicated test requires every docs path on disk.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit f6a4c1e into main Nov 20, 2026
29 of 36 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-journey-index branch November 20, 2026 11:41
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