Skip to content

Kept retained external stream tasks with the cache disabled. - #17

Open
moedash wants to merge 2 commits into
moe/AI-198-if-ext-core-4-wake-boundariesfrom
moe/AI-198-if-ext-core-5-zero-cache-retention
Open

moedash wants to merge 2 commits into
moe/AI-198-if-ext-core-4-wake-boundariesfrom
moe/AI-198-if-ext-core-5-zero-cache-retention

Conversation

@moedash

@moedash moedash commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR keeps a retained external stream task alive until its boundary when the workflow cache is off.

What changed?

  • ManagedRun::retains_task_for_external_streams says whether a run still holds its task for external streams, either for a quiescent wait or for buffered output.
  • The zero-cache eviction after an activation skips such a run, the same way it already skips a run waiting on local Activities.
  • A changelog Fixed entry.

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

Why?

Python tests and harness workers often run with caching off. There the eviction forced a shutdown boundary before input readiness could arrive, and then did it again on every replacement task, so the run looped on markers and never read its records. Evicting at the task's normal boundary fixes it.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

Two cases run with a zero-sized cache: a retained stream task accepts readiness and leaves the cache only after its boundary, and a task holding buffered output stays until the flush. The whole Core lib suite passes, and the lints and fmt are clean.

With caching disabled, the eviction after a quiescent activation forced a
shutdown boundary before input readiness could arrive, then repeated it on
every replacement task. Core now waits for the boundary, as it does for
local Activities.
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