From ff9e7c244c270853a8a8f58ee950859866358e1d Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2026 18:20:13 +0000 Subject: 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. --- src/simtest/policy.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/simtest') 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 }, ) -- cgit v1.3.1