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 e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) by dezren39 · Pull Request #4804 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Follow-up for #1992 (task 3284).

What changed

  • pkgs/mcpx/internal/testsupport/childenv.go (new): ChildEnv allowlist builder -- parent contributes PATH, TMPDIR, LANG/LC_, TERM, SYSTEMROOT and explicit runtime-cache passthroughs (DENO_DIR, BUN_INSTALL_CACHE_DIR, NPM_CONFIG_CACHE) only; XDG_CONFIG_HOME/XDG_DATA_HOME/XDG_STATE_HOME/XDG_CACHE_HOME/XDG_RUNTIME_DIR resolve under the test dir. Everything else (all MCPX_, XDG_, OPENCODE_, proxies, NODE_OPTIONS, credentials) is dropped. Unit tests are in childenv_test.go.
  • pkgs/mcpx/internal/e2e/e2e_test.go: newEnv builds on ChildEnv (replaces withoutMCPXVars); new TestMain backstop fails fast if MCPX_DAEMON_ENDPOINT/MCPX_SOCKET would reach a child and fails if the caller's real daemon set (info records in the parent-resolved state dir) differs at suite end.
  • pkgs/mcpx/internal/e2e/envguard_test.go (new): registry-derived guard -- every settings EnvName()/EnvAliases entry (231 names) is classified harness-set (52) or safe-under-inherit-nothing (179); the behavior test plants canaries for every name plus XDG/OPENCODE/proxy/NODE_OPTIONS/HOME and checks isolation; hostile-parent doctor/settings/recipes regression test.

Verification status

  • gofmt and git diff --check: pass. No Go build/test was run locally (task requires CI verification only).
  • The PR's only GitHub check is basic: production line limit (2500) (pass); it does not test Go.
  • The mcpx test and mcpx workflows are disabled_manually. Manual dispatch of mcpx-test.yml on this branch was rejected by GitHub (HTTP 422, workflow disabled), so the e2e and go test ./... CI evidence, and empirical guard fail-on-main/pass-on-fix evidence, are still blocked. Do not close mcpx testing: e2e inherits the caller's environment -- build it from an allowlist so tests never reach the user's daemon #1992 until an enabled Actions path runs and its result is recorded here.

Sorry, something went wrong.

Uh oh!

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

