pub fn submit_review(
db: &Db,
project: &str,
branch: &str,
summary: Option<String>,
thread_ids: &[String],
) -> Result<ReviewSet>Expand description
Seal a new review for (project, branch): mint its number (existing
count + 1), stamp every still-unfiled user turn on each listed thread
with the new review id, and append the ReviewSet. Turns already
filed never move, so a thread whose earlier turns went into review 1
and whose reply goes into review 2 belongs to both. A thread that
gains a turn this way is Addressed no longer - the agent owes an
answer again - so it flips back to Open; a Resolved / Outdated
thread keeps its state. Agent replies are answers to a round rather
than part of one and are never stamped. One write transaction spans
both tables so the stamp and the append land together.