Home

mweinbach / agent-coworker

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

test: re-deliver closed coverage gaps for regressions

open
Stack 2/2
#298 opened by cursor[bot]cursor/missing-test-coverage-42e9→main
Conversation16
cursor[bot]
Commits
16
Files changed17
opened this pull request
Author
· last week

Summary

Re-delivers the high-risk regression coverage from closed-unmerged PRs #294–#297 onto current main. No intentional production behavior changes beyond tiny existing testability seams (__internal / deferred-sync timeout hooks).

Risky behavior now covered

  • Deferred workspace-defaults catch-up — settings saved while control is connecting apply once the session becomes ready (no silent drift).
  • Optimistic new-chat failure cleanup — one-off startup discard/trash, mid-flight draft edit rollback, NewChatLanding unmount abort guard.
  • Runtime integrity mid-verify race — fail closed if runtime trust is invalidated while an entrypoint is being verified.
  • Connected stale thread/list prune — live connected chats are not dropped from a stale list snapshot.
  • setModel stale preferred-child reset — same-provider preferred child cleared when invalid for the new parent.
  • Raw-backed non-replay emit — tool_result/error chunks still emit on raw-backed turns.
  • Attachment-bearing newThread optimistic deferral — no optimistic bubble until attachment prep finishes; pre-resolved still early-optimistic; start-fail never queues IDs.
  • Canvas soft revision / inode identity — sub-second mtime/ctime skew + ino===0 soft match.
  • PI rate-limit no-retry after toolcall/thinking — mapped visible parts block retry (avoids duplicate tool/reasoning).
  • loadConfig preferred-child allowlist — invalid preferred child resets to first allowlisted ref while preserving mode/allowlist.
  • Send-queue opt-out / external sink — shouldSendNotification and external sink routing/cleanup.
  • Canvas save conflict/superseded broadcasts — conflict/superseded saves return schema-valid results with zero fileChanged broadcasts.

Also includes the #296 CI stabilizers: research-readiness desktop bridge install and mobile lockfile refresh for canary Bun.

Test files added/updated

  • apps/desktop/test/workspace-settings-sync.defaults.test.ts
  • apps/desktop/test/new-chat-landing-abort.test.tsx (new)
  • apps/desktop/test/workspace-startup.test.ts
  • apps/desktop/test/control-socket.sessions.test.ts
  • apps/desktop/test/research-readiness.test.tsx
  • test/coworkRuntime.test.ts
  • test/session/agentSession.model.test.ts
  • test/session.stream-pipeline.test.ts
  • test/canvasDocumentPersistence.test.ts
  • test/runtime.pi-rate-limit-retry.test.ts
  • test/config/config.loadConfig.test.ts
  • test/server.backpressure.test.ts
  • test/jsonrpc.workspace-route.test.ts
  • Tiny seams: apps/desktop/src/app/store.actions/workspaceDefaults.ts, src/coworkRuntime/integrity.ts, src/server/canvasDocumentPersistence.ts

Why these tests materially reduce regression risk

These paths sit on cold-start, chat creation, runtime trust, session list sync, model routing, streaming, and canvas persistence — failures look like data loss, ghost messages, silent settings drift, or trusting a mutated runtime. Prior daily coverage PRs that owned these gaps were closed without merge; this consolidates them with the known CI fixes.

Validation

  • Targeted suites: 266 pass / 0 fail
  • bunx biome check on touched files: clean
  • bun run lint: clean
  • bun run typecheck: clean
  • bun run docs:check: OK
  • bun run test: all 673 files passed
Open in Web View Automation 

Cursor Agent and others added 16 commits · 19 hours ago

View commits
  • test: cover deferred workspace defaults catch-up sync1e48b4d
  • test: cover optimistic new-chat failure cleanup pathsc340377
  • test: cover runtime integrity mid-verify generation raceed45461
  • style: fix biome format on integrity race coverage6b15602
  • test: cover stale thread prune, setModel child reset, raw emit
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-42e9

Only the target repository owner can merge this pull request.

Sign in to comment.

Stack

2/2
1

Merge readiness

Ahead16
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.

b22e3e2
  • test: cover canvas soft revision and inode identity matching1ff1cca
  • test: cover rate-limit no-retry after toolcall and thinking parts29196a9
  • test: cover attachment newThread optimistic deferral until prepaa61002
  • test: assert attachment optimistic bubble display text7981e28
  • style: biome-fix canvas and rate-limit coverage testsf1224c6
  • chore: refresh mobile lockfile for canary bun installdb17dfc
  • test: stabilize research-readiness desktop bridge for persiste6bb7ea
  • test: cover stale preferred child allowlist preservation6a9b7b8
  • test: cover send-queue opt-out and external sink routing0cf84a0
  • test: cover canvas save conflict broadcast suppression807d9e4
  • Merge remote-tracking branch 'origin/main' into pr-autosyncb1d0563
  • Update README.md

    #125 mobile-fixes ← main

    Updated 2 months ago

    merged
    2

    test: re-deliver closed coverage gaps for regressions

    #298 main ← cursor/missing-test-coverage-42e9

    Updated 19 hours ago

    open