jouleclaw-compliance: a scoped PLD disclosure bundle, and a crosswalk to the provisions #384

Merged
dcharlot merged 1 commit from feat/compliance-product-liability into main 2026-10-21 10:18:50 -04:00

2026-10-21

Transaction Science
jouleclaw-compliance: a scoped PLD disclosure bundle, and a crosswalk to the provisions
All checks were successful
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 1m16s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 1m2s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 6s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 3m14s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 1m42s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 7m43s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 2m43s
Directive (EU) 2024/2853 applies to products placed on the market after
9 December 2026 (Art. 2(1)). A court may order a defendant to disclose
relevant evidence (Art. 9(1)), limited to what is necessary and
proportionate (9(3)), with regard to trade secrets and confidential
information (9(4), 9(5)), and presented in an easily understandable manner
(9(6)). A failure to disclose is presumed to mean a defective product
(Art. 10(2)(a)). Nothing in the tree produced such a disclosure.

product_liability.rs, beside cra.rs:
- DisclosureBundle discloses one contiguous range of a transparency log
  whose leaves are records' BLAKE3 content hashes. Every record in the
  range is a member: disclosed with its bytes, or withheld with its content
  hash and a Ground (trade secret, confidential, third party, not
  necessary), each citing its paragraph. Each member carries an inclusion
  proof against one signed tree head, and the bundle can carry a
  consistency proof from an earlier head the receiving party holds.
- verify establishes, from the log's key alone:
  - the head is signed;
  - the members are the range exactly, with nothing missing, repeated or
    reordered;
  - each member is the leaf at its index;
  - the log grew from the held head by appending alone.
  So a record in scope cannot be left out unseen. Member::opened_by checks
  a later court-ordered production of a withheld record against the hash
  that pinned it.
- cut builds a bundle from any ProvableLog (MerkleTree, or a CRA
  FilingChain) and verifies it before returning it.
- plain_index gives a line per member for Art. 9(6).
- crosswalk lists the provisions records bear on: Art. 10(2)(a), (b), (c);
  10(3); 10(4); and Art. 11(2)(b)-(d) with 4(18) and 7(2)(c), (e) for model
  changes. bearing_on picks out a bundle's members for each. It is framed
  as evidence a party can produce and check; Art. 10(5) leaves rebuttal to
  the court.

The Directive's text was checked against the Official Journal (the
Publications Office XHTML) for every article cited.

Named product_liability rather than pld because jouleclaw-runtime already
has a pld.rs (prompt lookup decoding).

Tests: 8 new. Among them, a crafted inclusion proof that is valid against
the root and is refused by the tree-size check. Under a 3-leaf root,
leaf 2 proves as "leaf 1 of a 2-leaf tree", which would let it stand in for
leaf 1. Mutation testing: 17 mutants, all killed. Three survived the first
round (the tree-size check, the consistency proof's size match, and the
offer count at the cut) and are killed by the tests added for them.

Verified on the build host: jouleclaw-compliance 84 tests under --locked
(no dependents); clippy -D warnings and rustdoc -D warnings (missing_docs)
are clean; the public-surface scan passes. Repo checks pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 05:27:44 -04:00