Skip to content

A growing each joins by its teamwork, and a stop undoes what it stopped - #49

Merged
jithinAB merged 3 commits into
masterfrom
pact-loops/growing-join-and-stop-undo
Nov 21, 2026
Merged

jithinAB merged 3 commits into
masterfrom
pact-loops/growing-join-and-stop-undo

Conversation

@jithinAB

Copy link
Copy Markdown
Contributor

What this fixes

The reference workflow runtime had two gaps against the schema.

  • A growing each ignored its teamwork. With keeps-taking: yes, _Run.taking waited for every item whatever waits-for: said. An item that failed also ended the run, even under if-someone-fails: carry-on.
  • A stop undid nothing. does: stop cancelled a detached run, but did not undo what that run had done. The stops: help says: "What it did is undone as its own undone-by: says."

Changes

  • One join step. taking and branches now settle every finished item or branch through the same step (_Run.joined, _JoinRule).
    • carry-on records a failed item as {"failed": ...} and keeps taking.
    • stop-the-others (the default) stops the run.
    • Once waits-for: is met, the items still running are cancelled and nothing more is taken.
  • The stop's undo. RunRef now carries the detached call's undo (the stage's undone-by: or the action's) and the inputs the call was made with. stop cancels the run, waits for the cancellation to land, then calls that undo with those inputs.
  • Tests. Four new tests in tests/test_forks_stops_and_a_growing_each.py: the rule met, carry-on, the default stop, and the stop's undo.

Tests

  • This file: test_forks_stops_and_a_growing_each.py and test_the_shipped_work_queue_runs.py pass.
  • Full suite (uv run --extra all --extra test pytest --continue-on-collection-errors tests): 36 failed, 3309 passed, 175 skipped, 3 collection errors.
    • The failures are cross-port and documents-desk tests that need the TypeScript port or a local service.
    • The collection errors are module-level skips without a built pact binary.
    • I ran two of the failing files on a clean master checkout and they fail there in the same way. The rest were not re-run on master, but none of the failing files touch workflow_runtime.py.

Downstream

Bud Meta Harness PK-6 already behaves this way. It logs a diverges-from-the-reference line for each of these two points until this change is re-pinned.

🤖 Generated with Claude Code

jithinAB and others added 3 commits November 22, 2026 00:41
keeps-taking settled its items without the stage's teamwork: it waited for every item whatever waits-for said, and a failed item ended the run under if-someone-fails: carry-on. taking and branches now settle through one join step (_Run.joined, _JoinRule). does: stop now undoes the stopped run by its call's undone-by (the stage's or the action's), as the schema's stops: help says, after the cancellation lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… answer first

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m ran first

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jithinAB
jithinAB merged commit 5e5dc19 into master Nov 21, 2026
1 of 2 checks passed
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.

1 participant