Repository navigation
🤖 tests: cover startReservedAgentTaskLeased paths before the split - #7751
Conversation
Adds taskService.reservedLaunch.test.ts: 12 characterization tests for the paths of TaskService.startReservedAgentTaskLeased that no suite reached. Line coverage of the method goes from 331/369 to 369/369. No production change. The tests drive the launch through the queue drain and createMany, and call the lease wrapper startReservedAgentTask directly only for the pre-identity stamp (no public path builds a plan without an attempt id). They assert the row, the init log, the registered init, the checkout cleanup and the sends. Each test fails under a scratch edit of the branch it covers.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 46.2k tokens (24% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 10s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.0k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 18.7s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts |
Summary
Adds 12 characterization tests for
TaskService.startReservedAgentTaskLeased(the reserved task launch), with no production change. Line coverage of the method goes from 90 % (331 of 369 lines) to 100 %. This is the test PR at the start of stack 10, the last stack of the TaskService recovery and launch path split. A shared-helper PR and the split PRs go on top of it and split the method (CC 65) into named steps.What the tests cover
The new file is
taskService.reservedLaunch.test.ts. Most tests launch through createMany or the queue drain. Two call the lease wrapperstartReservedAgentTaskdirectly, astaskService.attemptAdmission.test.tsdoes, because no public path reaches a row without an attempt id.interruptedbefore the launch runs. A stop latch is held and the write back toqueuedthrows. A row without an attempt id, where the stamp write throws, or where another writer stamps a valid id first.taskIsolation.The tests check row fields and status, init-log starts and exit codes, registered inits, cleanup and sanitize calls, and sends. No test checks log or message text.
Size
512 changed lines, 12 over the 500-line cap that the plan sets for split PRs. This PR adds only one test file. Moving a test to #7755 would restack 8 PRs and re-run every review to save 12 lines, so it stays one PR.
Validation
--rerun-each 10).Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$334.45