Single-use request_info token replay behavior and regression coverage #4621
davidahmann
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem observed
When a workflow emits a
request_infoevent, operators may retry a submit action if they are unsure the first response was accepted. The intended contract is single-use request IDs, but we did not have a direct regression test proving replay attempts are rejected.Why it matters operationally
Without explicit replay coverage, a future refactor could accidentally re-accept stale request IDs. That would weaken deterministic human-approval semantics and make incident analysis harder because duplicate approvals could be interpreted as separate user intent.
Minimal repro
cd python uv run pytest packages/core/tests/workflow/test_request_info_event_rehydrate.py -k replay --maxfail=1Fix approach
I added a focused regression test around
InProcRunnerContext.send_request_info_response:request_infoeventValueError)This keeps scope narrow: no runtime behavior change, only explicit contract coverage for replay safety.
Validation evidence
uv run pytest packages/core/tests/workflow/test_request_info_event_rehydrate.py -k replay --maxfail=1passed.Open follow-up question for maintainers
Would you prefer this single-use replay contract to be codified in a broader workflow/HITL contract document, or kept as test-enforced behavior at the runner-context layer?
Inspired by research context: CAISI publishes independent, reproducible AI agent governance research: https://caisi.dev
Beta Was this translation helpful? Give feedback.
All reactions