Skip to content

[Brook] Named the last completed and failed tasks on a local activity start. - #206

Closed
moetemp wants to merge 1 commit into
moe/brook/v4/c5-no-workflow-task-hooksfrom
moe/brook/v4/c6-local-activity-task-history
Closed

moetemp wants to merge 1 commit into
moe/brook/v4/c5-no-workflow-task-hooksfrom
moe/brook/v4/c6-local-activity-task-history

Conversation

@moetemp

@moetemp moetemp commented Oct 22, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR adds previous_started_event_id = 4 and failed_tasks = 5 to WorkflowTaskAttempt, the dispatching task that each local activity start names.

previous_started_event_id comes from the poll response of the dispatching task. failed_tasks holds the started event ids of the run's WorkflowTaskFailed and WorkflowTaskTimedOut events in history. Core keeps only the last 100 of them per run.

Why?

A Stream write from a local activity sends these facts, so the Store can withdraw the Records of local activities whose workflow task never completed. A failed task before the last completed one is only known by its id, so the list is needed too.

How did you test it?

The core tests of the local activity task check both fields, including a timed out task. The sdk-core unit tests pass.

🤖 Generated with Claude Code

@moetemp

moetemp commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Closing as stale. This layer is folded into the v5 tip, #209, and the upstream review uses one fresh PR instead. Plan: https://www.notion.so/4048fc567738814990b7c796ac28fe3f

@moetemp moetemp closed this Oct 25, 2026
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