Skip to content

test(parity): validate recovery forecast output schema - #57

Merged
bhelm merged 1 commit into
drift/metafrom
codex/recovery-forecast-exact-schema
Aug 19, 2026
Merged

bhelm merged 1 commit into
drift/metafrom
codex/recovery-forecast-exact-schema

Conversation

@bhelm

@bhelm bhelm commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an extensible exact-output validator hook scoped to RecoveryForecaster.forecast/6
  • require the nullable normalized forecast object to have exact keys and field types before Swift/Kotlin equality
  • require the constants characterization shape only when requested by the input flag
  • cover common-mode missing, extra, malformed, null, valid, and constants cases

RED evidence

Before the validator, test_recovery_forecast_exact_schema_rejects_common_mode_missing_field failed because no ParityFormatError was raised when both sides omitted low.

Verification

  • python3 -m unittest discover -s Tools/tests -v (113 tests)
  • python3 -m unittest discover -s Tools -p "test_*.py" -v (59 tests)
  • python3 Tools/parity_ledger.py
  • python3 Tools/parity_ratchet.py ratchet --base 03c9f84c38a717fb1aedc60cd010dc0cc9b7ad15 --offline
  • python3 -m py_compile Tools/parity_diff.py Tools/tests/test_parity_diff.py
  • git diff --check

No native/production code changed and no native builds were required.

@bhelm
bhelm merged commit f929e1c into drift/meta Aug 19, 2026
2 checks passed
@bhelm
bhelm deleted the codex/recovery-forecast-exact-schema branch August 19, 2026 04:01
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