Home

mweinbach / agent-coworker

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

test: cover send-queue, rate-limit abort, and attestation gaps

open
Stack 2/2
#301 opened by cursor[bot]cursor/missing-test-coverage-deae→main
Conversation6
cursor[bot]
Commits
6
Files changed11
opened this pull request
Author
· last week

Summary

Adds focused regression coverage for residual high-risk seams on main beyond open coverage PRs #298–#300. No intentional production behavior changes.

Risky behavior now covered

  • SocketSendQueue failure paths — send === -1 queuing, non-serializable payload drops (serializationFailures), ws.send throws (sendFailures, no queue), and flush that drops a failing head then continues draining.
  • Deferred tool-arg projection — partial tool_input_delta never publishes args during input-streaming; late deltas after terminal tools leave outbound/terminal args unchanged.
  • 16ms micro-batch timer flush — rapid assistant deltas coalesce without a text_end boundary.
  • Codex app-server client hang recovery — request timeout rejects without hung waiters; process exit rejects in-flight requests with pending method context.
  • setModel while busy — mid-turn model switch emits busy and leaves the model unchanged.
  • Windows sandbox setup write soft-fail — blocked destination .sandbox does not throw or claim an update.
  • PI rate-limit abort gates — mid-attempt abort wins over retry; cancel-shaped messages skip retry; stopReason=aborted with a rate-limit message still retries; lifecycle-only parts remain retryable.
  • Rate-limit classifier edges — response.statusCode, cause-over-lastError, depth-4 chain cap, and maxRetries NaN/Infinity/negative/fractional sanitization.
  • Cold-start MCP close errors — close failures during sibling abort are logged and do not mask the original failure.
  • Runtime attestation binds — incomplete or foreign-signature .verified.json fail closed on the verify fast path and are rewritten after a successful re-verify.

Test files added/updated

  • test/server.backpressure.test.ts
  • test/jsonrpc/projectors/assistant-segments.test.ts
  • test/jsonrpc/projectors/tool-reuse.test.ts
  • test/providers/codex-app-server-client.test.ts
  • test/session/agentSession.model.test.ts
  • test/platform/windowsSetupSync.test.ts
  • test/runtime.pi-rate-limit-retry.test.ts
  • test/agent.test.ts
  • test/coworkRuntime.test.ts
  • apps/desktop/test/research-readiness.test.tsx (desktop bridge CI stabilizer)
  • apps/mobile/bun.lock (canary Bun frozen-lockfile stabilizer)

Why these tests materially reduce regression risk

These paths sit on shared concurrency, trust, and transport seams: dropped WS frames under send failure, duplicated/stale tool cards from deferred-arg regressions, stuck Codex turns after timeout/exit, mid-turn model corruption, silent Windows DPAPI setup desync, duplicate assistant output from abort/rate-limit mis-gating, and signed-runtime trust caching that must not accept incomplete/foreign attestations.

Deliberately avoids duplicating open #298/#299/#300 seams (integrity mid-verify/mid-hash, MCP collisions, idle eviction, canvas route conflict, Responses history, deferred defaults, etc.).

Validation

  • Targeted coverage suites + platform-boundary ratchet green
  • Touched files Biome-clean (biome check)
  • bun run lint, bun run typecheck, bun run docs:check clean
  • Full bun run test: all 672 files passed (Bun 1.4.0-canary)
Open in Web View Automation 

Cursor Agent and others added 6 commits · 19 hours ago

View commits
  • test: cover send-queue failures, stream projection, and auth/setup edgesf95989b
  • test: cover rate-limit abort gates and attestation binds39c6304
  • test: assert mid-attempt abort wins over rate-limit retry6034f03
  • chore: refresh mobile lockfile and research-readiness bridgebd4e529
  • test: use platform scratch roots in codex client tests693c5bc
  • Merge remote-tracking branch 'origin/main' into pr-autosyncf9ff774
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-deae

Only the target repository owner can merge this pull request.

Sign in to comment.

Stack

2/2
1

Merge readiness

Ahead6
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 send-queue, rate-limit abort, and attestation gaps

#301 main ← cursor/missing-test-coverage-deae

Updated 19 hours ago

open