Skip to content

Handle stale_revision as a conflict end-to-end #103

Description

@dasomji

Parent

Review findings on #96.

What to build

When a user submits an answer to a question the agent has since revised, they should see that the question was updated and get the fresh revision, rather than an opaque "request failed with HTTP 400". Android now sends expectedRevision, but the server answers stale_revision with 400 and the client only special-cases 409, so while the state stream is reconnecting the user can keep resubmitting the stale revision.

Return 409 for stale_revision on the server, and have Android (and web, if it doesn't already) respond by refreshing the question and showing a "question was updated" message.

Acceptance criteria

  • Server: stale_revision → 409 with the existing error body; route tests updated
  • Android: 409 stale_revision → refresh + user-facing message, submission re-enabled with new revision
  • Web: behaviour verified (no regression from the status change)
  • Protocol docs note the status code

Blocked by

  • None — can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentReady for an implementation agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions