Skip to content

fix(chat): read each Grok transcript with one stat; finish every QA cleanup step - #810

Merged
devswha merged 1 commit into
mainfrom
fix/grok-review-followups
Oct 11, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/grok-review-followups

Conversation

@devswha

@devswha devswha commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Follow-up to #777's remaining CodeRabbit review threads (resolved after this lands):

  • server/grok.ts: grokProjection reuses the caller's stat instead of a second statSync, so an append between the two can't make the read inconsistent.
  • scripts/grok-chat-browser-qa.ts: every cleanup step runs even if an earlier one throws, and the original failure is kept.

Checks: typecheck, test:unit (2654 pass), grok-chat-browser-qa via check run, api contract (Grok conversation API). Cross-model review: PASS.

…leanup step

Follow-up to #777 review threads: grokProjection reuses the caller's stat instead of a second statSync (append race), and grok-chat-browser-qa runs every cleanup step and keeps the original failure.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 664cf062-5b97-4fb3-9265-cc92f373719c

📥 Commits

Reviewing files that changed from the base of the PR and between 78c5802 and 9a3a191.


📒 Files selected for processing (3)
  • scripts/grok-chat-browser-qa.ts
  • server/conversation.ts
  • server/grok.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.



📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved cleanup after browser-based checks: remaining resources are still closed if one cleanup step fails, and cleanup errors are reported without masking the original failure.
    • Improved detection of changes to Grok conversation transcripts, helping keep displayed conversation data up to date.

Walkthrough

The browser QA script now continues cleanup after individual teardown failures. Grok projection now receives full file stat results from its callers.

Changes

Browser QA cleanup

Layer / File(s) Summary
Independent teardown
scripts/grok-chat-browser-qa.ts
Cleanup attempts each resource teardown independently. It logs collected cleanup errors and sets the process exit code to 1 without replacing an earlier failure.

Grok projection stat handling

Layer / File(s) Summary
Pass full stat to Grok projection
server/grok.ts, server/conversation.ts
grokProjection receives the full stat result and uses it for size, file identity, and change detection. The transcript stream, revision check, and tool output pass the full stat result.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~15 minutes

Change: Bug fix

Suggested reviewers: infowolfe


Merge Risk: ⚪ Minimal · up to 9a3a1

QA cleanup continues after an individual teardown failure, and Grok projection reuses the caller’s file metadata. No actionable merge risk is established; the change is mergeable subject to normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely summarizes both primary changes: reusing one transcript stat and completing all QA cleanup steps.
Description check Passed The description explains the problem and resulting behavior, and it lists relevant validation results, including typecheck, unit tests, the QA check run, and the Grok conversation API contract. It doe…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha
devswha merged commit cf2739a into main Oct 11, 2026
17 checks passed
@devswha
devswha deleted the fix/grok-review-followups branch October 11, 2026 13:45
devswha added a commit that referenced this pull request Oct 11, 2026
## Change

Release 0.4.7, from main at 80ca9bb (47 PRs since v0.4.6).

- `package.json` and `herdr-plugin.toml`: 0.4.7.
- CHANGELOG: `[Unreleased]` becomes `[0.4.7] - 2026-10-12`, with the
compare links.
- #513's entry moves out of the 0.4.0 section, where its branch's merge
left it, and gets its credit; it says the pace is a setting, off by
default (#834).
- A Maintenance section covers the PRs that had no entry: #743, #756,
#767, #795, #805, #810, #813, #821, #826, #831.
- The note under the Hermes entry that asked for a runtime bump at
release now says what a remote PC needs.
- `release-summaries.json`: 0.4.7 in en/ko/ja/zh/tr (6 new, 6 improved,
5 fixed). The Turkish lines are not checked by a native speaker.
- `REMOTE_BUNDLE_VERSION` 25 -> 26. Since v0.4.5's runtime the bridge
gained Hermes transcripts (#604), conversation pushes (#689) and
Grok/Antigravity activity (#816), so `remote-v26` is published before
the app release.

Not in this release: #606.

## Validation

- `bun scripts/release-notes.ts 0.4.7` renders the summaries and the
full changelog (235 lines).
- `bun run typecheck` and `bun run build`: pass.
- `TMPDIR=/tmp bun run test:unit`: one failure, `server/voice.test.ts`
("audio.webm" vs "clip.webm"), which fails the same way on unmodified
`main` on this Mac (Bun 1.4.0); CI runs Bun 1.4.2.
- Every PR merged since v0.4.6 was checked against the changelog
section: all 47 are linked.

## Release

After this merges and its CI on `main` passes: push `remote-v26`, wait
for its release, then run the Release workflow with `0.4.7`.
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.

1 participant