5.0 KiB
5.0 KiB
BAT-006 Implementation
Implementation Status
- Status: completed-for-qc
- Completed At (KST): 2026-06-30 15:23:00 KST
- Scope: REQ-006 CI automation, synthetic fixture entrypoints, local CI smoke reproduction docs, and StagePilot evidence/state updates.
- Boundary: REQ-006 is not marked Implemented yet; QC by
jarcaledgerqcis the next gate.
Changed Files
CI workflow
.github/workflows/ci.yml- Added GitHub Actions workflow triggers for
pull_request,pushtomain, andworkflow_dispatch. - Added stable gate jobs/check names:
pytest-regressiondashboard-app-testdashboard-http-smokedb-safety-smoke
- Each job installs with
uvand runs its narrow CI gate command.
- Added GitHub Actions workflow triggers for
CI fixture and smoke wrappers
scripts/ci_fixture_db.py- Added deterministic synthetic fixture DB builder for CI/AppTest/smoke checks.
- Refuses the operating ledger DB default path and only allows CI fixture filenames.
- Seeds synthetic accounts, budget, and transactions, then verifies SQLite integrity.
scripts/ci_dashboard_http_smoke.py- Added dashboard HTTP smoke wrapper.
- Creates a temp synthetic fixture DB, starts Streamlit on loopback, polls for HTTP 200 readiness, and terminates/kills the process during cleanup.
- Emits status-only JSON with fixture/readiness/cleanup result.
scripts/ci_db_safety_smoke.py- Added DB safety wrapper.
- Creates temp synthetic source/backup/target DB paths, invokes
scripts/ledger_restore_smoke.py, and refuses the operating DB path. - Emits status-only JSON with restore/integrity/health result.
Tests
tests/test_dashboard_app.py- Added Streamlit AppTest coverage that creates a synthetic fixture DB through
scripts/ci_fixture_db.py, setsJARCA_LEDGER_DB_PATH, and checks core pages render without Streamlit exceptions. - Existing transfer review helper tests remain covered in the dashboard AppTest command.
- Added Streamlit AppTest coverage that creates a synthetic fixture DB through
Documentation
docs/project-structure.md- Documented
.github/workflows/ci.yml, CI fixture builder, HTTP smoke wrapper, DB safety wrapper, stable gate names, and synthetic fixture policy.
- Documented
docs/runtime-flows.md- Added
CI validation gatesflow and clarified that browser screenshot/DOM evidence remains local evidence, not a required CI gate.
- Added
docs/runbooks/ci-smoke.md- Added local reproduction commands, wrapper responsibilities, stable GitHub Actions job names, browser evidence boundary, and failure triage guidance.
docs/batches/bat-006_20260630_pytest-apptest-smoke-ci-automation/implementation.md- Replaced planned placeholder with actual implementation/evidence log.
docs/batches/bat-006_20260630_pytest-apptest-smoke-ci-automation/verification.md- Added AC-by-AC verification evidence and command results.
docs/batches/bat-006_20260630_pytest-apptest-smoke-ci-automation/index.md- Moved BAT-006 batch status from
plannedtorelease-candidatefor QC.
- Moved BAT-006 batch status from
docs/batches/index.md- Moved BAT-006 register status from
plannedtorelease-candidate.
- Moved BAT-006 register status from
Execution Log
All commands below were run from /root/projects/jarca-ledger-mcp.
-
Pytest regression gate
- Command:
uv run pytest --ignore=tests/test_dashboard_app.py -q - Result: PASS, exit code 0.
- Output:
............ss...............ss... [100%]
- Command:
-
Streamlit AppTest gate
- Command:
uv run pytest tests/test_dashboard_app.py -q - Result: PASS, exit code 0.
- Output:
.... [100%]
- Command:
-
Dashboard HTTP smoke gate
- Command:
uv run python scripts/ci_dashboard_http_smoke.py --host 127.0.0.1 --port 18501 --timeout 45 - Result: PASS, exit code 0.
- Output summary:
success: truegate: dashboard-http-smokefixture: syntheticfixture_integrity: okhttp_status: 200cleanup: terminated
- Command:
-
DB safety smoke gate
- Command:
uv run python scripts/ci_db_safety_smoke.py --timeout 45 - Result: PASS, exit code 0.
- Output summary:
success: truegate: db-safety-smokefixture: syntheticfixture_integrity: okrestore_smoke_exit_code: 0restored_exists: truerestored_integrity: okhealth_success: trueoperating_db_used: false
- Command:
Validation Summary
- GitHub Actions workflow exists with required BAT-006 trigger shape and stable job names.
- CI/AppTest/HTTP/DB safety commands pass locally against synthetic/temp DBs.
- Wrapper output is status-only and does not expose real account identifiers, operating DB data, raw payloads, source financial filenames, or passwords.
- Browser screenshot/DOM evidence is intentionally not a required CI gate and remains covered by the local browser evidence runbook/flow.
Remaining Risks / QC Notes
- Remote GitHub Actions has not been executed in this local handoff; QC should confirm the workflow on GitHub if remote runner access is available.
- Branch protection required-check enforcement is repository configuration outside this codebase.
- REQ-006 must remain not Implemented until
jarcaledgerqccompletes QC and the requirement implementation state is explicitly confirmed.