feat(ring-sr-alg-00): GOLD II arena-types Β· closes #450#475
Merged
Conversation
Adds trios-algorithm-arena/SR-ALG-00 β dependency-free typed metadata
for one algorithm submitted to the IGLA arena. Bottom of the GOLD II
dependency graph; SR-ALG-01..03 + BR-OUTPUT all import their wire
format from here.
## Critical: no Python in crates/
AlgorithmSpec::entry_path points OUTSIDE crates/ (typically into
parameter-golf/records/...). Real Python spawn is the job of SR-02
trainer-runner β NEVER this crate. R-L6-PURE-007.
## Public surface
- AlgorithmId(Uuid) v4 newtype
- EntryHash([u8; 32]) SHA-256, lowercase-hex JSON (length 64)
- GoldenState([u8; 32]) SHA-256, optional in spec
- EnvVar(String) / EnvValue(String)
- AlgorithmSpec {
algorithm_id, name, entry_path: PathBuf,
entry_hash, env: Vec<(EnvVar, EnvValue)>,
golden_state_hash: Option<...>,
theorem: Option<String>, // e.g. 'Coq.Reals Theorem 3.1 SAC-1'
}
- AlgorithmSpec::new(name, path, hash) cheap constructor
- AlgorithmSpec::verify_hash(actual: &[u8; 32]) -> bool
## Tests (12/12 GREEN)
- algorithm_id_unique_per_instance
- entry_hash_32_bytes_serialises_as_hex64
- entry_hash_rejects_wrong_length 31-byte hex string fails
- golden_state_serialises_as_hex64
- env_empty_vec_valid
- entry_path_from_str_round_trips
- theorem_optional absent field omitted from JSON
- golden_state_hash_optional same
- verify_hash_correct
- verify_hash_wrong_fails
- serde_roundtrip_full_spec every field roundtrips
- schema_field_names_stable JSON keys frozen for downstream
## Compliance
- L1 β no .sh
- L3 β clippy clean
- L4 β tests before merge
- L6 β no I/O, no async
- L13 β I-SCOPE: only crates/trios-algorithm-arena/
- L14 β Agent: trailer
- R-RING-DEP-002 β deps = serde + uuid + hex (+ serde_json dev)
- R-RING-FACADE-001 β outer src/lib.rs is re-exports only
- R-L6-PURE-007 β no .py in this crate; entry_path is a *reference*
- I5 β ring has README.md, TASK.md, AGENTS.md, RING.md, Cargo.toml, src/lib.rs
π» phi^2 + phi^-2 = 3 Β· TRINITY Β· GOLD II bottom
Soul-name: Arena Architect
Closes #450
Part of #446
Agent: Arena-Architect
2e185a5 to
4a3ac34
Compare
22 tasks
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.
SR-ALG-00 β Arena Types (algorithm-spec metadata)
Closes #450 Β· Part of #446 Β· No blockers (independent GOLD II thread)
Soul-name:
Arena ArchitectΒ· Codename:LEADΒ· Tier: π₯ Bronze Β· Kingdom: RustWhat landed
Dependency-free typed metadata for one algorithm submitted to the TRIOS IGLA arena. SR-ALG-00 is the bottom of the GOLD II graph β SR-ALG-01..03 + BR-OUTPUT all import their manifest types from here.
6 public types
AlgorithmId(Uuid)EntryHash([u8; 32])GoldenState([u8; 32])EnvVar(String),EnvValue(String)AlgorithmSpecalgorithm_id,name,entry_path,entry_hash,env,golden_state_hash?,theorem?)Critical: no Python in
crates/AlgorithmSpec::entry_pathpoints outsidecrates/(typically intoparameter-golf/records/...). Real Python spawn is the job of SR-02 trainer-runner β never this crate. R-L6-PURE-007.Tests (12/12 GREEN)
algorithm_id_unique_per_instanceentry_hash_32_bytes_serialises_as_hex64entry_hash_rejects_wrong_lengthgolden_state_serialises_as_hex64env_empty_vec_validentry_path_from_str_round_tripsPathBufparitytheorem_optional/golden_state_hash_optionalverify_hash_correct/verify_hash_wrong_failsserde_roundtrip_full_specschema_field_names_stableCompliance
L1 β Β· L3 β Β· L4 β Β· L6 β Β· L13 β Β· L14 β Β· R-RING-DEP-002 β Β· R-RING-FACADE-001 β Β· R-L6-PURE-007 β Β· I5 β
π»
ΟΒ² + Οβ»Β² = 3Β· GOLD II bottomAgent: Arena-Architect