Untitled conversation
- User
[Reborn WebUI Beta] Add WebUI idempotency and accepted-message ledger Parent tracker: #3607 Module: M2 — Native Product Workflow / Inbound Facade Priority: P0
Goal
Make WebUI mutations idempotent so duplicate browser submits do not create duplicate turns/messages.
Scope
- Use client action id / idempotency key for create-thread and send-message.
- Preserve accepted-message ref/outcome for duplicate requests.
- Handle concurrent duplicate submissions safely.
Acceptance criteria
- Duplicate send returns the same accepted ref/outcome.
- Concurrent duplicate send creates at most one accepted message/turn.
- Failed validation does not create a ghost turn/message.
- Retry after transient unavailable state has deterministic behavior.
- Tests cover same-thread duplicate, cross-thread duplicate rejection, and concurrent duplicate behavior.
Interface
No new interfaces are introduced.
- Assistant
Exploring the codebase to understand how WebUI send-message and create-thread work, then implementing idempotency with an accepted-message ledger.
- Assistant
Reviewing the implementation: idempotency is partially wired, but
source_binding_idincludes the thread, so cross-thread duplicate rejection isn't enforced. Implementing the fix and adding the missing contract tests. - Assistant
Implementing idempotency binding scoped per caller (not per thread) and adding the missing contract tests.
- Assistant
Adding contract tests and enhancing the fake turn coordinator for idempotency replay.
- Assistant
Implemented WebUI idempotency and the accepted-message ledger for #3607. Summary of changes:
Core change (
reborn_services.rs)Split binding scopes so
client_action_iddedupes correctly:webui_idempotency_binding_id— caller-scoped (tenant/user/agent/project), no thread. Used for the accepted-message ledger (replay_accepted_inbound_message+accept_inbound_message).webui_source_binding_id— thread-scoped. Used for turn submissionsource_binding_ref/reply_target_binding_ref.
submit_turnflow:- Replay by before any mutation.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.