Skip to content

Keep streaming LLM answers ordered across refreshes - #283

Open
codebanditssss wants to merge 1 commit into
AssemblyAI:mainfrom
codebanditssss:audit/round3-cli-summary-order
Open

codebanditssss wants to merge 1 commit into
AssemblyAI:mainfrom
codebanditssss:audit/round3-cli-summary-order

Conversation

@codebanditssss

Copy link
Copy Markdown

Fixes #282

Changes

  • Publish only answers covering more turns than the currently published answer.
    Check/update/render under the session lock; keep the LLM request unlocked.
  • Make closing flush compare published rather than claimed turn coverage,
    so in-flight refreshes cannot leave the saved note missing.
  • Preserve the existing failed-refresh error latch.
  • Add five deterministic ordering/finalization tests and document the
    concurrency invariant in the scoped architecture guide.

Validation

  • Identical regressions: upstream 4 failed/1 passed; fixed 5 passed.
  • Tests cover reversed completions, slow requests crossing the interval,
    unfinished refresh at close, an older failed request, and the real parallel
    source/save-dir flow.
  • Full Linux gate passed: 3,779 tests, 99.51% total coverage, 94% Textual
    coverage, 100% patch coverage, and no surviving diff-scoped mutants.
  • Used the locked Python 3.12 environment and env -u TERM ./scripts/check.sh.
    This host's TERM=dumb causes two unrelated ANSI-output tests to fail;
    both pass with TERM unset. No gate or hook was bypassed.

No macOS hardware, Windows CI, or live provider tests ran. Swift/Homebrew
checks self-skip on this Linux host. Please land through the merge queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overlapping streaming LLM refreshes show and save stale answers

1 participant