You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds tests for [area] discovered by hourly test sweep.
220
+
221
+
[Write a clear, well-structured description. Do NOT use a one-liner. Include:]
222
+
223
+
**For each module/file tested, provide:**
224
+
- The module name and source file path
225
+
- WHY it was untested and WHY it matters (what user-facing risk does this cover?)
226
+
- A brief list of the specific scenarios covered (e.g., "push-before-next ordering", "error propagation")
227
+
228
+
**Example format:**
229
+
230
+
**1. `AsyncQueue` and `work()` — `src/util/queue.ts`** (10 new tests)
231
+
232
+
These utilities power streaming result delivery and concurrent task processing. Zero tests existed. New coverage includes:
233
+
- Push/next resolution ordering and async iterator correctness
234
+
- Concurrency limit enforcement in `work()`
235
+
- Error propagation from workers
236
+
237
+
**2. `State.invalidate` — `src/project/state.ts`** (2 new tests)
238
+
239
+
This `altimate_change` clears cached state after config changes. Coverage includes:
240
+
- Invalidated entry is re-initialized on next access
241
+
- No-op on nonexistent key
221
242
222
243
### Type of change
223
244
- [x] New feature (non-breaking change which adds functionality)
@@ -226,7 +247,12 @@ Adds tests for [area] discovered by hourly test sweep.
226
247
N/A — proactive test coverage
227
248
228
249
### How did you verify your code works?
229
-
`bun test test/[path]` — all pass
250
+
251
+
[List each test file and its pass count, e.g.:]
252
+
```
253
+
bun test test/util/queue.test.ts # 10 pass
254
+
bun test test/project/state.test.ts # 7 pass (5 existing + 2 new)
255
+
```
230
256
231
257
### Checklist
232
258
- [x] I have added tests that prove my fix is effective or that my feature works
@@ -247,3 +273,5 @@ Send `shutdown_request` to the critic. Delete the team.
247
273
6.**Critic must approve.** Don't commit tests the critic rejected.
248
274
7.**Check existing tests first.** Run `grep -r "describe.*[feature]" packages/opencode/test/` before writing.
249
275
8.**Branch protection.** Always use a feature branch + PR. Never push to main.
276
+
9.**TUI impact check.** Whenever your tests touch code that feeds into the TUI (session state, config, skills, tools, MCP, provider changes), check whether the TUI could be affected. If so, add or extend E2E tests that exercise the TUI path — e.g., verifying that dialog rendering, skill listing, or config display still work after the change. The TUI is the primary user interface; regressions there are high-visibility. Look at existing TUI tests in `packages/opencode/test/config/tui.test.ts` for patterns.
277
+
10.**PR descriptions must be well-documented.** Never submit a one-liner PR body. Each PR must clearly explain what modules were tested, why they were untested, what user-facing risk the new tests mitigate, and the specific scenarios covered. See the PR template in Phase 5 for the expected format.
0 commit comments