v1
Source Verifications
Source Verifications

Answer Source Verification

Engineer answered one pending question.

Flow:

  1. Look up the pending row by (source_id, question_id) to find its gate_type.
  2. Apply the answer to seg_correspondence JSONB via the gate's apply_answer_fn (registered in gate_registry).
  3. Persist the answer + flip the row's status to 'answered'.
  4. If this was the LAST pending question for the current gate:
    • Look up the next gate in the source's chain.
    • If there's a next gate, dispatch a triage_source job for it (worker runs phase2 triage after phase1 is fully answered, etc.).
    • If there's NO next gate (current gate is last), mark the source verified.
  5. Return shape lets the FE decide whether to surface "next round loading" UI or "all done."

Returns 404 if no pending row matches (source_id, question_id).

patch/api/v1/sources/{source_id}/verifications/{question_id}

Request

  • Base URL
    https://api.jeevyfabrication.com (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Path parameters

source_id, integer required
question_id, string required

Request body

PatchVerificationRequest required

Body for PATCH /sources/{source_id}/verifications/{question_id}.

The answer field carries the chat-card answer envelope — matches the shape _apply_answer_to_seg_correspondence consumes today (see correspondence_phase1.py:929 for the per-type value shapes).

answer, object required

Response

Successful Response

PatchVerificationResponse required

Returned by PATCH .../verifications/{question_id}.

Fields:

  • status — outcome of the apply path ("answered" / "ok_no_assembly" / etc.).
  • remaining_pending — count of pending rows across all gates for this source after the flip. FE uses this to render progress.
  • source_verified — True when this answer caused is_verified to flip (i.e. last gate in chain just finished with zero remaining pending).
  • next_gate_dispatched — gate_type the FE can expect new pending rows from soon (auto-dispatched when this answer ended the current gate but more gates remain). None when no chain advance happened.
status, string required
remaining_pending, integer required
source_verified, boolean
next_gate_dispatched, string nullable

Changes

No recorded changes to this operation across all 56 revisions of this API.