Skip to content
TheChatArchiveThe Chat Archive
composer-2.5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Untitled conversation

  1. 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.

  2. Assistant

    Exploring the WebUI inbound flow and any existing idempotency patterns so we can add an accepted-message ledger.

  3. Assistant

    Implementing user-scoped idempotency binding (excluding thread) and adding the missing contract tests.

  4. Assistant

    Adding contract tests for idempotency behavior.

  5. Assistant

    Implemented WebUI idempotency and accepted-message ledger behavior in RebornServices.

    Changes

    reborn_services.rs

    • Split binding IDs:
      • webui_idempotency_binding_id — user-scoped (tenant + agent + actor), used as the accepted-message ledger key with client_action_id
      • webui_reply_binding_id — thread-scoped, used for reply routing
    • Replay safety: if a ledger replay targets a different thread than the request, return 409 Conflict instead of creating a second message/turn
    • Send flow: accept_inbound_message stores idempotency under the user-scoped binding; turn submission still uses client_action_id as the turn idempotency key

    reborn_services_contract.rs — new/updated tests

    TestCovers
    duplicate_submit_on_same_thread_replays_same_accepted_message_refSame-thread duplicate returns same ref
    cross_thread_duplicate_client_action_id_is_rejectedCross-thread duplicate → 409, no ghost message
    concurrent_duplicate_submit_creates_at_most_one_message_and_turn8 concurrent submits → 1 message, 1 turn
    retry_after_transient_unavailable_reuses_accepted_message_and_idempotency_keyTransient failure then retry reuses accepted message
    validation_errors_are_stable_and_sanitizedValidation failure creates no turn submission

    create_thread idempotency was already handled via deterministic thread ID generation from client_action_id.

    Behavior summary

    • Duplicate send (same thread): replays AlreadySubmitted with the same accepted ref/outcome
    • Concurrent duplicate: thread-service mutex + turn idempotency → at most one accepted message/turn
    • Cross-thread same client_action_id: rejected with conflict
    • Validation failure: rejected before thread/turn mutation
    • Transient unavailable: message accepted once; retry reuses it and the same idempotency key

    All ironclaw_product_workflow tests pass; clippy is clean.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.