Skip to content

runtime/codegen: make activity retries replay-safe#98

Merged
raphael merged 6 commits intomainfrom
fix/transcript-tool-result-contract
Mar 15, 2026
Merged

runtime/codegen: make activity retries replay-safe#98
raphael merged 6 commits intomainfrom
fix/transcript-tool-result-contract

Conversation

@raphael
Copy link
Member

@raphael raphael commented Mar 13, 2026

Summary

  • make hook publishing, stream projection, and registry-routed tool calls use stable logical identities so retried attempts deduplicate instead of duplicating side effects
  • add durable replay boundaries for execute-tool results and restore default retries for hook and execute-tool activities once those contracts are in place
  • preserve Temporal completion/query behavior and generator output around the new retry-safe defaults

Test plan

  • make lint
  • make test
  • go test ./runtime/agent/runtime ./codegen/agent/...

raphael added 4 commits March 13, 2026 08:12
Keep canonical tool result JSON at execution and history boundaries while projecting transcript tool results to semantic content. Enforce result-or-error contracts in the runtime and make replay rebuild the same tool_result shape as live execution.
Make the tool result contract derive error state from planner.ToolResult itself instead of threading a second error parameter through the runtime boundary.
Remove the redundant `CRITICAL:` prefix from runtime error messages while preserving the underlying error text and lock the wording down with focused runtime tests.
Keep Temporal-only timing mechanics behind the engine while preserving canonical run completion and transcript replay across restarts and legacy persisted events.
@raphael raphael changed the title runtime: normalize transcript tool_result content runtime: harden durable workflow contracts Mar 14, 2026
raphael added 2 commits March 14, 2026 15:11
Make inconsistent closed-workflow states fail fast in Temporal status mapping and align the generator goldens with the new activity timeout contract so lint and tests enforce the updated timing semantics.
Use stable hook and tool identities to make retried activity attempts replay their canonical results instead of duplicating side effects, then restore default retries for hook and execute-tool activities.
@raphael raphael changed the title runtime: harden durable workflow contracts runtime/codegen: make activity retries replay-safe Mar 14, 2026
@raphael raphael merged commit c0ed69d into main Mar 15, 2026
2 checks passed
@raphael raphael deleted the fix/transcript-tool-result-contract branch March 15, 2026 00: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.

1 participant