Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

test: cover desktop rename, log, and cache fail-closed gates

open
Stack 2/2
#351 opened by cursor[bot]cursor/missing-test-coverage-ab14→main
Conversation0
cursor[bot]
Commits
0
Files changed…
opened this pull request
Author
· 3 days ago

Risky behavior now covered

Recent desktop fixes (merged in #349) left a few fail-closed branches untested:

  • A chat title set by another source during a single in-flight rename is left in place when that rename rejects or succeeds. Draft renames stay local when the server rejects them.
  • Leaving the last workspace-watcher subscriber during a restart cancels the restart. A remaining subscriber still gets the replacement watcher.
  • POSIX directories are not treated as launchable programs. A missing file still fails closed.
  • A throwing workspace-root provider does not drop crash logs. An explicit workspace path overrides the default provider. A sync crash-log write swallows a disk failure.
  • Unreadable state.json still resets when the corrupt file cannot be renamed aside.
  • The warm-start snapshot cache skips a selected snapshot that exceeds the byte budget, and still keeps a later smaller snapshot after one that does not fit.

Test files updated

  • apps/desktop/test/jsonrpc-single-connection.test.ts
  • apps/desktop/test/workspace-directory-watcher.test.ts
  • apps/desktop/test/launchable-files.test.ts
  • apps/desktop/test/local-logs.test.ts
  • apps/desktop/test/persistence-state-sanitization.test.ts
  • apps/desktop/test/bootstrap-cache.test.ts

Why this reduces regression risk

These paths decide whether a rename clobbers a newer title, a closed workspace keeps a filesystem watcher, a folder open is treated as executing a program, crash logs leak or vanish, corrupt desktop state is discarded, and one large chat blows the warm-start cache. The new tests fail if those guards are removed. No production behavior changed.

Validation

bun run test on the six touched files: 155 pass, 0 fail. Biome check on those files is clean.

Open in Web View Automation 
This branch can’t be merged automatically yet
Branch comparison failed — verify branches still exist in storage.
0 approving reviews
None yet
Checks
No checks recorded
Fast-forward
Source must contain the target branch tip
main ← cursor/missing-test-coverage-ab14

Sign in to comment.

Stack

2/2
1

Merge readiness

Checking mergeability after the indexing worker computes the current branch state.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.

Update README.md

#125 mobile-fixes ← main

Updated 4 months ago

merged
2

test: cover desktop rename, log, and cache fail-closed gates

#351 main ← cursor/missing-test-coverage-ab14

Updated 3 days ago

open