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: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail · Issue #6819 · developing-today/code

mcpx: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail #6819

New issue
Copy link
New issue
Copy link
Closed
#7074
Closed
mcpx: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail#6819
#7074
Copy link
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/testTest coverage, test infrastructure, or test-only fixesmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilot

Description

@developing-today
developing-today
bot
opened on Nov 7, 2026
Issue body actions

Found by lane code-n while verifying #2859 on the laptop (2026-11-07).

TestTargetBearerTokenResolvesTheTargetDaemon (pkgs/mcpx/internal/cli/bearer_test.go) fails deterministically when the operator environment carries a real MCPX_CONFIG (on amd-6: MCPX_CONFIG=/nix/store/...-mcpx-config.json, the fleet's own deployed config):

bearer_test.go:170: inherited targetBearerToken = "", true; want the parent config's token

The inherited-token case builds a parent/sub .mcpx.json chain in t.TempDir() and expects targetBearerToken to walk up to the parent file; the ambient MCPX_CONFIG short-circuits that resolution and the test reads the operator config instead. With env -u MCPX_CONFIG the test passes on both current main and PR #2714's head (verified this run).

Impact: any worker/operator machine with a real mcpx deployment exports MCPX_CONFIG, so the package suite reports a false failure there — it cost a full stress-verification cycle on #2859 before the env leak was identified. CI is unaffected (no MCPX_CONFIG), which is why this only bites locally.

Acceptance criteria:

  • The test (and any sibling config-resolution tests in internal/cli with the same exposure) isolates MCPX_CONFIG (and equivalent config-path env vars) via t.Setenv, so the suite result does not depend on the host operator config.
  • go test ./internal/cli -run TestTargetBearerTokenResolvesTheTargetDaemon passes WITH a realistic MCPX_CONFIG set in the environment.

Activity

Next
  1. developing-today
    added
    kind/testTest coverage, test infrastructure, or test-only fixes
    status/needs-triageNot yet triaged; needs a first look
    source/queue-workerFiled or worked by the queue/worker pilot
    queue/queuedHas a queued queue task
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    on Nov 7, 2026
  2. dezren39
    added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    on Nov 7, 2026
  3. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    Member
    More actions

    Intake review

    • Agent: fleet monitor (repo-fleet-monitor), run 2026-11-07 04:12 CST — protocol §5 intake pass.
    • Still live: verified OPEN this run; a merged-PR search for this issue number found no PR that resolves it. Related: found while verifying issue mcpx: internal/cli package test duration exceeds the 600s stress timeout on PR 2714 (stage 1 of #1980) #2859; the mcpx test-hermeticity family. No merged PR resolves this (checked this run).
    • Notes: A host-dependent test silently taxes every local verification cycle; CI cannot catch it because CI has no MCPX_CONFIG.
    • Suggested approach: Isolate MCPX_CONFIG and sibling config-path env vars with t.Setenv in the affected tests, per the body's acceptance criteria.
    • Labels normalized this pass: priority/normal, effort/s + meta/enriched. Acceptance criteria were already present in the body.
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  5. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    Member
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code, OpenChamber scheduled lane 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc
    • Task: 11075 (triage)
    • Fresh check: issue mcpx: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail #6819 is OPEN, unassigned, and has no hard-stop labels. No issue work performed yet.
    • Next: return this claim and re-claim with the runbook’s 1200-second triage lease; then verify the reported test against current main and route the confirmed finding.
  6. 13 remaining items

  7. dezren39
    added
    status/triagedTriaged and routed (see agent note)
    and removed
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  8. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    Member
    More actions

    🤖 Agent note · done (repost — the first version of this note was deleted within minutes after a shell-quoting defect in its posting command corrupted its text; this is the clean text)

    • Agent: queue worker (repo-worker-code), lane code-e
    • Session / ID: task 11075, repo-queue-worker-shift-e, 2026-11-07 18:53 CST shift
    • Found via: queue claim
    • Task: triage verdict for issue mcpx: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail #6819 — CONFIRMED at current main
    • Expectation: done = verdict + evidence + a routed fix; all three below

    Verdict: CONFIRMED. Reproduced live on the laptop at main ab35bef (2026-11-08T01:09Z):

    • With the ambient operator env (MCPX_CONFIG set to the fleet's deployed mcpx-config.json in /nix/store): go test ./internal/cli/ -run TestTargetBearerTokenResolvesTheTargetDaemon -count=1 in pkgs/mcpx → FAIL, bearer_test.go:170: inherited targetBearerToken = "", true; want the parent config's token — the exact failure the issue reports.
    • With env -u MCPX_CONFIG, the identical command → ok.

    Mechanism (source at main): pkgs/mcpx/internal/cli/bearer_test.go contains no t.Setenv at all. targetBearerToken (pkgs/mcpx/internal/cli/client.go) applies sch.ApplyEnv(set, settings.Environ()) after the file chain, and settings/env.go maps paths.configFile to the MCPX_CONFIG env var; targetConfigFiles also walks config discovery (HOME/XDG) via config.ResolveChainFrom. Sibling tests in the same package (adapter_add_test.go, flagreach_test.go) do isolate HOME/XDG_CONFIG_HOME via t.Setenv — bearer_test.go is the outlier. Production env layering is correct by design; this is a test-hermeticity fix only.

    Routing: fix enqueued as task 11458 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:6819) — isolate MCPX_CONFIG plus the discovery env it depends on via t.Setenv, and verify the test passes WITH a realistic MCPX_CONFIG set. Issue #6819 stays open, labelled queue/queued + status/triaged for task 11458.

  9. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    status/triagedTriaged and routed (see agent note)
    on Nov 8, 2026
  10. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    ContributorAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-e
    • Session / ID: task 11458
    • Found via: queue claim (claimed 2026-11-08T02:17:50Z; the claim was hidden from the worker by a fabricated tool-output delivery and recovered + worked in the same shift once verified against live queue state)
    • Task: Implemented the hermetic-test fix for issue mcpx: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail #6819: TestTargetBearerTokenResolvesTheTargetDaemon now isolates HOME / XDG_CONFIG_HOME (fresh temp dir) and MCPX_CONFIG (emptied) via t.Setenv, matching the sibling pattern in adapter_add_test.go / flagreach_test.go. Reproduced first at origin/main edef348: FAIL at bearer_test.go:170 with the laptop's ambient MCPX_CONFIG, pass unset. After the fix (PR test(mcpx): isolate config env in TestTargetBearerTokenResolvesTheTargetDaemon (#6819) #7074, +13 lines, test-only): target test passes WITH ambient MCPX_CONFIG; full internal/cli package passes both with MCPX_CONFIG unset and with it set.
    • Expectation: s — done = PR test(mcpx): isolate config env in TestTargetBearerTokenResolvesTheTargetDaemon (#6819) #7074 merged and issue mcpx: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail #6819 closed.
    • Links: task 11458; PR test(mcpx): isolate config env in TestTargetBearerTokenResolvesTheTargetDaemon (#6819) #7074; branch queue/11458-6819-bearer-test-hermetic
  11. dezren39
    added a commit that references this issue on Nov 8, 2026

    Merge pull request #7074 from developing-today/queue/11458-6819-beare…

    f32af20
  12. dezren39
    closed this as completedin #7074on Nov 8, 2026
  13. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    ContributorAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-e
    • Session / ID: task 11458
    • Found via: queue claim
    • Task: Done — PR test(mcpx): isolate config env in TestTargetBearerTokenResolvesTheTargetDaemon (#6819) #7074 merged (merge sha f32af20); issue mcpx: TestTargetBearerTokenResolvesTheTargetDaemon is not hermetic — a real MCPX_CONFIG env var makes it fail #6819 closed by the merge. Verification (laptop, worktree at ba42033): reproduced the failure first at origin/main edef348 with ambient MCPX_CONFIG (bearer_test.go:170), then after the fix the target test passes WITH ambient MCPX_CONFIG and the full internal/cli package passes both with MCPX_CONFIG unset and with it set. Test-only change (+13 lines in bearer_test.go); no production behavior change. CI basic-tier checks were QUEUED (infra stall) at merge, as with the rest of this shift.
    • Expectation: met — the test's result no longer depends on the host operator config.
    • Links: task 11458; PR test(mcpx): isolate config env in TestTargetBearerTokenResolvesTheTargetDaemon (#6819) #7074; branch queue/11458-6819-bearer-test-hermetic
  14. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/testTest coverage, test infrastructure, or test-only fixesmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilot

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.