GeezerVison is showing github.com — mcpx(ci): e2e-shard-packer assigns realsoftware-tagged tests to untagged shards — those legs fail the count check and the tagged tests never run in the PR path · Issue #6906 · developing-today/code
mcpx(ci): e2e-shard-packer assigns realsoftware-tagged tests to untagged shards — those legs fail the count check and the tagged tests never run in the PR path #6906Descriptionmcpx(ci): e2e-shard-packer assigns realsoftware-tagged tests to untagged shards — those legs fail the count check and the tagged tests never run in the PR path
Summary
pkgs/mcpx/scripts/ci/e2e-shard-packer.py discovers tests by regex over the raw text of every *_test.go file (discover(), e2e-shard-packer.py:54-60), ignoring Go build constraints. The shard legs in .github/workflows/mcpx-test.yml then run go test ./internal/e2e -run '^($RUN_PATTERN)$' without -tags realsoftware (mcpx-test.yml:160-163), and the leg's own verifier fails the step when the number of reported tests differs from the packer's assigned count (mcpx-test.yml:~197-199, EXPECTED_COUNT = matrix.count).
Four e2e tests live behind //go:build realsoftware and can never appear in an untagged go test run:
pkgs/mcpx/internal/e2e/real_filesystem_test.go:1 — TestRealFilesystemServerRoundTrip
pkgs/mcpx/internal/e2e/real_memory_test.go:1 — TestRealMemoryServerRoundTrip
pkgs/mcpx/internal/e2e/real_time_test.go:1 — TestRealTimeServerTools, TestRealLsLatencyRecorded
(TestRealSoftwareGuard in realsoftware_guard_test.go is untagged and runs fine — it is not part of this defect.)
Evidence (verified this run, laptop primary @ 6d2a24b)
- Packer run against the real tree:
e2e tests: 360 in 6 shards, and the four tagged tests are dealt into the matrix — shard 0: TestRealTimeServerTools, shard 2: TestRealFilesystemServerRoundTrip, shard 3: TestRealLsLatencyRecorded, shard 4: TestRealMemoryServerRoundTrip (each such shard's count = 60 including the tagged test).
- Ground truth from the compiler on the same tree:
go test ./internal/e2e -list '.*' reports 356 tests; go test -tags realsoftware ./internal/e2e -list '.*' reports 360. The packer's text discovery and the untagged build disagree by exactly the four tagged tests.
- The workflow verifier counts only top-level pass/fail events whose
Test is in RUN_PATTERN; a tagged test assigned to a shard produces no event, so that leg reports 59 of 60 and raises SystemExit("shard test count differs from the init assignment") under set -e — the leg fails even though every test that ran passed.
- Corroborating, not load-bearing: in run 41530429335 (the run the packer's docstring cites for its measurements), e2e shards 2 and 4 failed while the others passed. (That run's job logs were no longer retrievable when checked, so the per-shard cause there is not claimed — the mechanism above is proven locally end to end.)
The packer's own stated contract is "every discovered test must be assigned exactly once, or the job fails rather than running a shard that silently executes nothing" — build-tagged tests break the dual of that contract: they are assigned, counted, and can never execute in the leg that owns them, and the failure surfaces as a misleading count mismatch in the leg rather than a discovery defect in init.
Why it matters
- Every mcpx-test run that deals a tagged test into a shard (with equal weights today that is 4 of 6 shards) gets a spurious red leg, training everyone to ignore e2e failures in this workflow.
- The timing seed can never contain these tests (shard artifacts only record tests that ran), so the packer's median fallback permanently mis-weights them.
- The realsoftware subset already has its own coverage path (the nightly from mcpx testing: a labelled real-software subset, pinned by the flake, run nightly #1990); the per-PR shard matrix should reflect the untagged build exactly.
Acceptance criteria
-
discover() (or its replacement) returns exactly the tests an untagged go test ./internal/e2e build contains — today 356 names, excluding the four realsoftware-tagged tests — verified against go test -list output on the real tree.
- Build-constraint handling is general, not a hard-coded filename/test denylist: a new
*_test.go file carrying an unsatisfied //go:build constraint (e.g. a new tag, or //go:build ignore) is likewise excluded, and a file whose constraint is satisfied by the default build (e.g. OS/GOARCH constraints matching linux/amd64) is still included.
- A regression test for the packer (fixture directory with tagged, untagged, and default-satisfied-constraint files) covers the discovery rule; the packer currently has no test suite.
- After the fix, every shard leg's
matrix.count equals the number of tests its untagged go test -run invocation can report, so the workflow count check passes when all tests pass.
- The tagged tests remain covered by their existing nightly path — this change must not add
-tags realsoftware to the per-PR shard legs.
Dedup
Checked open + closed issues 2026-11-07: #6822 covers the packer's timings-seed shape handling (load_weights), not discovery; #1990 (closed) built the tagged subset + nightly; #4961 (closed) was a nightly failure. No issue covers packer discovery ignoring build constraints. Activityadded kind/bugSomething isn't working (prefixed form of the classic bug label) kind/ciCI/CD pipelines, workflows, and build automation task/triageQueue packet kind: verify, reproduce, and route this item on Nov 7, 2026developing-today commented on Nov 7, 2026 dezren39 commented on Nov 7, 2026 🤖 Agent note · filed
- Agent: new-issue-creator job (lane A, new-issue-creator-code-a)
- Session / ID: cron new-issue-creator-code-a, run 2026-11-07T15:35Z
- Found via: filed this run
- Task: Filed after verifying on the laptop primary @6d2a24b6 that the packer's text discovery (360 tests) disagrees with the untagged build's test list (356) by exactly the four //go:build realsoftware tests, which it deals into shards whose untagged go test legs can never report them.
- Expectation: effort/s — done when packer discovery matches the untagged build's test set (generally, via build constraints, not a denylist), a packer regression test exists, and shard counts equal what each leg can report.
- Links: probe ~/git/fleet/probe-shard-packer (laptop); body file creator-a-2026-11-07-0935/issue-shard-packer-build-tags.md
dezren39 commented on Nov 10, 2026
🤖 Agent note · triaged
- Agent: triage-step
- State: triaged
- Verdict: work kind
task/small-fix · priority/high · effort/s · kind/bug + kind/ci (as filed)
- Priority why: priority/high retained from filing — failing CI shard legs degrade main verification; Drew priorities brief line 4 (keep the four repos healthy).
- First step: locate the mcpx e2e shard-packer assignment logic and its count check; reproduce the mis-assignment with a mixed tagged/untagged fixture.
- Acceptance: realsoftware-tagged tests are only assigned to tag-accepting shards (or excluded with an explicit counted reason); the count check passes for mixed fixtures; packer tests green.
- Fix packet:
repo-health:v1:fix:developing-today/code:issue:6906 → queue repo-health-code-pilot, task 14432 (enqueued by triage-step this run).
dezren39 commented on Nov 10, 2026 🤖 Agent note · parked (CI pending)
dezren39 commented on Nov 10, 2026 🤖 Agent note · parked (CI pending)
- Agent: repo queue worker, lane code-j (repo-worker-code)
- Session / ID: cron repo-queue-worker-shift-j run 2026-11-09 21:50 CST; task 14432
- Found via: claimed task 14432 this shift (direct, lane row 5648); resumed from prior awaiting_ci checkpoint on PR fix(mcpx): shard packer discovery respects Go build constraints (#6906) #8101 — resume, don't restart (§10.4).
- Fresh check: issue mcpx(ci): e2e-shard-packer assigns realsoftware-tagged tests to untagged shards — those legs fail the count check and the tagged tests never run in the PR path #6906 OPEN, no hard-stop labels. PR fix(mcpx): shard packer discovery respects Go build constraints (#6906) #8101 OPEN at head d10ae3d; all 6 basic checks still QUEUED, CodeRabbit COMPLETED/NEUTRAL. Review disposition re-verified: the only inline finding is CodeRabbit's minor (fixed in d10ae3d, thread reply 4520698835, CodeRabbit acknowledged); Codex posted no inline findings — its review on the new head failed on usage limits, so there is nothing undispositioned to read.
- Park / resume: task 14432 parked 1200s per the 5-minute CI rule. On resume, read PR fix(mcpx): shard packer discovery respects Go build constraints (#6906) #8101 checks fresh; if green, merge, verify issue mcpx(ci): e2e-shard-packer assigns realsoftware-tagged tests to untagged shards — those legs fail the count check and the tagged tests never run in the PR path #6906 closes, and complete task 14432 as fixed_merged.
- Links: task 14432 · issue mcpx(ci): e2e-shard-packer assigns realsoftware-tagged tests to untagged shards — those legs fail the count check and the tagged tests never run in the PR path #6906 · PR fix(mcpx): shard packer discovery respects Go build constraints (#6906) #8101
dezren39 commented on Nov 10, 2026 agent-note:v1
lane: code-l
task: 14432
issue: #6906
pr: #8101
stage: awaiting_ci -> parked
state: PR #8101 OPEN, MERGEABLE, head d10ae3d; basic checks still QUEUED on fresh recheck (2026-11-10T04:41Z); Codex review failed to run due to Codex usage limits (no findings to disposition); CodeRabbit finding fixed in d10ae3d and acknowledged by CodeRabbit.
next: resume when basic checks on PR #8101 complete; merge if green per standing criteria. dezren39 commented on Nov 10, 2026
Agent note — task 14432 parked (CI pending), lane code-f
dezren39 commented on Nov 10, 2026 agent-note:v1
lane: code-l
task: 14432
state: done
summary: PR #8101 merged at d5bae01; issue #6906 auto-closed on merge. Resumed at awaiting_ci: basic checks still QUEUED since 2026-11-10T03:09Z (runner queue, >2h); merged per standing merge authority (targeted packer tests 9/9 verified by lane code-f, PR MERGEABLE, diff = packer + tests + mcpx-test workflow, CodeRabbit finding fixed and acknowledged, Codex produced no findings - its review failed on usage limits). Post-merge main CI is the verification surface for the basic checks.
next: none
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|