New joule-code-joulecontract crate (the joule-code-jcp precedent, pointed at the sibling contract standard). The mapping is field-for-field, not analogical: the edit set IS the frame (an out-of-frame edit is caught at the boundary and recorded as an undischarged frame naming the offending path — never suppressed), the cascade tier cost IS the EnPI ceiling (an overrun is a recorded negative residual, receipt-time enforcement), and JCR provenance maps downward-only onto the energy classes (HwShunt → Metered with a meter binding, ModelBased → ModelBased with an anchor, Estimator → Unaccounted — never promoted). contract_for_op derives the five-obligation contract from a coding request; frame_check compares the actual edit set against the contracted footprint; Binder::receipt_for_op discharges into a JouleContract receipt that passes receipt-local validation and grades honestly at JR-2 under the two-stage rule (JR-3+ composition is the deployment's verifier-of-record work). Joule Code SPEC gains §5.2 (contracted operations, OPTIONAL), mirroring §5.1's grant-gated consultation. READMEs updated on both sides. 5 binding tests; joule-code workspace 38 tests green; the binding crate is clippy-clean. Co-Authored-By: Claude Fable 5 <[email protected]>
19 lines
947 B
TOML
19 lines
947 B
TOML
[package]
|
|
name = "joule-code-joulecontract"
|
|
description = "Joule Code binding to the JouleContract standard: a coding operation under a five-obligation contract — the edit set IS the frame, the tier cost IS the ceiling, the JCR provenance maps onto the energy classes — discharged into a JouleContract receipt (Joule Code SPEC §5; JouleContract SPEC §3, §5.1)."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[dependencies]
|
|
joule-code-schema = { workspace = true }
|
|
joule-code-cargo = { workspace = true }
|
|
joule-code-receipt = { workspace = true }
|
|
joulecontract-schema = { path = "../../../../joulecontract/joulecontract-rs/crates/joulecontract-schema" }
|
|
joulecontract-receipt = { path = "../../../../joulecontract/joulecontract-rs/crates/joulecontract-receipt" }
|
|
thiserror = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
ed25519-dalek = { workspace = true }
|