All reactions
@dezren39
mcpx e2e: build child env from allowlist, guard registry vars, TestMa…
63432a4
…in backstop (#1992)

Replace the inherit-minus-MCPX_* harness environment with a true
allowlist builder in internal/testsupport (ChildEnv): the parent
contributes PATH, TMPDIR, LANG/LC_*, TERM, SYSTEMROOT and the
runtime-cache passthroughs only; XDG_* resolve under the test dir and
everything else -- MCPX_*, XDG_*, OPENCODE_*, proxies, NODE_OPTIONS --
is dropped. newEnv builds on it.

Add the registry-derived guard: every settings EnvName()/EnvAliases
entry is classified as harness-set or safe-under-inherit-nothing, with
a behaviour half proving the drop for each one, plus the
hostile-parent doctor/settings/recipes regression test.

Add the TestMain backstop: fail fast if MCPX_DAEMON_ENDPOINT or
MCPX_SOCKET would reach a child, and fail if the caller's real daemon
set differs at suite end.
@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 08:34
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Warning

Review limit reached

You'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 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: acd9cd68-2b95-45d4-a363-f4e00297c5b0
Commits

Reviewing files that changed from the base of the PR and between f0fd3dd and a20bbf7.

Files selected for processing: 5

  • pkgs/mcpx/internal/e2e/e2e_test.go
  • pkgs/mcpx/internal/e2e/envguard_test.go
  • pkgs/mcpx/internal/testsupport/build.go
  • pkgs/mcpx/internal/testsupport/childenv.go
  • pkgs/mcpx/internal/testsupport/childenv_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T08:34:27.423428Z
We couldn’t complete this review. Comment @codex review to try again.
63432a4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39
merge origin/main into queue/3284-1992-e2e-env-allowlist
181ee47
@dezren39 dezren39 mentioned this pull request Nov 3, 2026
mcpx testing: e2e inherits the caller's environment -- build it from an allowlist so tests never reach the user's daemon #1992
Closed
@github-actions github-actions Bot assigned dezren39 Nov 3, 2026
This was referenced Nov 3, 2026
mcpx: surfaces -- reaching the daemon over ssh and the browser, and keeping what you reached (tracker) #1887
Open
mcpx testing: integration tests for every feature, across environments #1905
Closed
ci(mcpx): restore the policy-listed PR test tier trigger #4533
Closed
mcpx testing: guard tests that close a whole bug class #1971
Closed
@developing-today developing-today Bot mentioned this pull request Nov 8, 2026
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
@dezren39 dezren39 added queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition work/assigned Queue worker lifecycle state labels Nov 8, 2026
@developing-today

developing-today Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

  • Agent: queue worker (repo-worker-code, lane code-g)
  • Session / ID: task 13363
  • Found via: queue claim
  • Task: Handed off to the opencode claimant per §1b: shepherd PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 (branch queue/3284-1992-e2e-env-allowlist, head 181ee47, verified open, no hard-stop labels). Batch tracker issue Unowned PR batch from branch disposition (2026-11-07) #7297. Attempts 2/4.
  • Expectation: claimant session drives task 13363 to a terminal state; if unbound by lease expiry the task returns to the queue.
  • Links: PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804, issue Unowned PR batch from branch disposition (2026-11-07) #7297
All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39 dezren39 mentioned this pull request Nov 8, 2026
mcpx: a promise and a behaviour that disagree — every declared surface needs a guard that walks it (tracker) #1893
Closed
5 of 16 tasks
@dezren39

dezren39 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · state: parked

  • Agent: repo queue worker, OpenChamber scheduled lane aea12c82-c5af-4e5a-9b66-f8e360f87177 (repo-worker-code)
  • Session / ID: task 13363 (attempt 2/4)
  • Found via: queue claim
  • Task: shepherd PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 (mcpx e2e env allowlist + registry guard + TestMain backstop, mcpx testing: e2e inherits the caller's environment -- build it from an allowlist so tests never reach the user's daemon #1992) under batch Unowned PR batch from branch disposition (2026-11-07) #7297 part 1.

Verification done on head 181ee47a40 (worktree ~/git/fleet/13363-4804):

  • go build ./... in pkgs/mcpx — pass.
  • go test ./internal/testsupport/ -run ChildEnv — pass (both tests).
  • go test ./internal/e2e/ -run TestEveryRegistryVariableIsHarnessSetOrSafe — pass.
  • go test ./internal/e2e/ -run TestTheHarnessBuildsChildrenFromTheAllowlist — FAIL, deterministic:
    envguard_test.go:395: build fakemcp: exit status 1
        failed to initialize build cache at /nonexistent-mcpx-guard/XDG_CACHE_HOME/go-build: mkdir /nonexistent-mcpx-guard: permission denied
    
    Cause: callerLeakParent() (envguard_test.go:338) plants XDG_CACHE_HOME=/nonexistent-mcpx-guard/XDG_CACHE_HOME via t.Setenv, then newEnv → testsupport.FakeMCPBinary runs go build with the ambient environment and Go derives its build cache from it. envguard_test.go is new in this PR (598 lines added).

Why this matters: mcpx-test.yml is workflow_dispatch-only since #5501 (chore/no-push-pr-triggers), so no PR-tier mcpx suite runs on this PR — the only surfaced check is basic: production line limit (2500). Local targeted runs are the verification path, and one of them fails.

Next (resume brief): make FakeMCPBinary build with a writable GOCACHE (or clear XDG_CACHE_HOME for the build step) so the guard test can plant a hostile parent without breaking its own fixture build; re-run the three targeted tests above; then merge when green.

  • Links: task 13363 · PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 · issue mcpx testing: e2e inherits the caller's environment -- build it from an allowlist so tests never reach the user's daemon #1992 · issue Unowned PR batch from branch disposition (2026-11-07) #7297
All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39

dezren39 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · handed off

  • Agent: repo queue worker, lane code-o (repo-worker-code)
  • Session / ID: cron repo-queue-worker-shift-o run 2026-11-08; task 13363
  • Found via: claimed task 13363 this shift; execution-lane assignment returned opencode
  • Task: task 13363 for PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 (pr_shepherd, batch issue Unowned PR batch from branch disposition (2026-11-07) #7297). Fresh check: PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 is OPEN, no hard-stop labels. Handed off to the opencode claimant.
  • Expectation: claimant session drives task 13363 to a terminal state.
  • Links: task 13363 · PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 · issue Unowned PR batch from branch disposition (2026-11-07) #7297
All reactions

Sorry, something went wrong.

Uh oh!

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

@developing-today

developing-today Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

agent-note:v1 — task 13363, lane code-k, state: handed_off. PR #4804 (batch issue #7297 part 1) verified fresh; lane assignment: opencode (session_id null, unbound). Handing off to opencode claimant per runbook 1b. Attempts 3/4.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39

dezren39 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · handed off (task 13363, lane code-m): PR #4804 revalidated OPEN, no hard-stop labels; execution lane opencode, handed off to the opencode claimant.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39

dezren39 commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · handed off

  • Agent: repo queue worker, lane code-y (repo-worker-code)
  • Session / ID: cron repo-queue-worker-shift-y run 2026-11-09 00:44 CST; task 13363
  • Found via: claimed task 13363 this shift (lane stamp code-y verified); execution-lane assignment returned opencode (lane row 4984), so this lane handed it off per runbook §1b and did not work it itself.
  • Task: task 13363 (pr_shepherd) for PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 / issue Unowned PR batch from branch disposition (2026-11-07) #7297 (batch Unowned PR batch from branch disposition (2026-11-07) #7297 part 1, e2e env allowlist). Verified fresh 2026-11-09T06:52Z via gh: PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 OPEN at head 181ee47, not draft, no hard-stop labels. Prior checkpoint finding stands in the task progress: deterministic test failure in TestTheHarnessBuildsChildrenFromTheAllowlist (envguard_test.go XDG_CACHE_HOME planting) for the claimant to address.
  • Expectation: the opencode claimant launches the bound session; done looks like that session driving task 13363 to a terminal state.
  • Outcome this shift: checkpointed handed_off and parked task 13363 for 1200s for claimant binding.
  • Links: task 13363 · PR mcpx e2e: env allowlist + registry guard + TestMain backstop (#1992 follow-up) #4804 · issue Unowned PR batch from branch disposition (2026-11-07) #7297
All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39 dezren39 added queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition and removed status/parked Deliberately paused with a recorded resume condition queue/parked Queue task is parked (waiting on CI, time, or an event) status/in-progress Queue worker lifecycle state labels Nov 9, 2026
@dezren39 dezren39 removed the queue/claimed Queue worker lifecycle state label Nov 9, 2026
@dezren39

dezren39 commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1 | task 13363 | lane code-n | stage handed_off | Fresh 2026-11-09: PR #4804 OPEN no hard-stop labels; batch issue #7297 OPEN with user/escalated (flagged). Assignment row 4984 = opencode; handing off per runbook 1b; parking task 13363 1200s.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39

dezren39 commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

state: parked
task: 13363
lane: code-w
pr: "#4804"
issue: "#7297"

Shepherd check by lane code-w (task 13363, direct per #8187), fresh 2026-11-10: PR #4804 is OPEN, MERGEABLE, mergeStateStatus CLEAN, no hard-stop labels; zero Codex inline findings; the completed checks are green (production line limit SUCCESS, CodeRabbit NEUTRAL). Diff is 4 files, +845/-17, all mcpx test infrastructure (internal/e2e, internal/testsupport) for issue #1992. Parent batch issue #7297 carries a pre-existing user/escalated label (batch-level, noted by every lane today; per-PR dispositions have proceeded under it).

Targeted verification on the laptop (worktree at PR head 181ee47):

  • go test ./internal/testsupport/ — PASS (0.103s): the new childenv allowlist code.
  • go test ./internal/e2e/ -run TestEveryRegistryVariableIsHarnessSetOrSafe — PASS.
  • go test ./internal/e2e/ -run TestTheHarnessBuildsChildrenFromTheAllowlist — FAIL: building fakemcp under the harness child env dies with "failed to initialize build cache at /nonexistent-mcpx-guard/XDG_CACHE_HOME/go-build: mkdir /nonexistent-mcpx-guard: permission denied". The test deliberately plants canary cache paths under /nonexistent-mcpx-guard; on this host the go build cannot create that root-level directory. Not yet determined whether this is a laptop-environment artifact or a test defect that CI would also hit — the PR's remaining checks are stuck in the fleet CI stall, so CI has not answered it either.
  • Full e2e package exceeds a 300s run on the laptop (integration suite; no verdict).

Not merging with one of the PR's own new tests red in the only environment that has run it. Parking task 13363: resume when PR #4804's CI completes (green → merge; red on this test → the test's build-cache handling needs a fix, e.g. harness-set GOCACHE inside the build's child env), or when someone reproduces the failure as laptop-only with evidence.

All reactions

Sorry, something went wrong.

Uh oh!

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

repo-worker-code-k
mcpx(testsupport): pin the build env so a hostile caller env cannot b…
a20bbf7
…reak test builds

FakeMCPBinary/MCPXBinary ran go build with the ambient env. The e2e env guard test plants XDG_CACHE_HOME, proxies and HOME pointing at a nonexistent root, and the build died three ways: build cache under the planted XDG root, module downloads through the planted proxy, and a cold GOPATH/module cache under the planted HOME (which the test then could not clean up). buildEnv now pins GOCACHE/XDG_CACHE_HOME under the build temp dir, drops proxy variables (the ChildEnv reasoning), and resets HOME from the passwd entry so builds use the invoking users warm caches. TestTheHarnessBuildsChildrenFromTheAllowlist and TestEveryRegistryVariableIsHarnessSetOrSafe now pass; internal/testsupport tests and go build ./... pass.
@dezren39
dezren39 merged commit be9e1e8 into main Nov 10, 2026
4 of 19 checks passed

Uh oh!

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

@dezren39
dezren39 deleted the queue/3284-1992-e2e-env-allowlist branch November 10, 2026 21:59
@dezren39

dezren39 commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
state: done
task: 13363
lane: code-p
outcome: fixed_merged (shepherded to merge)

Shepherded PR #4804 to merge: merge commit be9e1e8, head a20bbf7.

The blocking defect from the park record is fixed in commit a20bbf7 (pkgs/mcpx/internal/testsupport/build.go): FakeMCPBinary/MCPXBinary ran go build with the ambient env, so this PR's own guard test — which plants XDG_CACHE_HOME, proxy variables, and HOME pointing at a nonexistent root — broke the suite's builds three ways: (1) build cache initialized under the planted XDG root (permission denied, the recorded failure), (2) module downloads routed through the planted proxy (nonexistent host), (3) GOPATH/module cache derived from the planted HOME, forcing a cold download of every module into a test temp dir whose read-only module cache then failed TempDir cleanup. The new buildEnv pins GOCACHE/XDG_CACHE_HOME under the build's own temp dir, drops proxy variables (the same reasoning as this PR's ChildEnv), and resets HOME from the passwd entry so builds use the invoking user's warm caches.

Evidence (laptop, this shift): failure reproduced on head 181ee47 (13363-repro.log); after the fix, go test ./internal/e2e/ -run 'TestTheHarnessBuildsChildrenFromTheAllowlist|TestEveryRegistryVariableIsHarnessSetOrSafe' -count=1 PASS (ok, 178s — cold build cache under multi-lane contention), go test ./internal/testsupport/ -count=1 PASS, go vet ./internal/testsupport/ clean, go build ./... in pkgs/mcpx PASS (logs 13363-fix3/fix4 in the fleet worktree dir).

Codex disposition: no Codex findings exist on this PR — zero review threads at any head; the latest Codex comment is its usage-limits notice (the review failed to run). Nothing to fix or rebut; disposition recorded here.

Batch issue #7297 stays open for its remaining parts; this task covered part 1 (PR #4804) only.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39 dezren39 removed status/parked Deliberately paused with a recorded resume condition queue/parked Queue task is parked (waiting on CI, time, or an event) work/assigned Queue worker lifecycle state labels Nov 10, 2026
This was referenced Nov 10, 2026
fix(mcpx): e2e package does not compile on main — duplicate TestMain (guardedMain vs feature coverage) #8333
Closed
fix(mcpx): one TestMain for e2e - guarded main writes the coverage ledger (#8333) #8335
Merged
fix(mcpx): handle non-deno typecheck gracefully and fix options mapping #7158
Merged
test(mcpx): negative tests for env-scan and defaults checker guards (#1971 remainder) #8403
Merged
test(mcpx): suite-wide process/temp sweep in e2e TestMain (#1971 remainder item 2) #8485
Merged
watchdog: reopen issues the bot wrongly closes on merges #10105
Closed
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

@dezren39 dezren39

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

mcpx testing: e2e inherits the caller's environment -- build it from an allowlist so tests never reach the user's daemon

Uh oh!

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

1 participant

@dezren39
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 01402775 — 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.