test: exercise packaged MCP workflows end to end - #312
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (11)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds packaged MCP end-to-end tests. The tests install the packed package, launch the installed CLI, exercise legacy and modern MCP workflows, retain failure logs, and document the testing strategy. ChangesPackaged MCP E2E testing
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The packaged MCP test suite and CI integration are mergeable with no identified current risk. Sequence Diagram(s)sequenceDiagram
participant CI
participant PackageTest
participant InstalledCLI
participant MCPClient
participant Workspace
CI->>PackageTest: run pnpm test:e2e
PackageTest->>PackageTest: pack and install repository
PackageTest->>InstalledCLI: launch devspace.js serve
MCPClient->>InstalledCLI: authenticate and call MCP tools
InstalledCLI->>Workspace: read, patch, execute, and restore workspace state
InstalledCLI-->>MCPClient: return MCP results
PackageTest-->>CI: retain logs when tests fail
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 3 files. (7 skipped: 7 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Greptile SummaryThis PR replaces the narrow package-install smoke test with packaged, end-to-end MCP workflow coverage across the existing CI platform matrix.
Confidence Score: 4/5The test-suite changes appear safe to merge after the non-blocking CI action-pinning hardening is considered. The packaged workflow, protocol, persistence, process, and launcher tests align with the underlying contracts; the only accepted concern is the mutable reference used by the new failure-log upload action. Files Needing Attention: .github/workflows/ci.yml
|
| Filename | Overview |
|---|---|
| test/e2e/fixture.ts | Creates isolated Git, configuration, OAuth, server, client, restart, logging, and teardown infrastructure for packaged MCP tests. |
| test/e2e/package.ts | Packs the checkout and installs its artifact once into a temporary consumer for the E2E suite. |
| test/e2e/workflows.test.ts | Exercises packaged workflows across both protocols, including persistence, containment, worktrees, process ownership, authentication, and launchers. |
| .github/workflows/ci.yml | Runs the packaged E2E suite on all matrix platforms and uploads failure logs, but introduces a mutable action reference. |
| package.json | Adds the E2E command, preserves the former package-test command as an alias, and includes E2E sources in typechecking. |
| docs/testing.md | Documents the suite's workflow coverage, prerequisites, retained artifacts, exclusions, and test-authoring guidance. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
CI[CI matrix: Linux, macOS, Windows] --> E2E[pnpm test:e2e]
E2E --> Pack[npm pack]
Pack --> Build[prepack: pnpm build]
Build --> Install[Temporary consumer install]
Install --> Server[Installed devspace server]
Server --> OAuth[OAuth registration and grants]
Server --> Legacy[Legacy MCP SDK client]
Server --> Modern[Modern HTTP MCP requests]
Legacy --> Workflows[Workspace workflows]
Modern --> Workflows
Workflows --> State[Files, Git, SQLite, reviews and processes]
Server --> Restart[Server restart]
Restart --> State
E2E --> Logs[test-results/e2e logs]
Reviews (1): Last reviewed commit: "test: run packaged MCP scenarios in plat..." | Re-trigger Greptile
The existing tests can pass while the installed package, OAuth flow, HTTP transport, or persisted workspace state is broken. This adds a small suite that drives the installed CLI through public MCP requests and checks the resulting files, process output, worktree isolation, and restored reviews across a server restart.
Each scenario owns its server and temporary state; the suite shares one package installation. It replaces the package smoke script and runs on all three existing CI platforms, retaining server logs on failure. Focused lifecycle tests remain useful for failures that need controlled ordering. Live models and host-rendered widgets are outside this suite; ordinary file-tool symlink containment remains tracked separately in #264.
Stacked on #311. Review and merge that cleanup first; this PR targets its branch so the diff contains only the E2E layer.
Summary by CodeRabbit
New Features
Documentation
Chores