Skip to content

[Feat] Track settled task outcomes - #778

Merged
brunobergher merged 3 commits into
developfrom
feat/task-settled-analytics-2nry93qij9vmc
Jul 27, 2026
Merged

[Feat] Track settled task outcomes#778
brunobergher merged 3 commits into
developfrom
feat/task-settled-analytics-2nry93qij9vmc

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Bruno Bergher. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

Centralized task_settled capture by task-run ID and extended it to direct cancellation paths. Analytics-disabled deployments now return before loading the task run.

Why this change was made

Anonymous analytics should not perform task-run reads when the deployment has opted out.

Impact

Opted-out deployments perform no task-settlement telemetry work beyond the analytics setting check; enabled deployments keep the same anonymous lifecycle tracking.

@roomote-roomote

roomote-roomote Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

No new code issues found. See task

  • packages/sdk/src/server/lib/task-runs/finish-run.ts:259: task_settled is emitted only from finishRun and selected dequeue/bootstrap paths. Direct terminal cancellations (for example cancelTaskRunDirect used by the no-sandbox stop flow, queue enqueue failures and evictions, and cancelLinearTaskRun) bypass all of them, so canceled runs remain absent from the event despite the new all-outcomes contract. Centralize the terminal emission or cover each direct-cancel writer.

Reviewed ba23875

@brunobergher
brunobergher marked this pull request as ready for review July 27, 2026 07:34
@brunobergher
brunobergher merged commit 0018d7d into develop Jul 27, 2026
16 checks passed
@brunobergher
brunobergher deleted the feat/task-settled-analytics-2nry93qij9vmc branch July 27, 2026 08:05
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.

2 participants