fix(server): use asSome for initial worktree measurement#25206

merged1
main
fix/storage-cleanup-as-some
opened4d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

Storage cleanup retained an Effect.map(Option.some) call after mapSomeToAsSome became an error. Replace it with the equivalent Effect.asSome operation; the timeout branch is unchanged.

Follow-up to #25078.

Validation: vp run check:changed passed, including formatting, lint, Knip, GraphQL, affected typechecks, and the adjacent storage cleanup tests.

Implemented with GPT-6.1 Sol through the Codex harness.

Checks

23 successful · 13 skipped
All checks passed
51ed88b

Added 1 commit

  • fix(server): use asSome for initial worktree measurement51ed88b
Synced from GitHub

Approvability

Verdict: Approved at 51ed88b

Macroscope's review found this PR approvable — This is a one-line, behavior-preserving replacement of Effect.map(Option.some) with the equivalent Effect.asSome in server-side worktree measurement. It introduces no new capability, default change, schema impact, or static-analysis suppression.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
CodexLive turn messages220 (0.0%)8✅
ClaudeTotal thread wire5.0 KiB5.0 KiB−31 B (−0.6%)6.8 KiB✅
ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB−31 B (−2.5%)2.0 KiB✅
ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB−41 B (−0.2%)29.3 KiB✅
ClaudeLive turn messages21−1 (−50.0%)8✅

Baseline: b16728a · PR result: 51ed88b · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between b16728af846ab00903867737f80bbd4d75cf973d and 51ed88b415ce5bb613337556d2ab281c8a72aee8.

External image Files selected for processing: 1
  • apps/server/src/storageCleanup.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Walkthrough

The initial orphan-worktree measurement now uses Effect.asSome to wrap its result. Subsequent measurements continue to use the remaining-budget timeout.

Changes: Orphan worktree measurement

Layer / File(s)Summary
Initial measurement option wrapping
apps/server/src/storageCleanup.ts
The first measureWorktree effect uses Effect.asSome instead of Effect.map(Option.some). Later measurements continue to use the remaining-budget timeout.

Priority: External image Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#25078: Migrates Effect.map(Option.some) call sites to Effect.asSome, including the same API replacement used here.

Suggested labels: bugfix, size:XS

Suggested reviewers: maria-rcks

Merge Risk: External image Minimal · up to 51ed8

No actionable merge-blocking risk was identified in this focused change.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description states the problem: an Effect.map(Option.some) call remained after mapSomeToAsSome became an error. It states the change: replace it with Effect.asSome, with the timeout branch unchang…Add a Scope and approval section. Link the triaged bug issue or maintainer discussion. If none exists, explain why this very small, focused fix of an obvious bug qualifies without prior approval. Expand Verification with the focused tests r…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title names the actual change: the first orphan-worktree measurement in storage cleanup now uses Effect.asSome in place of mapping the result to Option.some. It uses the conventional commit format…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the actual change: the first orphan-worktree measurement in storage cleanup now uses Effect.asSome in place of mapping the result to Option.some. It uses the conventional commit format and matches the summary and objectives. The title does not mention the follow-up context, but it does not need to.

Full details: Description check

Explanation

The description states the problem: an Effect.map(Option.some) call remained after mapSomeToAsSome became an error. It states the change: replace it with Effect.asSome, with the timeout branch unchanged. It links the follow-up PR and reports validation through vp run check:changed. The template's Scope and approval section is not addressed. The author gives no linked triaged issue or maintainer approval, and no reason why this small fix qualifies without one. The Verification section gives a command result but no focused test names or observed behavior for the changed path. The author also left the template's agent-attribution line in a filled form, which is acceptable.

Resolution

Add a Scope and approval section. Link the triaged bug issue or maintainer discussion. If none exists, explain why this very small, focused fix of an obvious bug qualifies without prior approval. Expand Verification with the focused tests run and the observed result for the first worktree measurement path. State anything not checked.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.