Warn when the loaded project dylib is stale against the project source #237
Reference in New Issue
Block a user
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?
The project loader loads the cdylib load-and-hold per invocation (crates/aura-cli/src/project.rs:349-403): it shells to
cargo metadata, sha256s the dylib, validates the ABI stamps and the vocabulary charter. Nothing checks staleness: editingsrc/withoutcargo buildsilently runs the previous dylib. Provenance recordsdylib_sha256and a-dirtycommit suffix, but no warning is printed — the run looks current.For the role-2 authoring loop (edit → build → run; C25) this is a silent-wrong-results footgun: a forgotten build produces plausible, stale numbers. A missing dylib already refuses with a "run cargo build in the project first" hint (project.rs:55-60); a stale one says nothing.
Landed as
143c87c(RED: mtime-pinned e2e — dylib stamped 2001, src/lib.rs stamped 2033, run must warn on stderr naming both timestamps while still exiting 0 with a valid report) +e44b0cb(GREEN). The loader compares the newest mtime under src/ + Cargo.toml against the dylib mtime immediately after the existing missing-dylib refusal and prints exactly one warning line, then proceeds unchanged — warn, never refuse, per the acceptance box. Mechanism decided: plain mtime scan (no cargo invocation, no source hashing); date render is a dependency-free Hinnant civil_from_days. All I/O failures in the scan degrade to skip-and-continue so staleness can never escalate into a refusal; the fresh-build inverse (no warning) is unit-pinned. Independent quality review: approved, no gating findings. Closes via commit on merge.