GeezerVison is showing github.com — test(mcpx): plumb one run seed through tests and CI (#1949) by developing-today[bot] · Pull Request #7690 · developing-today/code
Conversation
developing-today
Bot
commented
Nov 8, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Implements the still-missing run-seed transport from #1949 (Approach C), reusing the landed gen derivation (#1956) and seedstore/collector (#1953). Queue task 13250.
What lands
internal/testsupport/seed — the lazy helper. MCPX_TEST_SEED is read only when a test asks for a stream (seed.Source(t, "name", version)), so unrelated packages stay cacheable; there is no TestMain anywhere. Set + valid → used as-is (any [A-Za-z0-9._-]{1,128} id replays; only wrapper/CI mint, and they mint UUIDv7). Unset in CI → fail closed. Unset locally → mint once per process with a warning. On failure the helper logs the exact one-command replay. The package doc is the Phase 2: membership, delegation, groups, and server config #172 test-only env allowlist entry (same shape as MCPX_TEST_REQUIRE's).
pkgs/mcpx/scripts/test.sh — the wrapper entrypoint: mints once if unset (warns, records to gitignored .cache/test-seed/), validates, exports the seed to every go test process, derives -shuffle from the same seed, fails closed in CI. Root .gitignore gains a negation so the script is tracked despite the test.* rule.
mcpx.yml — new seed job mints one UUIDv7 per run (or accepts the new workflow_dispatch seed input for exact replay), uploads seed.json as the test-seed artifact the mcpx testing: seed store layout and collector (file per seed, artifact + scheduled collector) #1953 collector files into testdata/seeds/v1, and test / stress-pr / stress-nightly now need it and receive MCPX_TEST_SEED. The stress jobs derive -shuffle from the run seed instead of RUN_IDENTITY; re-running failed jobs reuses the seed because the successful seed job is not re-run.
mcpx-test.yml — init mints and outputs the seed; unit and e2e jobs receive it; the wrapper regression tests run in the unit job.
TESTING.md — run-seed section: wrapper usage, the bare-go test per-package limitation, CI behaviour, replay.
Verification
go test ./internal/testsupport/seed/ ./internal/seedstore/ -count=1 — pass (laptop). go vet clean, gofmt clean, bash -n clean.
- Wrapper unittest (
scripts/tests/test_mcpx_test_seed.py, fake-go oracle: asserts the exact argv + env the test process receives) — 4 tests pass.
- The shuffle derivation is implemented three times (Go helper, wrapper, workflow python) and cross-checked: seed
01a0f101-2378-7c1c-9dc1-5a1ae1571eca → 6825000031865948415 in all three. The Go test restates the formula from mcpx testing: one seed per run -- format (UUIDv7), derivation, and how it reaches every test #1949 section 2 with raw sha256 as its oracle, and pins Mint against seedstore.Timestamp (the store's independent UUIDv7 parser).
- Both workflow files parse as YAML; job graph checked (
seed has no needs; budget's existing needs are unaffected).
Pre-existing failure (not a regression)
internal/testsupport/gen TestConfigLayersProperty fails identically on a clean worktree at origin/main 6f1efc4424 — the merged-servers map leaks the host machine's real mcpx config into the fixture expectation. Filed as #7686.
Scope guards honoured: PR #5127 untouched; the landed derivation/store work is reused, not redone.
Closes the transport remainder of #1949.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Implements the still-missing run-seed transport from #1949 (Approach C), reusing the landed gen derivation (#1956) and seedstore/collector (#1953):\n\n- internal/testsupport/seed: lazy helper — MCPX_TEST_SEED is read only when a test asks for a stream, so unrelated packages stay cacheable. Set+valid is used as-is; unset in CI fails closed; unset locally mints a UUIDv7 once per process with a warning. Source() returns the gen stream for (test, generator@version) and logs the one-command replay on failure. Shuffle() restates the #1949 section 2 derivation. The package doc is the #172 test-only env allowlist entry.\n- scripts/test.sh: the wrapper entrypoint — mints once if unset (warns, records to gitignored .cache/test-seed/), validates, exports to every go test process, derives -shuffle from the same seed, fails closed in CI. Root .gitignore gains a negation so the script is tracked despite the test.* rule.\n- mcpx.yml: new seed job mints one UUIDv7 per run (or accepts the workflow_dispatch seed input for exact replay), uploads seed.json as the test-seed artifact for the #1953 collector, and test/stress-pr/stress-nightly now need it and receive MCPX_TEST_SEED. The stress jobs derive -shuffle from the run seed instead of RUN_IDENTITY; re-running failed jobs reuses the seed because the successful seed job is not re-run.\n- mcpx-test.yml: init job mints and outputs the seed; unit and e2e jobs receive it; the wrapper regression tests run in the unit job.\n- TESTING.md: run-seed section (wrapper, bare-go-test limitation, CI behaviour, replay).\n\nTests: go test ./internal/testsupport/seed/ ./internal/seedstore/ pass on the laptop; go vet clean; gofmt clean; wrapper unittest (4 tests, fake-go oracle) passes; workflow YAML parsed and job graph checked; the python shuffle derivation in the wrapper and workflows cross-checked against the Go helper (seed 01a0f101-2378-7c1c-9dc1-5a1ae1571eca -> 6825000031865948415 in all three).\n\nPre-existing failure, not a regression: internal/testsupport/gen TestConfigLayersProperty fails identically on a clean worktree at origin/main 6f1efc4 — filed as #7686.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
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:
dd9f41f8-07a3-4067-917b-341e22ab4133
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- 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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
dezren39
Awaiting requested review from dezren39
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
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.
|