feat: add small route HttpApi coverage#1378
Conversation
|
Warning Review limit reached
More reviews will be available in 3 minutes and 59 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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Root cause: - The e2e-artifacts workflow repeatedly timed out before test execution because `bunx playwright install-deps chromium` downloaded extra apt font packages from the Ubuntu 24.04 hosted runner mirror. - This blocked PR #1378 and PR #1380 at the CI setup layer; their `Run e2e` steps never started. Change: - Use the GitHub-hosted Chrome binary for e2e-artifacts instead of installing Playwright system dependencies in the workflow. - Remove the unused Playwright browser cache/env for this workflow and replace the install-deps step with a bounded Chrome verification step. - Keep the real e2e run, artifact upload, warning step, and aggregate failure reporting intact. - Add a workflow contract test so the PR-gating e2e workflow does not reintroduce `playwright install-deps` or the removed browser cache path. Verification: - `bun test test/config/e2e-artifacts-workflow.test.ts` in `packages/opencode` - `bun run typecheck` in `packages/opencode` - `actionlint .github/workflows/e2e-artifacts.yml` - `git diff --check` - PR CI all green, including e2e-artifacts run 27780806048 / job 82204831558, where `Verify GitHub-hosted Chrome` succeeded and the workflow reached and passed the real `Run e2e` step. Reviews: - Fresh-eye review: no P0/P1 blockers, no P2/P3 findings. - Claude read-only review: no P0/P1 blockers. Non-blocking P2 noted the separate perf-probe baseline workflow still has its own install-deps pattern; this PR intentionally stays scoped to the PR-gating e2e-artifacts blocker. Related to #1378. Related to #1380.
a9d5080 to
bb5f18c
Compare
Add local Effect HttpApi declarations and handlers for the permission and experimental workspace JSON routes while keeping the production server on the existing Hono path. Changes: - Declare and cover GET /permission and POST /permission/:requestID/reply in the local instance HttpApi surface. - Declare and cover POST/GET /experimental/workspace, GET /experimental/workspace/status, and DELETE /experimental/workspace/:id. - Keep POST /permission/__e2e/ask intentionally Hono-only because it is a test-only env-gated route. - Extend route-inventory coverage so this slice and the earlier small-route slice both remain tracked as local HttpApi coverage. - Add focused parity tests for permission/workspace handlers and malformed permission reply JSON. Verification: - Baseline before the slice: focused permission/workspace/router/routing-decision/route-inventory tests passed with 46 tests. - After rebasing onto #1378: bun test test/server/permission-routes.test.ts test/server/workspace-routes.test.ts test/server/workspace-router.test.ts test/server/workspace-routing-decision.test.ts test/server/route-inventory-harness.test.ts passed with 53 tests and 218 expect calls. - git diff --check passed. - GOMAXPROCS=2 bun run typecheck passed from packages/opencode. - Fresh-eye reviews and Claude read-only reviews reported no P0/P1 blockers. Remaining P2/P3 notes were non-blocking helper/test-shape suggestions and were not chased beyond the scoped fixes. - PR CI was green on head 82ccf47, including ci, e2e-artifacts, desktop-smoke, windows-advisory, CodeQL, dependency checks, pr-triage, and CodeRabbit. e2e used GitHub-hosted Chrome, entered the real Run e2e step, and passed. Related to #936.
Summary
Add local Effect HttpApi declarations and handlers for ordinary JSON file, project, memory, and external-result routes.
Why
Related to #936.
This gives the next Hono-to-HttpApi migration slice local coverage without switching the production server off Hono.
Related Issue
Related to #936
Human Review Status
Pending
Review Focus
Please focus on Hono wire-behavior parity for JSON body parsing, project 404 handling, memory safe-mode errors, and route-inventory classification.
Risk Notes
Production server routing is unchanged and remains on Hono in this PR. The new HttpApi schemas use broad
Schema.Anyonly where the current route wire shape is Zod-owned or app-specific and preserving Hono behavior is more important than overstating OpenAPI precision.Skipped checklist items: visible UI/copy check is not applicable; platform/packaging check is not applicable; docs/release/dependency/permission/generated-content checks are not applicable.
How To Verify
Screenshots or Recordings
Not applicable: no visible UI changes.
Checklist
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.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.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.