open-standards/joule-code/joule-code-rs/crates/joule-code-remediate
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science a16e36cf81
Some checks failed
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Has been cancelled
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Has been cancelled
standards workspaces build + test / jouleclaw-rs (pull_request) Has been cancelled
standards workspaces build + test / aac-rs (pull_request) Has been cancelled
standards workspaces build + test / arl-rs (pull_request) Has been cancelled
standards workspaces build + test / eoc-rs (pull_request) Has been cancelled
standards workspaces build + test / jcp-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (pull_request) Has been cancelled
standards workspaces build + test / joulecontract-rs (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (pull_request) Has been cancelled
standards workspaces build + test / map-rs (pull_request) Has been cancelled
standards workspaces build + test / mesh-rs (pull_request) Has been cancelled
standards workspaces build + test / openpay (pull_request) Has been cancelled
standards workspaces build + test / proof-rs (pull_request) Has been cancelled
standards workspaces build + test / sandbox-rs (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (pull_request) Has been cancelled
standards workspaces build + test / smart-byte-rs (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Has been cancelled
joule-code-remediate: a test's scratch crate builds in its own target directory, whatever CARGO_TARGET_DIR says
With `CARGO_TARGET_DIR` exported, four to eight of the crate's 13 tests
failed. The tests build scratch crates in the temp directory and run the
harness over them, and the harness's `cargo` runs inherit the test process's
environment. Every scratch crate is a package named `scratch` at 0.1.0, and
cargo names its artifacts without the package's path, so under one exported
target directory the concurrent tests' crates built over each other's
artifacts and fingerprints: after one run the shared directory held three
`scratch-<hash>` builds for all thirteen tests' crates. Reproduced here at
7cf1f036 by running the test binary with `CARGO_TARGET_DIR` set to a scratch
directory: 9 passed, 4 failed (`l3_fix_passes_the_same_gates`,
`l3_garbage_is_caught_by_the_gate_and_reverted`,
`shipped_l3_fix_induces_a_skill_that_closes_the_recurrence_without_a_model`,
`failed_gate_reverts_and_never_ships`).

The fix is in test builds only. Under `cfg(test)`, `Harness` carries the
workspace's own `target/`, and every `cargo` run it makes (`clippy`, `clippy
--fix`, `test`, `build`) is handed `--target-dir <workspace>/target` after
the subcommand, which outranks an inherited `CARGO_TARGET_DIR`: each scratch
crate builds where it does with no `CARGO_TARGET_DIR` at all. Production
builds have neither the field nor the flag; `joule-fix` passes cargo its
arguments as before, and the user's environment, `CARGO_TARGET_DIR`
included, decides where it builds.

`verified_fix_end_to_end_ships_with_receipt` now checks both halves: the
arguments a test harness hands cargo carry the flag, and after the run the
scratch crate's own `target/debug` exists.

13/13, three runs each, with and without `CARGO_TARGET_DIR` exported to a
scratch directory, which stayed empty; and `CARGO_TARGET_DIR` exported to
the workspace's own target directory around `cargo test -p
joule-code-remediate`, 13/13. Falsified: compiling the flag out again fails
five with `CARGO_TARGET_DIR` exported (the four above and the end-to-end
test) and one without it (the end-to-end test's argument check). `cargo
clippy --all-targets -p joule-code-remediate` is clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 22:50:32 -04:00
..
examples proof: an absent solver yields Unproved, never a fabricated proof 2026-08-29 05:06:17 -04:00
src joule-code-remediate: a test's scratch crate builds in its own target directory, whatever CARGO_TARGET_DIR says 2026-09-30 22:50:32 -04:00
Cargo.toml joule-code-remediate: the description grades its joules, and the z3 tests never pass silently 2026-09-30 20:10:38 -04:00
formal.example.json joule-code-remediate: ship a formal.json template; make the parse error actionable 2026-06-13 01:56:19 -04:00