Skip to content

test(process): add contract-test suite for step-file workflows#178

Merged
Hidden-History merged 3 commits into
mainfrom
feat/task071-process-tests
Jun 6, 2026
Merged

test(process): add contract-test suite for step-file workflows#178
Hidden-History merged 3 commits into
mainfrom
feat/task071-process-tests

Conversation

@Hidden-History
Copy link
Copy Markdown
Owner

Description

Adds tests/process/ — a structural/contract test suite for the step-file workflows under _ai-memory/pov/workflows/ and the aim-model-dispatch sub-workflows.

These workflows are defined entirely in markdown (workflow.md + step files, no backing executable), so the suite validates their contracts rather than runtime behavior — the load-and-assert style used for DAG-integrity testing. No workflow or source files are modified; the change is purely additive test coverage.

Related Issue

Completes test coverage for the skill-script externalization series (merged in #163#170) by adding process-level contract tests for the step-file workflows. No specific issue to auto-close.

Fixes #

Type of Change

  • Test coverage (additive, no functional change)

Changes Made

  • Add tests/process/ with contract tests parametrized across all 26 workflow.md files (both workflow roots) and 211 step files
  • conftest.py: stdlib frontmatter parsing + step-chain walker, repo-root-anchored discovery (CWD-independent)
  • Register a process pytest marker in pyproject.toml
  • tests/process/INDEX.md: coverage map for all 30 processes

Testing

Test Environment

  • Python Version: 3.10 / 3.11 / 3.12
  • OS: Linux

Test Checklist

  • Unit tests pass (pytest tests/)
  • Manual testing completed

Test Cases Covered

  1. Frontmatter schema — every workflow.md has name/description/firstStep; every step file has name/description
  2. Step-chain integrityfirstStep and each nextStepFile resolve to a real file (no dangling references, cycle-guarded); terminal steps skip explicitly
  3. Routing-map validity — every WORKFLOW-MAP.md routing entry resolves to a real workflow.md, with a cross-check so a malformed entry cannot silently drop from validation
  4. Embedded-procedure skillsaim-agent-dispatch, aim-agent-lifecycle, aim-best-practices-researcher expose a valid SKILL.md
  5. Corpus-size sentinel — fails loudly if the path anchors break, guarding against a silently-empty test run

Result: pytest tests/process/ -m process691 passed, 78 skipped. black / ruff / isort clean.

Documentation

  • Code is self-documenting with clear names and docstrings
  • tests/process/INDEX.md documents coverage — 28 processes tested; first-breath and model-dispatch/claude-native documented as non-feasible (open-ended dialogue / reference doc, no step chain)

Breaking Changes

  • This PR introduces breaking changes

Security Considerations

  • No sensitive data exposed — pure filesystem assertions, no src import, no live services required

Performance Impact

  • No significant performance impact (filesystem-only tests, sub-minute runtime)

Deployment Notes

  • No special deployment steps required

Checklist

  • My code follows the project's coding conventions (PEP 8 for Python)
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have added tests that prove the feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly

Add tests/process/ — structural/contract tests for the markdown step-file
workflows under _ai-memory/pov/workflows/ and the aim-model-dispatch
sub-workflows. These workflows have no backing executable, so the suite
validates their structural contracts rather than runtime behavior:

- frontmatter schema (name/description/firstStep)
- step-chain link resolution (firstStep -> nextStepFile; no dangling, cycle-guarded)
- WORKFLOW-MAP routing entries resolve, with a cross-check against silent drops
- embedded-procedure skills expose a valid SKILL.md
- corpus-size sentinel guarding against silently-empty discovery

Pure filesystem assertions (stdlib + PyYAML); no src import, no live services.
Registered under a `process` pytest marker. INDEX.md documents coverage for
all 30 processes (28 tested, 2 documented non-feasible).
@Hidden-History Hidden-History added the type:test Test changes label Jun 5, 2026
@Hidden-History Hidden-History merged commit 5dc4f62 into main Jun 6, 2026
12 checks passed
@Hidden-History Hidden-History deleted the feat/task071-process-tests branch June 6, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:test Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant