fix: preserve signed terminal nonstarts across repeated and restarted sync
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-13 21:06:27 +01:00
parent 6d91988bec
commit 6715add024
6 changed files with 233 additions and 1 deletions
+7 -1
View File
@@ -758,7 +758,13 @@ fn attempts(db: &Connection, ledger: &Connection, binding: &Binding) -> Result<V
|r| Ok((r.get(0)?, r.get(1)?, r.get(2)?, r.get(3)?)),
)
.optional()?;
let mut consumption = if grant_id.is_empty() && state == "accepted" {
// A signed definitive nonstart can make an accepted no-grant row
// terminal without a JobResult. Preserve that fact on the next Sync;
// requesting/running/unknown still cannot claim non-consumption. An
// actual durable consumption row below always overrides this label.
let mut consumption = if grant_id.is_empty()
&& matches!(state.as_str(), "accepted" | "expired" | "cancelled")
{
"unconsumed"
} else {
"uncertain"