Title: mcpx testing: first CI iteration -- unit + e2e shards + lint + nix build, and a recorded baseline · Issue #1998 · developing-today/code · GitHub
Open Graph Title: mcpx testing: first CI iteration -- unit + e2e shards + lint + nix build, and a recorded baseline · Issue #1998 · developing-today/code
X Title: mcpx testing: first CI iteration -- unit + e2e shards + lint + nix build, and a recorded baseline · Issue #1998 · developing-today/code
Description: Relocated from dezren39/darwin-nix#143 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/ni...
Open Graph Description: Relocated from dezren39/darwin-nix#143 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue referenc...
X Description: Relocated from dezren39/darwin-nix#143 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue refe...
Opengraph URL: https://github.com/developing-today/code/issues/1998
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx testing: first CI iteration -- unit + e2e shards + lint + nix build, and a recorded baseline","articleBody":"Relocated from dezren39/nix#143 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).\n\nParent: #95\n\n## Summary\n\nBuild the first version of the skeleton from #135 and measure it: split the one serial job into `init`, `unit`, three static `e2e` shards, a minimal lint leg, the `nix` build (with the vendorHash repair moved over from `mcpx.yml`), and a final `ci-ok` job that prints a timing table. Fix the broken Go cache on the way. Record the baseline in this issue so #139 and #140 start from numbers, not estimates. This is deliberately the smallest thing that produces those numbers: no splitter, no budget gate, no autofix.\n\n## Original notes\n\n> - testing\n> - make a comprehensive github action ci.yaml workflow (or test.yaml) that is as fast as possible,\n\n> - testing\n> - make a comprehensive github action ci.yaml workflow (or test.yaml) that is as fast as possible,\n> - splitting sets of tests into as small groups as practical, eg split out unit/integration tests into 2 jobs, whichever one takes longer: shard it into 4 logical groups (or however many) based on an appropriate category, then find the longest job at that point and repeat (you dont want to iterate on this forever, at some point start splitting logical units by like, e.g. maybe a-f/g-s/t-z, balance number of letters by time.\n\n## Current state\n\nOne `ubuntu-latest` job in `.github/workflows/mcpx.yml`, 3m57s wall on run 36673523537: ~33 s setup (Go cache broken: `Restore cache failed: Dependencies file is not found ... go.mod`), `go test ./... -count=1` 134.8 s (~31 s compile, e2e 100.7 s serial), `nix build` 59.6 s run *after* the tests. Full table and log reference in #135.\n\nSince #182 (05c78b2): the Go cache key is fixed (`cache-dependency-path: pkgs/mcpx/go.sum`, `mcpx.yml:50`) -- that was step 8's first half and option B below, landed on its own. The first run after it (36693030957, push to main) was still a miss by construction: 4m09s wall, setup 22 s, `go test` 148 s (~39 s download + compile before the first `ok`; e2e 108.9 s for 209 tests), `nix build` 70 s (`buildPhase` 28.7 s, `checkPhase` 18.5 s). The next push to main is the first that can hit; its number goes in the baseline table below.\n\n## Scope\n\n1. `.github/workflows/mcpx-test.yml` (`name: mcpx-test`) with the triggers, draft `if:`, and concurrency from #135 decisions 3 and 5. For this first iteration, keep `mcpx.yml`'s path list inside `init` as the relevance check (decision 4 C) -- do not make anything a required check yet (main is unprotected).\n2. `init` (small): sparse depth-1 checkout; output `mcpx=true|false`; output the seed placeholder per #93 if #93 has decided, otherwise leave the slot; output a **static** matrix:\n - `e2e-1`: the first half of `e2e_test.go`'s tests (65 names at 05c78b2, alphabetical)\n - `e2e-2`: the second half (64)\n - `e2e-3`: every test in the other nine e2e files (80; `unread_test.go` arrived with #171)\n The regexes are generated by a few lines of shell from `grep -h '^func Test'`, so nothing is hand-maintained. By test count this is roughly even (~33 s each if tests are uniform); it is a stopgap until #139's splitter replaces the static list.\n3. `unit`: `go test -count=1 $(go list ./... | grep -v /internal/e2e)`.\n4. `e2e` (matrix): `go test -count=1 -json -run \"$REGEX\" ./internal/e2e`, human output via `gotestsum --format testname --jsonfile ...` or a `jq` filter; upload the JSON as an artifact. Each leg writes its exact `go test -run` line to `$GITHUB_STEP_SUMMARY`. After `go test`, count surviving `mcpx daemon` processes and print the number (warn only) -- #52 is fixed in #182, and this is the check that notices if it regresses.\n5. `lint` (minimal, only checks that are already clean): `gofmt -l` must be empty, `go vet ./...`. Everything else is #141.\n6. `nix`: `mcpx.yml`'s vendorHash repair and `nix build` moved over unchanged, with job-level `permissions: contents: write`; all other jobs `contents: read` and `persist-credentials: false`. Delete `mcpx.yml` in the same PR (Renovate's grouped Go PR must keep working -- watch the next one, #49).\n7. `ci-ok` (`needs:` all, `if: always()`): fail if any needed job failed/was cancelled; print the #140 measurement table (wall, matrix span, longest leg + name, queue max/sum, per-leg fixed cost) from the jobs API. No gating on time yet.\n8. Every Go job: `actions/setup-go` with `cache-dependency-path: pkgs/mcpx/go.sum` (**done for the existing job in #182**, `mcpx.yml:50`; carry it into every new job), restore-only on PRs, save on main (today every PR run saves its own branch-scoped copy).\n9. Pin `setup-deno`/`setup-bun`/`setup-node` versions to the flake's (today CI gets deno 2.9.7, bun 1.4.2, node 24.21.0 while the Nix wrapper uses `bun-bin` 1.3.14).\n\nOut of scope here: the timing-driven splitter (#139), the budget number and runbook (#140), formatters beyond gofmt (#141), format automation (#142), shared binary artifacts, dev-shell toolchains, the docs-examples leg.\n\n## Prediction to check\n\nWith a working Go cache, each e2e leg ≈ 30-40 s fixed + ~33 s tests ≈ 65-75 s. The `nix` leg ≈ 3 s set up + 2 s checkout + 8 s installer + 60 s build ≈ **75 s** -- so after this change the **Nix build is likely the longest job**, and the next win is in the Nix leg (store cache, and what to do about `checkPhase` re-running the unit packages CI already ran -- #135 decision 6 argues for keeping it, off the critical path; decision 7 has the store cache), not in more e2e shards. Expected wall ≈ 1.5-2 min, down from ~4.\n\n## Baseline to record (comment on this issue)\n\nFrom 5 main runs and 3 PR runs of the new workflow, plus the last 10 `mcpx.yml` runs for comparison (`gh run list --repo dezren39/nix --workflow mcpx.yml`, `gh api .../runs/\u003cid>/jobs`):\n\n| | old `mcpx.yml` | new, median | new, max |\n| --- | --- | --- | --- |\n| wall (`max(completed_at) - run_started_at`) | 3m57s-4m30s | | |\n| longest leg (name) | 3m53s (build) | | |\n| e2e legs: fixed cost / test time | -- | | |\n| unit leg | -- | | |\n| nix leg | 59.6 s step | | |\n| queue delay max / sum | 2-3 s (one 37 s) | | |\n| Go cache hit? compile time per leg | miss / ~31 s (after #182, run 36693030957: miss by construction / ~39 s incl. download) | | |\n\nAlso attach the merged per-test timings (top 20 slowest e2e tests) -- the input #139 needs to choose between \"rebalance\" and \"fix the slowest tests first\".\n\n## Approaches\n\nNo real choice on *whether*; the design choices are made in #135. One scoping choice:\n- **A -- do the full skeleton at once** (splitter, budget gate, all linters, autofix). One large PR, nothing measured before deciding. Not recommended.\n- **B -- only fix the Go cache in `mcpx.yml`.** A one-line change. **Landed in #182** exactly this way; it splits nothing, which is why this issue stays open.\n- **C -- this issue as scoped (recommended)**, on top of B. Smallest change that yields the numbers every other CI issue needs.\n\n## Acceptance\n\n- `mcpx-test` runs on push to main and on non-draft PRs (and on undraft); a new push to a PR cancels the previous run; main runs are never cancelled.\n- `ci-ok` is green only if every leg is green or skipped; it prints the timing table.\n- `setup-go` logs a cache hit on the second run.\n- A Renovate/Dependabot Go bump still gets its vendorHash repaired (or the gap is written down on #49).\n- The baseline table above is filled in on this issue.\n\n## Open questions\n\n1. ~~Land the one-line Go cache fix in `mcpx.yml` immediately, before this PR?~~ Done in #182.\n2. Does `ubuntu-slim` work for `ci-ok` (needs `gh`/`jq`)? Try it here.\n3. Keep `mcpx.yml`'s file name for the Nix job to avoid disturbing Renovate's config comments, or rename everything at once?\n\n## Ease · Impact · Related\n\n**Ease** M · **Impact** high (roughly halves CI wall time and produces the data for everything else) · **Depends on / related**: #95, #135 (design), #139 (replaces the static shards), #140 (turns the table into a gate), #141 (grows the lint leg), #93 / #121 (seed slot), #49 (vendorHash repair moves), #138 (environment allowlist; the e2e shards inherit the runner's environment until it lands), #52 (closed, fixed in #182; the daemon count after e2e guards it), #97 (legs added later), #99.\n\nSecurity/auth deferred; see tracker.\n\n## Acceptance criteria\n\n- Split CI (init/unit/3 e2e shards/lint/nix build/ci-ok) runs in GitHub Actions and the baseline timing table is recorded on this issue, superseding the serial-job numbers in the body.\n- The work described in the Summary/Scope above is delivered via a branch + PR (no direct push to main); verification runs in GitHub Actions CI, not on the sandbox.\n- Evidence (CI links, timings, or probe output as applicable) is recorded on this issue before it is closed.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-28T23:03:37Z","url":"https://github.com/developing-today/code/issues/1998"}
| 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:8fba9b43-9623-be00-21bc-207fa993ec24 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4EE:D0B9B:5D2DF6:7D7C7F:6B062840 |
| html-safe-nonce | f52583eee3b906be73906d8ba64eb745c8e645e1b82853478669c651f39fa8f8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEVFOkQwQjlCOjVEMkRGNjo3RDdDN0Y6NkIwNjI4NDAiLCJ2aXNpdG9yX2lkIjoiMTE5NjU1NDE2OTM1Njc4OTgyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3918bffd58dd63257b33cce5f60b23f1548039cdecc9d38d9b6550aa5a75b5a0 |
| hovercard-subject-tag | issue:6089115499 |
| 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/1998/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c04b18bbe2bfcd1ba904c8668eaac4a29d7272b38a509ed5494ab96124bbcbc/developing-today/code/issues/1998 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c04b18bbe2bfcd1ba904c8668eaac4a29d7272b38a509ed5494ab96124bbcbc/developing-today/code/issues/1998 |
| og:image:alt | Relocated from dezren39/darwin-nix#143 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue referenc... |
| 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 | 9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce |
| 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 | 32e57d5cc2ce6ce92ec6dceb65858344750c27c2 |
| 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