Home

mweinbach / agent-coworker

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

test: cover mutation gate, Codex interrupt/install, and artifact races

open
Stack 2/2
#306 opened by cursor[bot]cursor/missing-test-coverage-7cf8→main
Conversation4
cursor[bot]
Commits
4
Files changed7
opened this pull request
Author
· 3 days ago

Summary

Adds focused regression coverage for residual high-risk seams on main that are still untested and not claimed by open coverage PRs #298–#305 (main tip still at fa5c0f68). Also refreshes canary mobile lockfile + research-readiness desktop bridge stabilizers, and unflakes a calendar-aged composer draft prune assertion.

Risky behavior now covered

  • Tool mutation-gate wrapping — createRunTurn wraps tool execute with assertCanMutate before the underlying tool runs; rejection blocks side effects.
  • Codex interruptTurn compatibility — prefers turn/cancel, falls back to turn/interrupt when cancel is missing, and rethrows the original cancel error when both fail.
  • Managed Codex install concurrency — concurrent installs for the same version coalesce onto one asset download; a failed in-flight install is cleared so a later retry can succeed.
  • Task artifact baseline race — task/artifact/read recovers when concurrent baseline creation races, and rethrows when concurrent detail remains empty.
  • Task artifact restore guards — refuse restore with no current version; pass the latest version SHA as expectedSha256.

Test files added/updated

  • test/agent.mutation-gate.test.ts (new)
  • test/providers/codex-app-server-client.interrupt.test.ts (new)
  • test/providers/codex-app-server-resolver.concurrency.test.ts (new)
  • test/jsonrpc.task-artifacts-route.test.ts
  • apps/desktop/test/research-readiness.test.tsx (CI stabilizer)
  • apps/mobile/bun.lock (canary lockfile)
  • apps/desktop/test/composer-draft-thread-switch.test.ts (calendar-age flake fix)

Why these tests materially reduce regression risk

These paths sit on cancellation, install, mutation-permission, and artifact integrity boundaries. Silent breakage would leave turns uncancellable across Codex versions, duplicate managed installs under cold-start concurrency, allow cancelled/locked turns to mutate via tools, or overwrite/restore artifacts without SHA safety.

Deliberately avoided duplicating open #298–#305 seams (integrity mid-verify, send-queue, deferred sync timeout, MCP OAuth/retry, preflight Codex gates, etc.).

Validation

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

Cursor Agent and others added 4 commits · 19 hours ago

View commits
  • test: cover mutation gate, Codex interrupt/install, and artifact races3dc2a44
  • test: stabilize research-readiness bridge and canary mobile lockfile7fc3c84
  • test: keep composer draft prune fixtures inside max age18280e3
  • Merge remote-tracking branch 'origin/main' into pr-autosync2ef90fa
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-7cf8

Only the target repository owner can merge this pull request.

Sign in to comment.

Stack

2/2
1

Merge readiness

Ahead4
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 mutation gate, Codex interrupt/install, and artifact races

#306 main ← cursor/missing-test-coverage-7cf8

Updated 19 hours ago

open