tangle


git clone https://radroots.dev/git/tangle.git
Log | Files | Refs | README | LICENSE

commit 34de2abb3e5e5f9335e3cd1a4a581c6445f353a3
parent 1538b5b847fd83af7c8d56784ac2a9f49038862b
Author: triesap <tyson@radroots.org>
Date:   Sat,  6 Jun 2026 14:28:29 -0700

release: add acceptance validation

- add a release acceptance script for the full validation ladder
- include conformance, abuse, restore, benchmark, guard, and coverage lanes
- assert the script contents and executable bit from a contract test
- keep the full coverage gate as a truthful release blocker

Diffstat:
Acrates/tangle/tests/release_acceptance.rs | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/release_acceptance.sh | 21+++++++++++++++++++++
2 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/crates/tangle/tests/release_acceptance.rs b/crates/tangle/tests/release_acceptance.rs @@ -0,0 +1,57 @@ +#![forbid(unsafe_code)] + +use std::fs; +use std::path::Path; + +#[test] +fn release_acceptance_script_covers_release_candidate_validation_ladder() { + let script_path = Path::new(env!("CARGO_MANIFEST_DIR")) + .parent() + .and_then(Path::parent) + .expect("workspace root") + .join("scripts/release_acceptance.sh"); + let script = fs::read_to_string(&script_path).expect("release acceptance script"); + + for required in [ + "#!/usr/bin/env bash", + "set -euo pipefail", + "scripts/check.sh", + "scripts/test.sh", + "cargo nextest run --workspace", + "cargo test -p tangle --test nip01_conformance", + "cargo test -p tangle --test nip09_conformance", + "cargo test -p tangle --test nip42_conformance", + "cargo test -p tangle --test nip50_conformance", + "cargo test -p tangle --test nip99_conformance", + "cargo test -p tangle --test discussion_conformance", + "cargo test -p tangle --test moderation_conformance", + "cargo test -p tangle --test commerce_privacy_conformance", + "cargo test -p tangle --test abuse_conformance", + "cargo test -p tangle --test run_integration", + "cargo test -p tangle_runtime runtime_restore_command_imports_backup_and_rebuilds_projection_state", + "cargo test -p tangle_bench", + "cargo test -p tangle --test source_comments", + "cargo test -p tangle --test unsafe_code", + "scripts/coverage.sh", + ] { + assert!( + script.contains(required), + "release acceptance script is missing `{required}`" + ); + } + + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + + let mode = fs::metadata(&script_path) + .expect("script metadata") + .permissions() + .mode(); + assert_ne!( + mode & 0o111, + 0, + "release acceptance script must be executable" + ); + } +} diff --git a/scripts/release_acceptance.sh b/scripts/release_acceptance.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail + +scripts/check.sh +scripts/test.sh +cargo nextest run --workspace +cargo test -p tangle --test nip01_conformance +cargo test -p tangle --test nip09_conformance +cargo test -p tangle --test nip42_conformance +cargo test -p tangle --test nip50_conformance +cargo test -p tangle --test nip99_conformance +cargo test -p tangle --test discussion_conformance +cargo test -p tangle --test moderation_conformance +cargo test -p tangle --test commerce_privacy_conformance +cargo test -p tangle --test abuse_conformance +cargo test -p tangle --test run_integration +cargo test -p tangle_runtime runtime_restore_command_imports_backup_and_rebuilds_projection_state +cargo test -p tangle_bench +cargo test -p tangle --test source_comments +cargo test -p tangle --test unsafe_code +scripts/coverage.sh