AI progress: honest milestone bar from closed JSON contract units

Replace the char-count estimate (EST_OUTPUT_CHARS) with ContractProgress:
points are earned only when real output units complete — first token (5),
each closed contract key / array item (5-90), root closed (95), stored (100).
Reasoning/thinking streams no longer fake progress: the first thinking
delta fires the first-token milestone ('the model is alive') and holds.
Surface the job's tone through ProcessingJobOut/JobInfo so the bar can
label itself 'Summarizing dry wit…'. Test rewritten to pin the new
honest-thinking semantics.
This commit is contained in:
avi 2026-09-18 15:00:04 -05:00
commit 61f2124b1c
6 changed files with 197 additions and 42 deletions

View file

@ -127,6 +127,9 @@ class ProcessingJobOut(ORMModel):
# "transcribing") plus 0-100 progress when known.
stage: str | None
progress: int | None
# The voice a running summarize job is writing in, so the UI can say
# "Summarizing dry wit…" instead of a generic label.
tone: str | None = None
started_at: datetime | None
finished_at: datetime | None
# Queue wait is visible time too: the UI counts it for queued jobs.