Repository navigation
fix: scope tool activity completion and output to its execution - #3713
Conversation
…gacy completion (Abilityai#3712) merge-train decision, per the merge-train note on the PR. The legacy (unscoped) completion path filtered candidates by provider tool id alone and bailed on ambiguity, so a provider with no execution scope that reuses a tool id sequentially (Gemini) left every later reuse stuck running and the session status stuck at running. Filter to running entries first, then apply the ambiguity rule: the Abilityai#3712 guarantee (never guess between concurrently running executions, never overwrite a completed entry's output) is unchanged, and base behaviour for sequential reuse is restored. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
merge-train note: a train decision pushed to your branch (commit 96c8e55), please acknowledge or push back post-merge. Validation found that the new legacy (unscoped) completion path filters candidates by provider tool id alone and then bails when there is more than one, so a provider with no execution scope that reuses a tool id sequentially (Gemini passes no Two pre-existing things noticed, not touched: |
Fixes #3712.
When concurrent executions reuse a provider tool ID, completing one currently marks the other timeline entry complete, clears both activity slots, and shares output storage. Give execution-scoped timeline entries unique opaque IDs and use execution identity when completing tools. Outputs remain attached to the same IDs used by the existing activity-detail API.
Live Codex and Claude parser call sites pass execution identity. Scoped duplicate completion cannot overwrite completed output. Legacy calls without execution context resolve only a single running match: completed entries do not block sequential ID reuse, while concurrent ambiguous matches are left untouched. This fallback cannot establish ownership for late unscoped events; it does not claim scoped ownership for every runtime.
Validation: stock ownership regression 3 failed / 12 passed; independent activity/Codex/Gemini checks on the current maintainer-updated revision passed 208 cases. These include sequential legacy ID reuse, both scoped parser paths and the actual detail route. No reply-history feature or new API route is introduced. Full unit suite and live UI execution were not run.
Journey Impact: extends: J04
Mutation:
test_reused_provider_tool_ids_keep_completion_and_outputs_execution_scopedandtest_unscoped_completion_does_not_guess_between_execution_ownersreproduce 3 ownership/output failures on stock.