Skip to content

Supersede a proposal only by one of the same replay value - #60

Merged
shipmill-romamo[bot] merged 1 commit into
mainfrom
fix/58-replay-never-supersedes-live
Oct 9, 2026
Merged

shipmill-romamo[bot] merged 1 commit into
mainfrom
fix/58-replay-never-supersedes-live

Conversation

@shipmill-romamo

Copy link
Copy Markdown
Contributor

Summary

  • propose() now supersedes an older proposed record only when it has the same replay value as the new decision, besides the same operation, targets and inputs (D-7). Live closes live, a replay closes a replay of the same recording, and nothing crosses between them. Replays of two different recordings don't supersede each other, because the check is plain equality of the field.
  • Decision.same_call() is unchanged. Its only caller is the supersede loop in propose(), and the replay check is added there.
  • A replayed read keeps status ran and its exit code. Its verdict now reads "a read operation's output was played back from the recording X, not run on the hosts; it exited N". cloudfall why keeps its existing replay sentence. Its closing line for a replayed read no longer says "It ran when it was proposed"; it says "Its played-back output exited N: a read operation waits for no approval."
  • No schema change.

Tests

  • test_only_a_proposal_of_the_same_replay_value_supersedes covers 5 cases: live then live, live then replay, replay then live, the same replay twice, and two different replays.
  • test_a_replayed_read_says_its_output_was_played_back, test_a_live_read_keeps_its_verdict and test_a_replayed_read_is_not_told_as_run_on_the_hosts (why).
  • test_a_replayed_decision_since_superseded_is_refused_as_replayed now supersedes the replayed record with a second replay of the same recording. Under D-7 a live proposal no longer closes it.
  • These all pass: uv run ruff check ., uv run mypy, the full uv run pytest (474 passed) and uv run cloudfall config validate --project config/examples.

Fixes #58

🤖 Generated with Claude Code

A replay never closes a live proposal and a live run never closes a
replayed one. A replayed read stays ran, but its verdict and cloudfall why
say its output was played back from the recording, not run on the hosts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shipmill-romamo
shipmill-romamo Bot merged commit 3969377 into main Oct 9, 2026
1 check passed
@shipmill-romamo
shipmill-romamo Bot deleted the fix/58-replay-never-supersedes-live branch October 9, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A replay can supersede a live proposal

0 participants