Repository navigation
Write the review trace while the review runs - #58
Merged
Merged
Conversation
The trace was buffered in memory and written only once the review finished, so a running review's page in the Console showed no steps even though it polls for them. Each step now queues a write; steps recorded while one is out go in the next, so a busy review sends batches rather than a request per step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3M7tuyQdK2G5ViFDvatmP Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
Code review
Review trace events are now queued for persistence as they are recorded, allowing the Console to observe progress before the review finishes. The added test checks that a trace event is available while the model is still running. Walkthrough (2)
Reviewed Tip Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
A running review's page in the Console showed no live trace. The Console already polls the events endpoint every 5 seconds while a review runs, but
runReviewJobkept every step in memory and wrote them only afterrunReviewreturned (and in the failure path). So the polling had nothing to show until the review finished.Each recorded step now queues a write. Steps recorded while a write is in flight are carried by the next one, so a busy review sends batches rather than one request per step. Writes stay in order and stay off the model's critical path: they chain on the same
pendingWritesas the existingflush, and the finalflush()calls are unchanged.Test plan
review-job.test.ts: the model checks the stored trace while it runs and seesreview.mode. It fails without the change and passes with it.bun run lint,bun run checkandbun run test(483 pass) all pass.Related Console polish: appwrite/appwrite#15879.
Generated by Claude Code