GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx(testsupport): one parser for MCPX_TEST_REQUIRE, and enforce every listed entry (#6904) by dezren39 · Pull Request #7696 · developing-today/code

mcpx(testsupport): one parser for MCPX_TEST_REQUIRE, and enforce every listed entry (#6904) #7696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
dezren39 merged 2 commits into main from queue/11303-6904-mcpx-test-require-parser
Nov 10, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

mcpx(testsupport): one parser for MCPX_TEST_REQUIRE, and enforce every listed entry (#6904) #7696

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
dcbdc27
mcpx(testsupport): one parser for MCPX_TEST_REQUIRE, and enforce ever…
Nov 8, 2026
bed8f27
mcpx(testsupport): suite check honors real-server resolution from MCP…
Nov 10, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
mcpx(testsupport): suite check honors real-server resolution from MCP…
…X_REAL_SERVERS_DIR (#6904)
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

repo-worker-code-k
repo-worker-code-k committed Nov 10, 2026
commit bed8f2734c4cab3dfc9957ddab597a3ad077b0a3

There are no files selected for viewing

33 changes: 27 additions & 6 deletions 33 pkgs/mcpx/internal/testsupport/require.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,43 @@ func RequiredBinaries() map[string]bool {
return out
}

// MissingRequiredBinaries returns the required binaries that are not on
// PATH, sorted. It is the suite-level check (#6904): per-test enforcement
// only covers entries that some test happens to pass to RequireBinary, so
// an entry with no consumer -- python3 in CI's list -- would otherwise be
// enforced by nothing and narrow the run silently.
// MissingRequiredBinaries returns the required entries that are not
// available, sorted. It is the suite-level check (#6904): per-test
// enforcement only covers entries that some test happens to pass to
// RequireBinary, so an entry with no consumer -- python3 in CI's list --
// would otherwise be enforced by nothing and narrow the run silently.
//
// An entry is available when it is on PATH, or when it names a real
// server that resolves under MCPX_REAL_SERVERS_DIR: entries name real
// servers as well as runtime binaries (see requireList), and RealServer
// resolves those from the configured directory, not from PATH, so
// demanding PATH presence for them would reject a valid configuration.
func MissingRequiredBinaries() []string {
var missing []string
for name := range RequiredBinaries() {
if _, err := exec.LookPath(name); err != nil {
if !requiredEntryAvailable(name) {
missing = append(missing, name)
Comment thread
dezren39 marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

}
}
sort.Strings(missing)
return missing
}

// requiredEntryAvailable reports whether a required entry can be
// satisfied in this environment: on PATH as a runtime binary, or under
// MCPX_REAL_SERVERS_DIR as a real server (realServerPath's layouts).
func requiredEntryAvailable(name string) bool {
if _, err := exec.LookPath(name); err == nil {
return true
}
if dir := os.Getenv("MCPX_REAL_SERVERS_DIR"); dir != "" {
if _, ok := realServerPath(dir, name); ok {
return true
}
}
return false
}

// MissingRequired reports whether name is missing from PATH while
// MCPX_TEST_REQUIRE names it -- the one case where a test that cannot run
// must fail rather than skip or continue past the gap.
Expand Down
2 changes: 1 addition & 1 deletion 2 pkgs/mcpx/internal/testsupport/require_suite_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ import (
// even when no individual test names it.
func TestRequiredBinariesAreOnPath(t *testing.T) {
if missing := MissingRequiredBinaries(); len(missing) > 0 {
t.Fatalf("MCPX_TEST_REQUIRE lists binaries that are not on PATH: %s", strings.Join(missing, ", "))
t.Fatalf("MCPX_TEST_REQUIRE lists entries that are not available (on PATH or under MCPX_REAL_SERVERS_DIR): %s", strings.Join(missing, ", "))
}
}
21 changes: 21 additions & 0 deletions 21 pkgs/mcpx/internal/testsupport/require_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package testsupport

import (
"path/filepath"
"strings"
"testing"
)
Expand Down Expand Up @@ -138,3 +139,23 @@ func TestMissingRequiredBinariesIsTheSuiteLevelCheck(t *testing.T) {
t.Errorf("with MCPX_TEST_REQUIRE unset nothing is missing, got %v", got)
}
}

// TestMissingRequiredBinariesHonorsRealServersDir pins the other half of
// the availability rule: an entry naming a real server is satisfied by
// the server resolving under MCPX_REAL_SERVERS_DIR, because RealServer
// looks there, not on PATH. Only an entry available in neither place is
// missing.
func TestMissingRequiredBinariesHonorsRealServersDir(t *testing.T) {
dir := t.TempDir()
writeExecutable(t, filepath.Join(dir, "bin", "mcp-server-time"))
t.Setenv("MCPX_REAL_SERVERS_DIR", dir)
t.Setenv("MCPX_TEST_REQUIRE", "mcp-server-time,mcp-server-absent-5584")
got := MissingRequiredBinaries()
if len(got) != 1 || got[0] != "mcp-server-absent-5584" {
t.Errorf("want only the server available in neither place named, got %v", got)
}
t.Setenv("MCPX_REAL_SERVERS_DIR", "")
if got := MissingRequiredBinaries(); len(got) != 2 {
t.Errorf("with no servers dir both entries are missing, got %v", got)
}
}
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.