Skip to content

Aborted a dead output stage when the Worker evicts its run. - #50

Open
moedash wants to merge 4 commits into
moe/AI-198-if-pyext-13-redis-standalone-streamsfrom
moe/AI-198-if-pyext-14-eviction-settle
Open

moedash wants to merge 4 commits into
moe/AI-198-if-pyext-13-redis-standalone-streamsfrom
moe/AI-198-if-pyext-14-eviction-settle

Conversation

@moedash

@moedash moedash commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR aborts a rejected task's staged output when the Worker evicts its run.

What changed?

  • On eviction the Worker asks History about each stage the run left pending. A stage whose task History failed or timed out is aborted. A stage History committed stays pending for the client's repair, as before.
  • A Redis replay case: a batch staged for a rejected task leaves the shared log once the run is evicted.

Part of AI-198 (epic AI-37).

Why?

A completion the server rejects leaves its batch under a token no marker will ever name. Before this, nothing settled it until a reader hit the barrier. On a provider whose workflow and producers share one log, those entries count against every window. This change is worker code, but its only test needs the Redis provider's shared log, so it sits after the Redis PRs.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

poe lint is clean. The external stream suite passes on the dev server. The streams suite with STREAMS_LIVE=redis passes against a channel server and a local Redis, with the linked kind on and off.

A completion the server rejects leaves the batch it staged under a token no
marker will name. When History already says the task failed, the Worker aborts
that stage at eviction instead of leaving it for a reader to find. A stage
History committed stays pending for the client's repair.
A batch staged for a rejected task leaves the shared log once the Worker
evicts the run, so an outside reader never meets it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Changelog entry rides another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant