Title: mcpx testsupport builders leak build temp dirs in packages without a sweeping TestMain · Issue #10554 · developing-today/code · GitHub
Open Graph Title: mcpx testsupport builders leak build temp dirs in packages without a sweeping TestMain · Issue #10554 · developing-today/code
X Title: mcpx testsupport builders leak build temp dirs in packages without a sweeping TestMain · Issue #10554 · developing-today/code
Description: What leaks pkgs/mcpx/internal/testsupport builders (MCPXBinary, FakeMCPBinary, EraMCPBinary, TaskMCPBinary, AskMCPBinary) each create a temp dir (mcpx-bin-*, mcpx-fake-*, mcpx-era-*, mcpx-task-*, mcpx-ask-*) and register it for the suite...
Open Graph Description: What leaks pkgs/mcpx/internal/testsupport builders (MCPXBinary, FakeMCPBinary, EraMCPBinary, TaskMCPBinary, AskMCPBinary) each create a temp dir (mcpx-bin-*, mcpx-fake-*, mcpx-era-*, mcpx-task-*, m...
X Description: What leaks pkgs/mcpx/internal/testsupport builders (MCPXBinary, FakeMCPBinary, EraMCPBinary, TaskMCPBinary, AskMCPBinary) each create a temp dir (mcpx-bin-*, mcpx-fake-*, mcpx-era-*, mcpx-task-*, m...
Opengraph URL: https://github.com/developing-today/code/issues/10554
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx testsupport builders leak build temp dirs in packages without a sweeping TestMain","articleBody":"## What leaks\n\n`pkgs/mcpx/internal/testsupport` builders (`MCPXBinary`, `FakeMCPBinary`, `EraMCPBinary`, `TaskMCPBinary`, `AskMCPBinary`) each create a temp dir (`mcpx-bin-*`, `mcpx-fake-*`, `mcpx-era-*`, `mcpx-task-*`, `mcpx-ask-*`) and register it for the suite-wide sweep (#1971 remainder item 2). Only `internal/e2e` has a `TestMain` that calls `SweepBuildTempDirs`. The other consuming packages — `internal/daemon`, `internal/pool`, `examples` — never sweep, so every test run of those packages leaves its build dirs behind in $TMPDIR.\n\nMeasured on the laptop (2026-11-13/14): dozens of `mcpx-bin-*` dirs in ~/tmp and ~/.local/share/opencode/tmp, ~788 MB each. The size is mostly a cold Go build cache: `buildEnv` pins GOCACHE/XDG_CACHE_HOME inside each build temp dir, so every test binary also pays a full cold build of all dependencies.\n\nA standing laptop scratch sweep (nixos/home/laptop-scratch-sweep) reaps /tmp/mcpx-bin-* older than 24h, but the dirs land in the test process TMPDIR (~/tmp for lane runs, opencode tmp for opencode-spawned runs), which that sweep does not watch for this pattern.\n\n## Fix\n\n- Give the non-sweeping consuming packages a TestMain that runs the suite sweep, via one shared testsupport helper mirroring e2e semantics (remove this binary's registered dirs; fail on processes still executing from them).\n- Pin the testsupport build cache to a fixed testsupport-chosen location under the real user cache dir instead of inside each build temp dir: still never caller-controlled (the guard-test property buildEnv exists for), but warm across test binaries, and a leaked dir then holds only the ~57 MB binary.\n\n## Verify\n\nRun the affected packages' tests and confirm no new mcpx-* dirs remain in TMPDIR afterwards.","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-15T21:45:39Z","url":"https://github.com/developing-today/code/issues/10554"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:65bfa92e-f844-3eed-bbed-06e5d43b85a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B7F6:3DA8B4:1C0ABC:2632C1:6B0612FF |
| html-safe-nonce | 4787f3aeb3b8cde363996112aefef938b96e66eb2c0268de07859735ea602c47 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0Y2OjNEQThCNDoxQzBBQkM6MjYzMkMxOjZCMDYxMkZGIiwidmlzaXRvcl9pZCI6IjQxMTg1MjEwMzgwMDQ2MDAzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6d075e26ae9f3f2fc4ae9e0862d0ec40e5612657ab5164076ef8d6c1435cffa2 |
| hovercard-subject-tag | issue:6409919672 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/10554/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a20455c500abe83d723d8c6b729b70ca87be9610f701627fab9d673fbc56244/developing-today/code/issues/10554 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a20455c500abe83d723d8c6b729b70ca87be9610f701627fab9d673fbc56244/developing-today/code/issues/10554 |
| og:image:alt | What leaks pkgs/mcpx/internal/testsupport builders (MCPXBinary, FakeMCPBinary, EraMCPBinary, TaskMCPBinary, AskMCPBinary) each create a temp dir (mcpx-bin-*, mcpx-fake-*, mcpx-era-*, mcpx-task-*, m... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | e58943f0186bb8d97b217393c2724a49ab47e4aefefc43595a90fa04699066c9 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 23517473abc6d5da019b4958bd421644e98a418b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width