Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,11 @@ jobs:
# ── varve-native release signature (DD-009 / REQ-SELF-001) ─────────
# A DSSE envelope over SHA256SUMS.txt with the PulseEngine root key,
# so `varve self-verify` can check a release offline against the same
# pinned root that verifies layers. Activates when the root ceremony
# provisions the VARVE_ROOT_KEY secret (the v1.0 gate); until then the
# step reports loudly that the asset is absent — a missing artifact is
# visible to consumers, unlike a silently-skipped gate.
# pinned root that verifies layers. VARVE_ROOT_KEY arrives with the
# root ceremony (the v1.0 gate); until then the provisional rolling key
# signs. Every run of this workflow is a release build, and a release
# without the envelope fails closed in every consumer's self-update, so
# a missing key fails the run here instead (#366).
- name: Sign SHA256SUMS with the varve root (DSSE)
env:
VARVE_ROOT_KEY: ${{ secrets.VARVE_ROOT_KEY }}
Expand All @@ -642,9 +643,9 @@ jobs:
SIGNING_KEY="$VARVE_ROLLING_KEY"; KEY_ID=varve-rolling-1
echo "::notice::release sums signed with the PROVISIONAL rolling root (ceremony pending)"
else
echo "::warning::no signing key provisioned — release ships without \
SHA256SUMS.txt.dsse.json; varve self-update/self-verify will fail closed on it."
exit 0
echo "::error::no signing key provisioned (VARVE_ROOT_KEY or VARVE_ROLLING_KEY); \
refusing to publish a release without SHA256SUMS.txt.dsse.json."
exit 1
fi
cargo build --release -p varve
# File descriptor, never a file (REQ-NOKEYDISK-001) -- see the same
Expand Down
26 changes: 26 additions & 0 deletions crates/varve/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8928,6 +8928,31 @@ fn a_refused_tool_nothing_provides_says_so_and_still_exits_1() {
// ---------------------------------------------------------------------------

#[cfg(unix)]
/// Wait until a binary this test just wrote can be exec'd. While the copy's
/// write descriptor is open, another test thread may fork, and the child holds
/// that descriptor until its own exec closes it; exec'ing the copy in that
/// window fails with ETXTBSY ("Text file busy", seen on #369's CI). Only that
/// error is retried, for at most 5 s; anything else fails at once.
#[cfg(unix)]
fn wait_until_executable(path: &std::path::Path) {
const ETXTBSY: i32 = 26;
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5);
loop {
match std::process::Command::new(path)
.arg("--version")
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.status()
{
Ok(_) => return,
Err(e) if e.raw_os_error() == Some(ETXTBSY) && std::time::Instant::now() < deadline => {
std::thread::sleep(std::time::Duration::from_millis(20))
}
Err(e) => panic!("cannot exec {}: {e}", path.display()),
}
}
}

fn write_executable(path: &std::path::Path, body: &str) {
use std::os::unix::fs::PermissionsExt;
std::fs::create_dir_all(path.parent().unwrap()).unwrap();
Expand Down Expand Up @@ -10195,6 +10220,7 @@ fn a_wrapper_script_around_a_second_varve_ends_in_a_loop_error_not_a_hang() {
let second = fx.root.with_file_name("varve2");
std::fs::create_dir_all(&second).unwrap();
std::fs::copy(&real, second.join("ghost")).unwrap();
wait_until_executable(&second.join("ghost"));
let wrapper = fx.root.with_file_name("wrapper-bin");
write_executable(
&wrapper.join("ghost"),
Expand Down
Loading