Compare commits

..
Author SHA1 Message Date
88e2f24cc6 Test the route-proof report through advance_routing: reported once per reason, cleared on recovery; deadline abort carries the proof's own failure text
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 01:18:38 +00:00
a484a7ec17 Say why the stable route proof failed: journal each distinct reason, keep it in the deadline abort
advance_routing now logs the proof failure (silent, refused with the HTTP
status line, presence not active, authority disagreement) once per distinct
reason, and the Routing deadline abort carries the step's last failure
instead of only the clock. No persisted type or schema changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 18:57:59 +00:00
4 changed files with 74 additions and 990 deletions

View file

@ -390,8 +390,6 @@ read-only command on Yggdrasil on 2026-09-29. Nothing was written to the host.
(`:3670`, `:3715`), and topology refresh (`:3780`). After three refused
continuity restarts, supervision stops restarting (`:3522-3528`) but keeps
supervising the route of a dead incarnation. Read.
Resolved by `cut-liveness-gates-presence`: route challenge and topology
refresh now run only for an incarnation observed running.
- F9. The continuity restart limit counts refused restarts per generation
(`is_refused_restart`, `:3469-3488`). A restart that succeeds admits a new
generation and resets the count. A unit that starts, is admitted, and then

File diff suppressed because it is too large Load diff

View file

@ -762,7 +762,7 @@ impl StaticReleasePort for FilesystemStaticRelease {
binding: &StaticReleaseBinding,
release_id: &str,
) -> Result<StaticFlip> {
use std::os::unix::fs::{OpenOptionsExt, PermissionsExt, symlink};
use std::os::unix::fs::{OpenOptionsExt, symlink};
// Everything up to and including the rename can refuse, and only that
// refuses: the link has not moved when `FlipRefused` is returned.
@ -823,10 +823,6 @@ impl StaticReleasePort for FilesystemStaticRelease {
.create_new(true)
.mode(0o444)
.open(&temporary_carry)?;
// The creation mode is masked by the service's umask
// (UMask=0027 yields 0440), and the web server reads this file
// as "other"; say 0444 on the open handle.
file.set_permissions(fs::Permissions::from_mode(0o444))?;
file.write_all(&bytes)?;
file.sync_all()?;
fs::rename(&temporary_carry, &carried)?;
@ -17049,43 +17045,6 @@ processes 9
Ok(())
}
/// The service runs with UMask=0027, which masks the create mode to 0440
/// and hides the carry from the web user. The umask is process-global, so
/// the proof runs in a child copy of this test binary and no sibling test
/// ever sees it.
#[cfg(unix)]
#[test]
fn static_release_carry_is_0444_under_the_service_umask() -> Result<()> {
use std::os::unix::fs::PermissionsExt;
const CHILD: &str = "IDUNN_TEST_CARRY_UMASK_CHILD";
const NAME: &str = "static_release_carry_is_0444_under_the_service_umask";
if std::env::var_os(CHILD).is_none() {
let path = format!("{}::{NAME}", module_path!().split_once("::").map_or("", |(_, rest)| rest));
let output = std::process::Command::new(std::env::current_exe()?)
.args(["--exact", path.as_str(), "--nocapture", "--test-threads=1"])
.env(CHILD, "1")
.output()?;
assert!(
output.status.success(),
"child under umask 0027 failed:\n{}\n{}",
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
);
assert!(
String::from_utf8_lossy(&output.stdout).contains("1 passed"),
"the child filter matched no test:\n{}",
String::from_utf8_lossy(&output.stdout)
);
return Ok(());
}
unsafe { libc::umask(0o027) };
let site = stand_in_site()?;
FilesystemStaticRelease.carry_and_flip(&site.binding, RELEASE_A)?;
let carried = site.binding.current_link.join("config.json");
assert_eq!(fs::metadata(&carried)?.permissions().mode() & 0o777, 0o444);
Ok(())
}
#[cfg(unix)]
#[test]
fn static_release_missing_site_config_fails_before_the_link_moves() -> Result<()> {

View file

@ -304,7 +304,7 @@ fn lifecycle_brake_status(options: &BTreeMap<String, String>) -> Result<()> {
Ok(())
}
pub(crate) fn replace_lifecycle_brake(path: &Path, record: IdunnLifecycleBrakeRecord) -> Result<()> {
fn replace_lifecycle_brake(path: &Path, record: IdunnLifecycleBrakeRecord) -> Result<()> {
record.validate()?;
let store = SingleFileMessagePackBackingStore::new(path);
let entries = store.pull_all_read_only_snapshot()?;