test(req-001): tighten AC coverage and remove markdown trailing whitespace

Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-09-09 12:20:11 +00:00
committed by GitHub
co-authored by genichin
parent 64975033e6
commit 7aa3de524a
4 changed files with 186 additions and 50 deletions
+59 -24
View File
@@ -1,73 +1,108 @@
# REQ-001 Test Catalog
Test ID: TC-REQ-001-001
Test ID: TC-REQ-001-001
Verifies:
- REQ-001.01-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_updates_only_profit_buffer_and_records_executed_at_and_tax`, `tests/test_v1_portfolios_manual_ledger.py::test_dividend_tax_defaults_to_zero_when_omitted`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_updates_only_profit_buffer_and_records_executed_at_and_tax
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_tax_defaults_to_zero_when_omitted
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_tax_omitted_persists_zero_on_real_postgres
Automated: true
Test ID: TC-REQ-001-002
Test ID: TC-REQ-001-002
Verifies:
- REQ-001.01-AC02
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_requires_executed_at_and_rejects_fee_field`, `tests/test_v1_portfolios_manual_ledger.py::test_dividend_rejects_sub_minimum_numeric_precision`, `tests/test_v1_portfolios_manual_ledger.py::test_dividend_rejects_amount_exceeding_numeric_20_8`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_requires_executed_at_and_rejects_fee_field
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_rejects_sub_minimum_numeric_precision
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_rejects_amount_exceeding_numeric_20_8
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_rejects_invalid_amount_tax_and_unrelated_fields_without_state_change
Automated: true
Test ID: TC-REQ-001-003
Test ID: TC-REQ-001-003
Verifies:
- REQ-001.02-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_updates_only_profit_buffer_and_records_executed_at_and_tax`, `tests/test_v1_portfolios_manual_ledger.py::test_dividend_tax_defaults_to_zero_when_omitted`, `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_precision_and_reversal_round_trip_on_real_postgres`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_updates_only_profit_buffer_and_records_executed_at_and_tax
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_tax_defaults_to_zero_when_omitted
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_precision_and_reversal_round_trip_on_real_postgres
Automated: true
Test ID: TC-REQ-001-004
Test ID: TC-REQ-001-004
Verifies:
- REQ-001.03-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_executed_at_uses_utc_midnight_independent_of_server_timezone`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_executed_at_uses_utc_midnight_independent_of_server_timezone
Automated: true
Test ID: TC-REQ-001-005
Test ID: TC-REQ-001-005
Verifies:
- REQ-001.04-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_unified_ledger_includes_dividend_fields`, `tests/test_v1_portfolios_manual_ledger.py::test_unified_ledger_openapi_contains_nullable_amount`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_unified_ledger_includes_dividend_fields
- tests/test_v1_portfolios_manual_ledger.py::test_unified_ledger_openapi_contains_nullable_amount
Automated: true
Test ID: TC-REQ-001-006
Test ID: TC-REQ-001-006
Verifies:
- REQ-001.05-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_duplicate_requires_confirmation`, `tests/test_v1_portfolios_manual_ledger.py::test_dividend_with_different_decimal_amount_is_not_treated_as_duplicate`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_duplicate_requires_confirmation
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_with_different_decimal_amount_is_not_treated_as_duplicate
Automated: true
Test ID: TC-REQ-001-007
Test ID: TC-REQ-001-007
Verifies:
- REQ-001.05-AC02
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_duplicate_requires_confirmation`, `tests/test_v1_portfolios_manual_ledger.py::test_reversed_dividend_is_excluded_from_future_duplicate_candidate_matching`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_duplicate_requires_confirmation
- tests/test_v1_portfolios_manual_ledger.py::test_reversed_dividend_is_excluded_from_future_duplicate_candidate_matching
Automated: true
Test ID: TC-REQ-001-008
Test ID: TC-REQ-001-008
Verifies:
- REQ-001.05-AC03
Test reference: `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_cold_repositories_concurrent_dividend_requests_follow_duplicate_contract`
Test reference:
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_cold_repositories_concurrent_dividend_requests_follow_duplicate_contract
Automated: true
Test ID: TC-REQ-001-009
Test ID: TC-REQ-001-009
Verifies:
- REQ-001.06-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_reversal_decreases_profit_buffer`, `tests/test_v1_portfolios_manual_ledger.py::test_duplicate_reversal_is_rejected_without_state_change`, `tests/test_v1_portfolios_manual_ledger.py::test_dividend_reversal_insufficient_buffer_is_rejected_without_state_change`, `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_precision_and_reversal_round_trip_on_real_postgres`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_reversal_decreases_profit_buffer
- tests/test_v1_portfolios_manual_ledger.py::test_duplicate_reversal_is_rejected_without_state_change
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_reversal_insufficient_buffer_is_rejected_without_state_change
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_precision_and_reversal_round_trip_on_real_postgres
Automated: true
Test ID: TC-REQ-001-010
Test ID: TC-REQ-001-010
Verifies:
- REQ-001.07-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_dividend_with_different_decimal_amount_is_not_treated_as_duplicate`, `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_precision_and_reversal_round_trip_on_real_postgres`, `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_large_existing_buffer_plus_min_dividend_is_rejected_before_snapshot_divergence`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_duplicate_check_does_not_collapse_decimals_that_can_alias_in_float
- tests/test_v1_portfolios_manual_ledger.py::test_dividend_with_different_decimal_amount_is_not_treated_as_duplicate
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_precision_and_reversal_round_trip_on_real_postgres
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_large_existing_buffer_plus_min_dividend_is_rejected_before_snapshot_divergence
Automated: true
Test ID: TC-REQ-001-011
Test ID: TC-REQ-001-011
Verifies:
- REQ-001.08-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_confirm_duplicate_false_is_accepted_for_non_dividend_actions`, `tests/test_v1_portfolios_manual_ledger.py::test_confirm_duplicate_true_is_rejected_for_non_dividend_actions`, `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_existing_high_precision_snapshot_still_allows_legacy_manual_actions`, `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_large_invest_and_large_dividend_tax_metadata_are_accepted_when_snapshot_is_safe`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_confirm_duplicate_false_is_accepted_for_non_dividend_actions
- tests/test_v1_portfolios_manual_ledger.py::test_confirm_duplicate_true_is_rejected_for_non_dividend_actions
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_existing_high_precision_snapshot_still_allows_legacy_manual_actions
- tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_large_invest_and_large_dividend_tax_metadata_are_accepted_when_snapshot_is_safe
Automated: true
Test ID: TC-REQ-001-012
Test ID: TC-REQ-001-012
Verifies:
- REQ-001.09-AC01
Test reference: `tests/test_v1_portfolios_manual_ledger.py::test_manual_write_rejects_service_token`, `tests/test_v1_portfolios_manual_ledger.py::test_owner_mismatch_returns_403`, `tests/test_v1_portfolios_manual_ledger.py::test_daemon_managed_requires_confirmation_then_records_evidence`, `tests/test_v1_portfolios_manual_ledger.py::test_manual_ledger_conflict_message_is_sanitized`, `tests/test_v1_portfolios_manual_ledger.py::test_manual_ledger_conflict_secret_is_not_rendered_in_logs`
Test reference:
- tests/test_v1_portfolios_manual_ledger.py::test_manual_write_rejects_service_token
- tests/test_v1_portfolios_manual_ledger.py::test_owner_mismatch_returns_403
- tests/test_v1_portfolios_manual_ledger.py::test_daemon_managed_requires_confirmation_then_records_evidence
- tests/test_v1_portfolios_manual_ledger.py::test_manual_ledger_conflict_message_is_sanitized
- tests/test_v1_portfolios_manual_ledger.py::test_manual_ledger_conflict_secret_is_not_rendered_in_logs
Automated: true
+42 -24
View File
@@ -2,54 +2,72 @@
## Evidence Batch: local API regression run
Requirement revision: `REQ-001@1.0`
Commit: `1015b465bb64a5cfe9271044d43d079152c81e20`
Environment: `local sandbox / pytest / fake repository`
Executed at: `2026-09-09T12:05:39Z`
Run selector: `pytest -q -o addopts='' tests/test_v1_portfolios_manual_ledger.py`
Run result: `33 passed`
Requirement revision: `REQ-001@1.0`
Commit: `pending-local-commit`
Environment: `local sandbox / pytest / fake repository`
Executed at: `2026-09-09T12:16:43Z`
Run selector: `pytest -q -o addopts='' tests/test_v1_portfolios_manual_ledger.py`
Run result: `35 passed`
Test ID: TC-REQ-001-001
Test ID: TC-REQ-001-002
Result: PASS
Test ID: TC-REQ-001-002
Test ID: TC-REQ-001-003
Result: PASS
Test ID: TC-REQ-001-004
Test ID: TC-REQ-001-004
Result: PASS
Test ID: TC-REQ-001-005
Test ID: TC-REQ-001-005
Result: PASS
Test ID: TC-REQ-001-006
Test ID: TC-REQ-001-006
Result: PASS
Test ID: TC-REQ-001-007
Test ID: TC-REQ-001-007
Result: PASS
Test ID: TC-REQ-001-012
Test ID: TC-REQ-001-009
Result: PASS
Test ID: TC-REQ-001-010
Result: PASS
Test ID: TC-REQ-001-012
Result: PASS
## Evidence Batch: independent real PostgreSQL re-review run
Requirement revision: `REQ-001@1.0`
Commit: `f193aa6da33428783b91c1144fc8b9de5b3fb4bb`
Environment: `disposable PostgreSQL / independent re-review`
Executed at: `2026-09-09T12:05:39Z`
Run selector: `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py (module)`
Run result: `7 passed, 2 failed` (`2 failed`는 기존 stale migration-head baseline)
Requirement revision: `REQ-001@1.0`
Commit: `f193aa6da33428783b91c1144fc8b9de5b3fb4bb`
Environment: `disposable PostgreSQL / independent re-review`
Executed at: `2026-09-09T12:05:39Z`
Run selector: `tests/test_bat025_portfolio_ledger_manual_metadata_migration.py (module)`
Run result: `7 passed, 2 failed` (`2 failed` are pre-existing stale migration-head baseline)
Test ID: TC-REQ-001-003
Test ID: TC-REQ-001-003
Result: PASS
Test ID: TC-REQ-001-008
Test ID: TC-REQ-001-008
Result: PASS
Test ID: TC-REQ-001-009
Test ID: TC-REQ-001-009
Result: PASS
Test ID: TC-REQ-001-010
Test ID: TC-REQ-001-010
Result: PASS
Test ID: TC-REQ-001-011
Test ID: TC-REQ-001-011
Result: PASS
## Evidence Batch: local real PostgreSQL availability
Requirement revision: `REQ-001@1.0`
Commit: `pending-local-commit`
Environment: `local sandbox / PostgreSQL DSN not configured`
Executed at: `2026-09-09T12:16:43Z`
Run selector: `pytest -q -o addopts='' tests/test_bat025_portfolio_ledger_manual_metadata_migration.py::test_dividend_tax_omitted_persists_zero_on_real_postgres`
Run result: `1 skipped`
Test ID: TC-REQ-001-001
Result: BLOCKED