feat(csa): expose canonical configuration manifests - #110
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CSAOptimizer.from_space_defaults(...)resolves presets, space-derived components, and explicit overrides into the configuration that actually runs. This PR makes that resolved optimizer-side configuration available as stable, JSON-safe provenance.CSAConfigurationManifestwith strictto_dict()/from_dict(), canonical JSON, and a SHA-256 content fingerprintCSAComponentDescriptorvalues for custom component occurrences and report all missing and unused semantic paths togetherContract boundaries
The manifest describes resolved optimizer configuration only. It does not serialize executable Python objects, runtime RNG state, checkpoints, problems, objectives, datasets, evaluators, dependency versions, or the execution environment.
Custom descriptors are caller assertions. Variopt validates and fingerprints their identifiers, versions, and JSON configuration, but matching descriptors are not proof that two custom implementations behave identically. The fingerprint is therefore a version-scoped identity for represented manifest data, not a complete run or reproducibility identity.
Manifest generation is read-only and remains outside optimization hot paths.
random_state=Noneis represented as nondeterministic initialization without materializing an RNG snapshot.Validation
uv run ruff check --fix --extend-select I,UP pyproject.toml src tests .github/scriptsuv run ruff format --check pyproject.toml src tests .github/scriptsuv run basedpyright src tests .github/scripts(0 errors, 0 warnings)uv run pytest tests -q(1692 passed)uv run --extra docs mkdocs build --strictuv build --wheelCloses #95