Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mcpx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ jobs:
working-directory: pkgs/mcpx
run: |
for f in permission.test.ts picker.test.ts sampling.test.ts tool-filter.test.ts tools.test.ts v2.test.ts; do
test -f "plugin/opencode/v2/" || { echo "registered v2 test file missing: plugin/opencode/v2/"; exit 1; }
test -f "plugin/opencode/v2/$f" || { echo "registered v2 test file missing: plugin/opencode/v2/$f"; exit 1; }
done
bun test plugin/opencode/v2/

Expand Down
7 changes: 7 additions & 0 deletions pkgs/mcpx/docs/compendium.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,13 @@
"lines": 3,
"note": "docs-history change fragment for #1871 (research and incidental findings chapter); history metadata consumed by the docs-history tooling, not a compendium page"
},
{
"path": "docs/changes/research-and-findings-nix-slice.md",
"chapter": null,
"role": "not-compendium",
"lines": 3,
"note": "docs-history change fragment for #1871 (research chapter nix slice); history metadata consumed by the docs-history tooling, not a compendium page"
},
{
"path": "docs/cli.md",
"chapter": "designs",
Expand Down
110 changes: 55 additions & 55 deletions pkgs/mcpx/docs/environment.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pkgs/mcpx/internal/cli/ssh_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/developing-today/code/pkgs/mcpx/internal/daemon"
"github.com/developing-today/code/pkgs/mcpx/internal/events"
"github.com/developing-today/code/pkgs/mcpx/internal/testsupport"
)

// The ssh transport runs the system ssh binary. These tests put a fake
Expand Down Expand Up @@ -78,7 +79,7 @@ func shimSSH(t *testing.T, sock, logPath string) {
// health check and a server-sent event stream.
func testSocketServer(t *testing.T) string {
t.Helper()
sock := filepath.Join(t.TempDir(), "daemon.sock")
sock := filepath.Join(testsupport.SocketDir(t), "daemon.sock")
ln, err := net.Listen("unix", sock)
if err != nil {
t.Fatal(err)
Expand Down
3 changes: 2 additions & 1 deletion pkgs/mcpx/internal/daemon/authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import (
"testing"

"github.com/developing-today/code/pkgs/mcpx/internal/api"
"github.com/developing-today/code/pkgs/mcpx/internal/testsupport"
)

// A unix-socket connection's principal carries the peer uid the kernel
// reports — on this machine, the test process's own uid.
func TestPrincipalForUnixConnReadsPeerUID(t *testing.T) {
socket := filepath.Join(t.TempDir(), "probe.sock")
socket := filepath.Join(testsupport.SocketDir(t), "probe.sock")
ln, err := net.Listen("unix", socket)
if err != nil {
t.Fatal(err)
Expand Down
3 changes: 2 additions & 1 deletion pkgs/mcpx/internal/daemon/paths_resolve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"testing"

"github.com/developing-today/code/pkgs/mcpx/internal/daemon"
"github.com/developing-today/code/pkgs/mcpx/internal/testsupport"
)

// longState returns a state directory whose in-state socket path exceeds
Expand Down Expand Up @@ -138,7 +139,7 @@ func TestRelocated(t *testing.T) {
if preferred != filepath.Join(state, "daemon-abcdef123456.sock") {
t.Fatalf("preferred = %q", preferred)
}
short := daemon.Paths{State: t.TempDir()}.ForConfig("abcdef123456")
short := daemon.Paths{State: testsupport.SocketDir(t)}.ForConfig("abcdef123456")
if _, relocated := short.Relocated(); relocated {
t.Fatal("short state path must not report relocation")
}
Expand Down
1 change: 1 addition & 0 deletions pkgs/mcpx/internal/e2e/envguard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ var safeMCPX = map[string]struct{}{
"MCPX_SCRIPT_IMPORTS_ON_DYNAMIC": {},
"MCPX_SCRIPT_IMPORTS_ON_MISSING": {},
"MCPX_SCRIPT_LAUNCHER": {},
"MCPX_SCRIPT_LANGUAGE": {},
"MCPX_SCRIPT_ON_ERROR": {},
"MCPX_SCRIPT_ON_SUCCESS": {},
"MCPX_SCRIPT_PREFIX": {},
Expand Down
7 changes: 7 additions & 0 deletions pkgs/mcpx/internal/runner/dispatch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,13 @@ func TestDispatchedWorkdirPolicyAllocatesARunnerDirectory(t *testing.T) {
t.Fatalf("Run(workdir dispatch): %v (stderr %q)", err, stderr.String())
}
got := strings.TrimSpace(stdout.String())
// The child reports its physical working directory (pwd resolves
// symlinks), while t.TempDir hands back the unresolved path: on
// macOS /var is a symlink to /private/var, so compare against the
// resolved root or this fails on every Mac (#10487).
if resolved, err := filepath.EvalSymlinks(root); err == nil {
root = resolved
}
if got == "" || !strings.HasPrefix(got, root) {
t.Fatalf("dispatched workdir run executed in %q, want a directory under WorkRoot %q", got, root)
}
Expand Down