Repository navigation
fix(server): release device captures when start fails - #595
Conversation
666ca1c to
db0cbb1
Compare
|
What: Independent review found no actionable findings on db0cbb1. Reviewed the complete three-file diff against f5f8604, Issue #592 and its comments, and relevant registered MCP handlers, sequence validation, capture registration/stop/session retirement, external receipt handling, and AgentDeviceCommand validation.
Proof reused from the task and Issue: both new cases failed before the fix (2 failed, 11 passed); the two focused files passed after the fix (40 passed); the final parameterized registered file passed (13 passed), with unchanged DeviceService source. Targeted lint, formatting, and diff checks were reported passing. I inspected the tests and implementation but did not rerun tests, CI, or live devices; this verdict is an independent code review, not a claim of complete runtime coverage. Elon record: Model: gpt-6.1-sol. Harness: Codex. Verdict: success, no actionable findings. |
Agent work on this PREstimated cost at least $0.17 · 26 responses · 47 sessions · 3.0 h wall time
Flags: 1 human correction · 18 large tool outputs · 1 repeated command · 1 repeated failure · 344 repeated reads · 14 repeated skill loads · 1 session without usage records · 15 unpriced responses Details: snapshot, prices, coverage, counters
Token counters by model (native counter semantics; never added across semantics):
Generated tokens (reasoning and other output are disjoint; other output includes code, tool calls and replies):
Usage by work phase (this task's own responses):
Recorded activity by phase (observations, not separate token bills):
Selected rates (USD per million tokens). These rates value the report at the selected schedule date; they do not establish historical prices or subscription spending.
Other output and reasoning are priced without double counting inclusive native output. Missing rates remain unknown. Local measurement from native records; usage totals are not billing. Updated in place by |
|
What: Independent review passed for db0cbb1 with no actionable findings. Review findings: #595 (comment). Verified the newest review/independent status is success, created by lukemaj on the current PR head. Both new regressions failed before the fix; 40 focused tests passed afterward, followed by 13/13 after converting declarations to parameterized cases. Lint, formatting, and diff checks passed. Agent Observer report: #595 (comment). Measurement gap: that report includes shared sessions from other work and reports incomplete evidence and unknown cost; its aggregate usage/time must not be interpreted as this microfix's isolated consumption. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
db0cbb1 to
a0037e0
Compare
|
What: Fixed the test fixture type error and rebased PR #595 linearly onto current origin/main. Added false values for stdoutTruncated, stderrTruncated, stdoutInvalidUtf8, and stderrInvalidUtf8 to the failed process result. The rebase conflict in docs/map.md retained both main's PR #596 and this fix's #592 / PR #595 references. History contains one task commit above the current base. Verification on the corrected candidate:
Elon recordRequirements and who asked: User requested fixing CI's TS2375, rebasing onto current origin/main, server typecheck, focused tests, lease push, and no merge. |
|
What: Independent exact-SHA review passes with no actionable findings on a0037e0. Reviewed the complete three-file diff against base 14bd851, Issue #592 and its comments, all PR comments, and relevant command callers, sequence validation, registration, stop publication, session cleanup, and external receipt boundaries. Verified the live PR base/head and clean local HEAD match the requested candidate.
Proof reused for this exact candidate from the task and correction comment: server Elon record: Model: gpt-6.1-sol. Harness: Codex. Verdict: success, no actionable findings. |
|
What: APPROVE at exact head Read the complete three-file output of Findings: none.
Proof limits: created the authorized detached worktree at the exact SHA; it had no Requirements and who asked: User requested an independent whole review of PR #595 at the exact SHA, including failure cleanup and the previous TS2375 error. Model: gpt-6.1-sol. Harness: Codex. |
What: Failed device record and trace starts now release their capture registration.
Why: A stale commandCaptures entry rejected later starts on the same session.
So what: Agents can start a fresh capture after failure; maintainer review and merge remain next.
Problem
#592 reports a capture registration left behind when the external start command fails. The next start is rejected with
Capture sequence does not belong to this exact opening.This fixes the existing server component and advances remote device reliability under #379/#383.Change
Upstream main has no commandCaptures or typed record/trace command path; open PR and Issue searches found no matching fix. Details are recorded in the Issue.
Verification
node_modules/.bin/vp test run apps/server/src/device/DeviceCommands.registered.test.tsfailed both new cases at the fresh-start assertion withinvalid_request; 11 existing tests passed.node_modules/.bin/vp test run apps/server/src/device/DeviceCommands.registered.test.ts apps/server/src/device/DeviceService.test.tspassed all 40 tests.Elon record
Requirements and who asked: User requested #592: failed record and trace starts must release registration and allow a fresh start on the same session, with failing-before/passing-after proof.
Deleted: Capture redesign, success-path changes, versioning, and UI/runtime work.
Bottleneck: The stale in-memory registration prevents the next start during sequence validation.
Checked myself: Read #592 and the registration/validation/stop paths, verified #584 merged, observed both regressions fail before cleanup and all 40 targeted tests pass after it.
Closes #592
Model: gpt-6.1-sol. Harness: Codex.