Repository navigation
test(mcpx): effect probe for plugin.headless (#8472) - #13029
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit details
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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: acceb35b49
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| process.env.MCPX_STATE_DIR = state; | ||
| process.env.TMPDIR = root; |
There was a problem hiding this comment.
Isolate the runtime directory before daemon discovery
When running on a host with a live daemon under $XDG_RUNTIME_DIR/mcpx, this setup still discovers the host's sockets: socketDirs() in plugin/core/daemon.ts scans that directory in addition to MCPX_STATE_DIR and TMPDIR. The extra daemon can change the warning to 3 daemons, breaking the positive assertions, or answer /v1/resolve and eliminate the ambiguous warning entirely. Clear XDG_RUNTIME_DIR or point it inside the test's scratch root so both the standalone effect probe and direct Bun runs depend only on the two fake daemons.
Useful? React with 👍 / 👎.
1ccdff3 to
6766cde
Compare
6766cde to
02b6933
Compare
What
One #8472 burn-down slice:
plugin.headlessgets a real effect probe, in the shape of the landed annotate/backend/bin/env/binArgs slices.plugin/opencode/mcpx/headless.test.ts(new) — five bun cases loading the real session plugin over two fake daemons on real unix sockets (the daemon.test.ts arrangement), so boot discovery is ambiguous and the boot warning toast is due. The stub client'sshowToastcalls are the observable:MCPX_PLUGIN_HEADLESS=1→ none; theheadlessoption → none; option cleared → the warning arrives ("2 daemons…");MCPX_PLUGIN_HEADLESS=0→ it arrives; unset everywhere → none (the process-shape default reads headless on a runner's main thread — the CI case the setting exists for).TestPluginHeadlessSuppressesToastsFromTheEnvironmentininternal/e2e/plugin_test.go(runs the bun file; skips fail it); mirror entry ininternal/e2e/effect_test.go(probe map +effectProbeFuncsanchor).plugin.headlessmoved fromEffectExemptionstoEffectProbesininternal/settings/effect.go; exemption pin ratcheted 14 → 13 (rebased over the binArgs slice, which took it 15 → 14); theplugin.headlessline deleted fromfeature_coverage_exemptions.txt.Verification (laptop worktree, on the rebased head)
bun test plugin/opencode/mcpx/headless.test.ts— 5 pass / 0 fail; wholeplugin/opencode/mcpx/dir 18 pass / 0 fail.go test ./internal/settings/ -count=1— ok (guard + ratchet at pin 13).go test ./internal/e2e/ -run TestEffectProbeDeclarationsMatchTheProbesThatExist— pass; the new probe and the sibling env/binArgs probes pass on the merged state.#8472 stays open: the remaining
plugin.*exemptions (discoveryRetry, toolTiming, instructions, tools, remember, daemonTools in flight, disabledTools held) are each their own slice.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.