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
Owner

Sweep 2026-10-19 item #6, last part.

Directive (EU) 2024/2853 applies to products placed on the market after 9 December 2026 (Art. 2(1)). Under it:

  • A court may order a defendant to disclose relevant evidence (Art. 9(1)).
  • Disclosure is limited to what is necessary and proportionate (9(3)), with regard to trade secrets and confidential information (9(4), 9(5)), and may be required in an easily understandable form (9(6)).
  • A failure to disclose leads to a presumption of defect (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: either disclosed with its bytes, or withheld with its content hash and a Ground that cites its paragraph (trade secret, confidential, third party, not necessary).
    • Each member carries an inclusion proof against one signed tree head.
    • 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 only by appending.

    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 (a MerkleTree, or a CRA FilingChain) and verifies it before returning it.

  • plain_index gives one line per member, for Art. 9(6).

  • crosswalk lists the provisions records bear on: Art. 10(2)(a), (b) and (c); 10(3); 10(4); and Art. 11(2)(b)–(d), read with 4(18) and 7(2)(c) and (e), for model changes. bearing_on picks out a bundle's members for each provision.

    • It is framed as evidence a party can produce and check, not as compliance.
    • Art. 10(5) leaves rebuttal to the court.

Every article cited was checked against the Official Journal text (the Publications Office XHTML).

The module is named product_liability because jouleclaw-runtime already has a pld.rs, for prompt lookup decoding.

Verification (build host)

  • jouleclaw-compliance: 84 tests under --locked, 8 of them new. Nothing depends on the crate.
  • Clippy and rustdoc: clean with -D warnings, including missing_docs.
  • Public-surface scan: passes.
  • One soundness test: a crafted inclusion proof that is valid against the root is refused by the tree-size check. Under a 3-leaf root, leaf 2 proves as "leaf 1 of a 2-leaf tree", so without the check it could 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. They are killed by the tests added for them.
  • Repo checks pass.

With #378 (output commitment and replay) and #382 (weights change record), this completes item #6.

🤖 Generated with Claude Code

Sweep 2026-10-19 item #6, last part. Directive (EU) 2024/2853 applies to products placed on the market after 9 December 2026 (Art. 2(1)). Under it: - A court may order a defendant to disclose relevant evidence (Art. 9(1)). - Disclosure is limited to what is necessary and proportionate (9(3)), with regard to trade secrets and confidential information (9(4), 9(5)), and may be required in an easily understandable form (9(6)). - A failure to disclose leads to a presumption of defect (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: either **disclosed** with its bytes, or **withheld** with its content hash and a `Ground` that cites its paragraph (trade secret, confidential, third party, not necessary). - Each member carries an inclusion proof against one signed tree head. - 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 only by appending. 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` (a `MerkleTree`, or a CRA `FilingChain`) and verifies it before returning it. - **`plain_index`** gives one line per member, for Art. 9(6). - **`crosswalk`** lists the provisions records bear on: Art. 10(2)(a), (b) and (c); 10(3); 10(4); and Art. 11(2)(b)–(d), read with 4(18) and 7(2)(c) and (e), for model changes. `bearing_on` picks out a bundle's members for each provision. - It is framed as evidence a party can produce and check, not as compliance. - Art. 10(5) leaves rebuttal to the court. Every article cited was checked against the Official Journal text (the Publications Office XHTML). The module is named `product_liability` because jouleclaw-runtime already has a `pld.rs`, for prompt lookup decoding. ## Verification (build host) - **jouleclaw-compliance:** 84 tests under `--locked`, 8 of them new. Nothing depends on the crate. - **Clippy and rustdoc:** clean with `-D warnings`, including `missing_docs`. - **Public-surface scan:** passes. - **One soundness test:** a crafted inclusion proof that is *valid against the root* is refused by the tree-size check. Under a 3-leaf root, leaf 2 proves as "leaf 1 of a 2-leaf tree", so without the check it could 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. They are killed by the tests added for them. - **Repo checks** pass. With #378 (output commitment and replay) and #382 (weights change record), this completes item #6. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
c94c53259d
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]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!384
No description provided.