Skip to content

Harden structured-candidate JSON checkpoints#51

Merged
isty2e merged 1 commit into
mainfrom
fix/structured-candidate-json-codec
Jul 3, 2026
Merged

Harden structured-candidate JSON checkpoints#51
isty2e merged 1 commit into
mainfrom
fix/structured-candidate-json-codec

Conversation

@isty2e

@isty2e isty2e commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

This hardens the JSON-facing checkpoint boundary around structured candidates and CSA runtime snapshots.

  • Structured-candidate serialization now escapes marker-shaped user mappings instead of treating them as byte markers, while keeping legacy marker payloads readable.
  • Unsupported candidate payloads and non-finite float values now fail at the codec boundary with explicit errors.
  • CSA checkpoint loaders now use stricter JSON validators for numeric fields, so booleans no longer slip through integer or float paths and non-finite values are rejected before they can corrupt restored state.

Testing

  • uv run --python 3.11 --extra test ruff check pyproject.toml src tests
  • uv run --python 3.11 --extra test basedpyright src tests
  • uv run --python 3.11 --extra test pytest tests/spaces/test_space_candidate_serialization.py tests/csa/test_csa_checkpoint.py tests/csa/test_csa_growth.py tests/csa/test_csa_banking.py -q
  • uv run --python 3.11 --extra test pytest tests/spaces tests/csa -q
  • uv run --python 3.11 --extra test pytest tests -q

@isty2e isty2e merged commit 7831bae into main Jul 3, 2026
3 checks passed
@isty2e isty2e deleted the fix/structured-candidate-json-codec branch July 3, 2026 00:16
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