The GitHub Actions job "Build Burr" on 
burr.git/fix/761-mapstates-stale-replay-on-resume has failed.
Run started by GitHub user elijahbenizzy (triggered by elijahbenizzy).

Head commit for run:
fd0bf5533e5db9a2a4ddadd1a7a19041bc219d68 / Elijah Ben Izzy 
<[email protected]>
fix(parallelism): salt sub-app IDs with sequence_id to prevent stale replay 
(#761)

Sub-application IDs in `TaskBasedParallelAction` (and its subclasses
`MapStates`, `MapActions`, `MapActionsAndStates`) were deterministic in
`(parent_app_id, i, j)` only, with no per-invocation discriminator. When
the parent application was built with `initialize_from(...)`, the
cascaded state initializer would, on the second invocation of the same
parallel action, see a sub-app ID matching the first invocation's
persisted state and silently hydrate it instead of re-running the
action. The result: every invocation after the first replayed the first
invocation's outputs.

Fresh runs (no `initialize_from`) were unaffected because the cascaded
initializer was None, so sub-apps never tried to load existing state
even though their IDs still collided.

Fix: in `TaskBasedParallelAction.run_and_update`, salt each task's
`application_id` with the parent context's `sequence_id` (which
increments per parent action step, so it uniquely identifies a given
invocation). Applied via a small `_salt_task_app_id` helper in both the
sync and async generator paths so all subclasses inherit the fix
without needing to override `tasks()`.

Also adds a regression test that exercises the full failure mode:
builds an app with `initialize_from(...)` and a `MapStates`, invokes it
three times, and asserts the per-invocation outputs differ.

Note: this changes sub-app IDs across versions for any
`TaskBasedParallelAction` subclass; persisted sub-app state from the
old scheme will not be matched by the new IDs.

Report URL: https://github.com/apache/burr/actions/runs/25842525157

With regards,
GitHub Actions via GitBox

Reply via email to