Add human WebUI closure of unknown jobs as final closed_unknown state (spec 1.31); bound agent sync restart interval
Rust development slice / linux (push) Failing after 7s

This commit is contained in:
2026-11-17 11:13:36 +01:00
parent 2660f6a88d
commit d6dfd01a9c
11 changed files with 363 additions and 29 deletions
+16 -2
View File
@@ -786,6 +786,14 @@ impl<V: Ed25519Verifier> HelperSync<V> {
validate_decision(row, local, d)?;
if d.unlock {
let bytes = unlock_outcome(row, d, current_boot)?;
if d.outcome_state == "closed_unknown" {
crate::ledger::retain_closure_original(
&tx,
row.grant_id,
&row.outcome_bytes,
&bytes,
)?;
}
let preserve = crate::windows_system_nonstart::preserve_original_unlock(
&tx,
&self.binding,
@@ -1523,6 +1531,7 @@ fn load_rows(
| "failed"
| "cancelled"
| "expired"
| "closed_unknown"
| "running"
),
"UNKNOWN_LOCAL_STATE"
@@ -1610,7 +1619,7 @@ fn load_rows(
fn definitive(row: &LocalAttempt) -> bool {
matches!(
row.state.as_str(),
"succeeded" | "failed" | "cancelled" | "expired"
"succeeded" | "failed" | "cancelled" | "expired" | "closed_unknown"
) && !row.outcome_bytes.is_empty()
}
fn validate_summary(row: &LocalAttempt, a: &AttemptView) -> Result<()> {
@@ -1670,7 +1679,7 @@ fn validate_decision(row: &LocalAttempt, a: &AttemptView, d: &AttemptDecision) -
!d.unlock
|| matches!(
d.outcome_state.as_str(),
"succeeded" | "failed" | "cancelled" | "expired"
"succeeded" | "failed" | "cancelled" | "expired" | "closed_unknown"
),
"UNKNOWN_CANNOT_UNLOCK"
);
@@ -1689,6 +1698,11 @@ fn unlock_outcome(row: &LocalAttempt, d: &AttemptDecision, current_boot: Uuid) -
&& o.state == d.outcome_state,
"ROOT_CANONICAL_UNLOCK_OUTCOME"
);
if bytes != row.outcome_bytes
&& crate::reconcile::operator_closure(&d.reason, &row.state, &o)
{
return Ok(bytes);
}
if bytes != row.outcome_bytes {
ensure!(
row.action == "reboot"