Skip to content

feat(outputs): write handoff reports and run history - #5

Merged
jaeyeopme merged 1 commit into
mainfrom
handoff-outputs-history
Jun 6, 2026
Merged

feat(outputs): write handoff reports and run history#5
jaeyeopme merged 1 commit into
mainfrom
handoff-outputs-history

Conversation

@jaeyeopme

Copy link
Copy Markdown
Owner

Motivation

Persisted outputs are the next boundary before export orchestration. This PR adds deterministic handoff files and run history storage without coupling them to API or CLI entry points.

Scope

  • Add clean CSV, clean JSON, rejected CSV, and run summary writers.
  • Add standard output path construction for one export directory.
  • Add SQLite run history insertion with documented count and output path fields.
  • Add focused tests for output contracts and run history persistence.

Out of Scope

  • Full export orchestration.
  • API or CLI export behavior.
  • Generated demo output files.
  • Public docs status changes.

Modifications

  • Add reports.py for deterministic clean and rejected output files plus a Markdown run summary.
  • Add repository.py for inserting export run history into SQLite.
  • Add tests that verify documented filenames, CSV columns, JSON payloads, summary sections, SQLite columns, and appended run ids.

Test Plan

  • uv run pytest tests/test_reports.py tests/test_repository.py -v
  • uv run ruff check src/clean_data_export_api/reports.py src/clean_data_export_api/repository.py tests/test_reports.py tests/test_repository.py
  • uv run basedpyright
  • uv run pytest -v
  • uv run pytest tests/test_reports.py tests/test_repository.py --cov=clean_data_export_api.reports --cov=clean_data_export_api.repository --cov-report=term-missing
  • uv run pytest --cov=clean_data_export_api --cov-report=term-missing --cov-fail-under=90
  • uv run python -m compileall src tests
  • git diff --check

Docs Impact

none

ADR Check

  • No architecture or scope decision needs a new or updated ADR.

Result

Accepted and rejected rows can now be written to deterministic handoff files, and export run counts and output paths can be stored in SQLite.

Add deterministic report writers for clean CSV, clean JSON, rejected CSV, and Markdown run summaries. Add a small SQLite repository for export run history with documented count and output path fields.

Tested: uv run pytest tests/test_reports.py tests/test_repository.py -v

Tested: uv run ruff check src/clean_data_export_api/reports.py src/clean_data_export_api/repository.py tests/test_reports.py tests/test_repository.py

Tested: uv run basedpyright

Tested: uv run pytest -v

Tested: uv run pytest tests/test_reports.py tests/test_repository.py --cov=clean_data_export_api.reports --cov=clean_data_export_api.repository --cov-report=term-missing

Tested: uv run pytest --cov=clean_data_export_api --cov-report=term-missing --cov-fail-under=90

Tested: uv run python -m compileall src tests

Tested: git diff --check
@jaeyeopme
jaeyeopme force-pushed the handoff-outputs-history branch from 5e1750a to 39c5936 Compare June 6, 2026 15:45
@jaeyeopme
jaeyeopme merged commit 35e762a into main Jun 6, 2026
2 checks passed
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.

1 participant