Skip to content

W05-6 · Tests + coverage gate for relational schema in core #39

Description

@Siddardth7

🎯 Goal

Lock the new relational + action model with thorough tests and a core coverage gate (mirroring quality_core.io at 100%), so the shared schema is bulletproof for both tools.

📋 Tasks

  • Core tests: relational validation (missing child entities, bad enums/ranges), flat↔relational round-trip, action effectiveness, adapter edge cases (empty dataset, single failure mode, duplicate IDs).
  • Extend the core CI gate to cover quality_core.schema at the chosen threshold (100% target, like io).
  • Confirm a malformed relational payload yields a friendly, row/entity-addressed error (not a stack trace).

✅ Definition of Done

  • quality_core.schema at gate threshold; validation + round-trip + effectiveness paths covered; CI gate added; full suite green.

🛠 How to execute

Primary: test-automator + /python-testing-patterns. Support: /code-review.
Files: packages/quality-core/tests/, .github/workflows/ci.yml, app CLAUDE.md gate docs.
Verify: uv run pytest packages/quality-core --cov=quality_core.schema --cov-fail-under=100.

🔗 Dependencies

Blocked by W05-2, W05-3 (can overlap W05-4/5).

📎 References

W04-5 (core io 100% + CI gate) for the gate pattern and the duck-typed-fake testing approach.

🧭 Fresh-session orientation

  • Repo: quality-platform/ uv workspace (members: packages/quality-core, apps/fmea, apps/spc). Read apps/fmea/CLAUDE.md first.
  • Gate (must be green before close): uv run ruff check . · uv run mypy · uv run pytest --cov. Locally: uv at ~/.local/bin/uv; or source .venv/bin/activate then python -m pytest.
  • Workflow: one issue at a time → multi-agent /code-review before finishing → conventional commit → push → CI green → close issue, card → Done.
  • Precedent: Week 04 shared quality_core/io; this week shares schema. FMEA exports must stay content-identical (openpyxl/fpdf2 embed build timestamps — compare cell grids + strip PDF /CreationDate, never raw bytes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:B-coresWks 3-5 standards-correct corestool:corequality-core shared packagetype:testtests/coverage

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions