Skip to content

refactor: finish low-tail tool Effect migration#1393

Merged
Astro-Han merged 1 commit into
devfrom
codex/i936-tool-tail-effect
Jun 19, 2026
Merged

refactor: finish low-tail tool Effect migration#1393
Astro-Han merged 1 commit into
devfrom
codex/i936-tool-tail-effect

Conversation

@Astro-Han

Copy link
Copy Markdown
Owner

Summary

Finish the low-priority tool tail in the #936 Effect migration checklist: question.ts, todo.ts, invalid.ts, and plan.ts.

Changes:

  • Added shared Effect-harness execute coverage for QuestionTool, TodoWriteTool, InvalidTool, and PlanExitTool.
  • Moved PlanExitTool's last-model scan behind a named Effect boundary and switched its synthetic build-agent timestamp to Clock.currentTimeMillis.
  • Updated packages/opencode/specs/effect-migration.md to mark the four tool checklist items complete.

Why

The tool bodies were already mostly Effect-native, but the checklist still had four low-tail items open and there was no single focused test proving their init/execute paths through the current Effect tool framework. This closes that tail without touching HTTP/server, remote, UI, desktop, or registry behavior.

Related Issue

Related to #936

Human Review Status

Pending

Review Focus

Please focus on whether the new tool-tail-effect.test.ts coverage is the smallest useful public-interface proof for these tools, and whether the PlanExitTool Clock.currentTimeMillis change preserves the existing handoff behavior.

Risk Notes

Runtime risk is low: the only production code change is plan_exit moving a synchronous model-history scan into Effect.sync and reading the timestamp from the Effect clock. The migration spec update is factual for this PR only.

Skipped checklist items:

  • Visible UI/manual check: not applicable; no visible UI or user-facing copy changed.
  • Platform/packaging check: not applicable; no platform, packaging, updater, signing, path, shell, or permission surface changed.

How To Verify

bun install --frozen-lockfile: passed
bun test test/tool/question-decoder.test.ts test/tool/external-result.test.ts test/tool/external-result-registry.test.ts test/tool/tool-define.test.ts test/tool/registry.test.ts test/session/todo.test.ts: baseline passed, 94 tests
bun test test/tool/tool-tail-effect.test.ts: RED on plan_exit Date.now vs Effect clock, then passed after the Clock.currentTimeMillis change, 4 tests
bun test test/tool/tool-tail-effect.test.ts test/tool/question-decoder.test.ts test/tool/external-result.test.ts test/tool/external-result-registry.test.ts test/tool/tool-define.test.ts test/tool/registry.test.ts test/session/todo.test.ts: passed, 98 tests
GOMAXPROCS=2 bun run typecheck: passed
git diff --check: passed

Screenshots or Recordings

Not applicable. No visible UI changes.

Checklist

How to use this checklist:

  • Tick a box by replacing [ ] with [x]. Do not edit, add, or remove items.
  • The bot-applied label items can only be honestly ticked AFTER the PR is opened and the labeler / priority-triage bots have run — return to the PR description and tick them then.
  • Most items are required. The few that are conditional are explicitly marked (conditional); for those, leave unticked if they truly do not apply and explain why in Risk Notes. All other items must be ticked before requesting human review.
  • Type label — this PR carries exactly one of bug, enhancement, task, documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.
  • Routing labels — this PR carries at least one of app, ui, platform, harness, ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason> (default is Pending; "not required" is restricted to bot-authored low-risk PRs).
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings. Leave unticked only if no visible UI or copy changed.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant. Leave unticked only if none of those surfaces was touched.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

@Astro-Han Astro-Han added P2 Medium priority upstream Tracked upstream or vendor behavior harness Model harness, prompts, tool descriptions, and session mechanics task Narrow execution, audit, spike, migration, tracking, or upstream follow-up work tech-debt Supplemental cleanup, maintainability, architecture, test, or quality debt context labels Jun 19, 2026
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 9 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a78ae15-e7f8-46b4-b27d-6fae28b4e1bf

📥 Commits

Reviewing files that changed from the base of the PR and between 63122e6 and 30eed97.

📒 Files selected for processing (3)
  • packages/opencode/specs/effect-migration.md
  • packages/opencode/src/tool/plan.ts
  • packages/opencode/test/tool/tool-tail-effect.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/i936-tool-tail-effect

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested priority: P2 (includes non-doc, non-test paths outside the low-risk bucket).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@Astro-Han Astro-Han merged commit 2cabb28 into dev Jun 19, 2026
43 of 45 checks passed
@Astro-Han Astro-Han deleted the codex/i936-tool-tail-effect branch June 19, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

harness Model harness, prompts, tool descriptions, and session mechanics P2 Medium priority task Narrow execution, audit, spike, migration, tracking, or upstream follow-up work tech-debt Supplemental cleanup, maintainability, architecture, test, or quality debt context upstream Tracked upstream or vendor behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant