design: IR repo should own cross-language golden wire fixtures (canonical contract for Rust Planner) #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
IR's reason to exist is being the stable JSON contract between Haskell and the future Rust Planner. Today the only on-disk wire artifacts are in the DSL repo (test/fixtures/*.json), and IR's own tests check Haskell-internal roundtrips only.
When the Rust side lands, serde definitions become a third independent encoding of the same contract (after Haskell ToJSON and Haskell FromJSON). Without shared fixtures, drift is detected by integration failure at runtime.
Proposal:
This makes IR the single source of truth instead of "whatever the DSL currently emits".
Scope update: Planner core is Haskell (GHC native lib behind FFI, Rust actor wrapper). Rust never deserializes IR - it passes intent.json as opaque bytes to the Haskell core, which uses the existing aeson instances. So fixtures here guard Haskell encode/decode stability across IR versions, not Rust serde drift. Cross-language golden fixtures are still needed, but for SystemState and Plan - they belong in the Planner repo (see FrogOS/planner#1).