Decisions

  • Pending: Where to document test conventions — vault/20_knowledge/tech/ or README?

User Tasks


FR-010: Testing Infrastructure

Summary

Set up pytest, test conventions, and test structure so every future feature can be properly tested.

Problem / Motivation

CLAUDE.md mandates “always test before presenting work as done” and coding-standards.md requires tests for every code change. But there’s no test framework, no test directory, no conventions. This makes the testing rules unenforceable.

Proposed Solution

Minimal pytest setup with clear conventions for writing and running tests.


Open Questions

No open questions.


Phase Overview

PhaseDescriptionStatus
Phase 1Pytest setup + conventions
Phase 2CI integration

Phase 1: Pytest Setup —

Goal: Get pytest running with basic structure and conventions.

File / FeatureDetailsOwnerStatus
Install pytestAdd to dev dependencies in pyproject.tomlopus
tests/ directoryAt project root, mirroring src/opus/ structureopus
conftest.pyShared fixtures (vault path, temp dirs, etc.)opus
Test conventionsDocument naming, structure, what to testopus
First testSmoke test proving the setup worksopus
pytest configpyproject.toml [tool.pytest] sectionopus

Phase 2: CI Integration —

Goal: Automated test execution on push/PR with coverage reporting.

File / FeatureDetailsOwnerStatus
GitHub ActionsRun tests on push/PR (pairs with FR-028 Phase 2)opus
Coveragepytest-cov for coverage reportingopus

Acceptance Criteria:

  • pytest runs from project root and discovers tests
  • At least one passing test exists
  • Test conventions documented (in vault/20_knowledge/tech/ or README)
  • conftest.py with basic fixtures

Notes:

  • Depends on FR-009 (Python Project Scaffold) for pyproject.toml
  • Phase 2 pairs with FR-028 Phase 2 (GitHub Actions)
  • Keep conventions simple — they’ll evolve with the codebase

Prerequisites / Gap Analysis

Requirements

RequirementDescription
REQ-1FR-009 (Python Project Scaffold) must be complete

Current State

ComponentStatusDetails
pytestNot installed
tests/ directoryDoes not exist
Test conventionsNone documented

Gap (What’s missing?)

GapEffortBlocker?
FR-009 scaffoldMedYes
Entire test infrastructureMedNo (once FR-009 done)

Test

Manual tests

TestExpectedOwnerActualLast
pytest from project rootDiscovers and runs testsopuspending-
Smoke testPassesopuspending-

AI-verified tests

ScenarioExpected behaviorVerification method

E2E tests

ScenarioAssertion

Integration tests

ComponentCoverage

Unit tests

ComponentTestsCoverage

History

DateEventDetails
2026-02-27Created
2026-02-28ReformattedAligned to feature-request template

References

  • FR-009 (Python Project Scaffold) — prerequisite
  • FR-028 (Feature Workflow Automation) — Phase 2 CI integration