diff options
| author | tv <tv@krebsco.de> | 2026-11-08 18:20:13 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-08 19:29:15 +0100 |
| commit | ff9e7c244c270853a8a8f58ee950859866358e1d (patch) | |
| tree | 78070114c1bc0d48814d1ef260d1c8c7a70a92c0 /src/simtest/policy.rs | |
| parent | 96ba15cf1a6f8725f70f429695a5a9661f706eb0 (diff) | |
remake: aborts written as the user who asks; no abort by time
Review 2, N3: 1150 let any member write an abort decision once a remake
had expired a grace period ago, judged by the change's own time, the
writer's word. A member could race the coordinator's legitimate commit
with an abort dated as it liked; both taken, Automerge shows
one, and nodes that acted on the commit split from those that didn't.
The two writers of such aborts are operator requests whose endpoints
already need write on _continuum/remakes: aborting an expired remake
(DELETE /admin/remakes/{id}) and superseding one (POST
/admin/remakes?force=supersede). Both now commit as the user who asks
(the proposal and its vote with them, for a supersede), which the rules
take as one who may write the decision. The clause judging an abort by
its time goes, and with it the time the rules carried. An expired
remake is still aborted through any member, by an operator.
Diffstat (limited to 'src/simtest/policy.rs')
| -rw-r--r-- | src/simtest/policy.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/simtest/policy.rs b/src/simtest/policy.rs index 9f38e44..4162a8c 100644 --- a/src/simtest/policy.rs +++ b/src/simtest/policy.rs @@ -398,7 +398,8 @@ async fn a_strict_swarm() { } /// A remake whose coordinator is gone before it decides, under the policy: once it -/// expired a grace period ago, any member aborts it, and every node takes the abort. +/// expired a grace period ago, any member aborts it, asked by a user who may write +/// remakes, and every node takes the abort. #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn an_expired_remake_aborted_by_any_member() { use crate::transport::sim::LinkParams; @@ -456,7 +457,8 @@ async fn an_expired_remake_aborted_by_any_member() { "b aborts the expired remake", Duration::from_secs(60), move || async move { - let (status, _) = crate::remake::testing::abort(b_ref.clone(), id_ref, None).await; + let (status, _) = + crate::remake::testing::abort_as(b_ref.clone(), id_ref, None, "alice").await; status == StatusCode::OK }, ) |
