Research Assistant
74c8e4ca76
fix: tests validate PFResult envelope for status --json contract change
...
Updates all tests that assert on status --json output to read from PFResult envelope.
Code was intentionally changed in Phase 57 to wrap JSON output in PFResult {ok, command, version, data, error}. Tests must validate the new contract shape, not the old flat dict format.
2026-05-09 17:37:14 +08:00
Research Assistant
bbd39a90d3
v1.4.17rc4
...
Milestone v2.1: Contract-Driven Architecture & Engineering Hardening
- Stop the Bleeding: version sync checker, PyYAML hardening, install docs unification
- Contract Layer: PFResult/PFError dataclasses, ErrorCode enum, --json wrapping
- Service Extraction: sync.py decomposed into 3 adapters + SyncService
- State Machine: PdfStatus/OcrStatus/Lifecycle enums, transitions, field registry
- Setup Modularization: setup_wizard.py decomposed into 6 classes
173 tests passing, 0 regressions.
2026-05-09 17:05:07 +08:00
Research Assistant
ab7ac0d6ab
feat(52-golden-datasets-cli-contracts): add CLI contract tests with snapshot integration
...
- tests/cli/ with conftest.py (cli_invoker, vault_builder, mock_ocr_backend fixtures)
- test_contract_helpers.py with normalize_snapshot, assert_valid_json, assert_json_shape
- 3 test files covering all 8 CLI commands (paths, status, sync, ocr, doctor,
repair, context, setup) with exit code, output shape, and error contracts
- fixtures/ocr/mock_ocr_backend.py with 4 mock modes (success, pending, error, timeout)
- pyproject.toml: added pytest-snapshot, responses, pytest-timeout, pytest-mock,
coverage; added testpaths and layer markers
- All 27 tests pass (CLI-01, CLI-02, CLI-03 satisfied)
2026-05-08 23:32:03 +08:00