Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Code Branches Pull requestsIssuesInsights
main
Home Code PRsIssues

test: cover research input guards, inbox capacity, and reconnect failures

open
Stack 2/2
#308 opened by cursor[bot]cursor/missing-test-coverage-5f6a→main
Conversation8
cursor[bot]
Commits
8
Files changed6
opened this pull request
Author
· yesterday

Summary

Adds focused regression coverage for residual high-risk seams on main that are still untested and not claimed by open coverage PRs #298–#307 (main tip still at fa5c0f68). Also refreshes the canary mobile lockfile and unflakes the calendar-aged composer draft prune assertion.

Risky behavior now covered

  • Research empty-input fail-closed — whitespace-only start / followUp / refinePlan throw before persisting a row or opening a Google stream; refinePlan/approvePlan return null when the research is missing or not awaiting a plan.
  • Refine-plan execution — a pending plan with trimmed user input starts a collaborative stream (input, previousInteractionId, collaborativePlanning: true) and clears planPending.
  • Research JSON-RPC schema — whitespace-only research/start, research/followup, and research/refinePlan prompts are rejected at the protocol boundary.
  • Transcript inbox hard capacity — when a failed projection leaves a pending batch occupying every slot, further appends throw Transcript inbox capacity reached (503); a rejected empty batch (413) does not consume a slot.
  • Reconnect feedback — reconnectThreadWithFeedback reports failure when reconnect cannot start, and when the chat is removed while waiting for connected.

Test files added/updated

  • test/research/research.service.validation.test.ts (added)
  • test/transcriptInbox.capacity.test.ts (added)
  • test/research.schemas.test.ts
  • apps/desktop/test/thread-reconnect.test.ts
  • apps/desktop/test/composer-draft-thread-switch.test.ts (Date.now()-relative prune fixtures)
  • apps/mobile/bun.lock (CI stabilizer)

Why these tests materially reduce regression risk

These paths are stuck-state and data-validation hazards: empty research briefs that would otherwise persist/stream, inbox overflow when projection fails closed, and reconnect UI that can report success after the chat is gone. None duplicate open #298–#307 claims. No production behavior changes.

Validation

  • Targeted new suites green
  • Touched files Biome-clean
  • bun run lint / bun run typecheck / bun run docs:check / bun run check clean
  • Full bun run test: all 674 files passed (Bun 1.4.0-canary)
Open in Web View Automation 

Cursor Agent and others added 8 commits · 17 hours ago

View commits
  • test: cover research input guards, inbox capacity, and reconnect failuresf601d44
  • test: wait for refinePlan stream settlement before closing the dbcc83120
  • test: assert refinePlan runtime input field and always settle the streamf871187
  • test: settle refinePlan streams even when assertions fail2bbde1a
  • style: format coverage tests with biome8c06f32
  • chore: refresh mobile lockfile for bun canary44fe4d0
  • test: keep composer draft prune fixtures within the 30-day max age7f589b2
  • Merge remote-tracking branch 'origin/main' into pr-autosync8d04576
This branch has no conflicts with the base branch
Merging can be performed automatically when you’re allowed to merge and required checks pass.
0 approving reviews
None yet
Checks
No checks recorded
Fast-forward
Ready to merge without a merge commit
main ← cursor/missing-test-coverage-5f6a

Only the target repository owner can merge this pull request.

Sign in to comment.

Stack

2/2
1

Merge readiness

Ahead8
Behind0
Fast-forwardReady

This pull request can be merged without creating a merge commit.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.

Update README.md

#125 mobile-fixes ← main

Updated 2 months ago

merged
2

test: cover research input guards, inbox capacity, and reconnect failures

#308 main ← cursor/missing-test-coverage-5f6a

Updated 17 hours ago

open