Repository navigation
Description
Finding
PR #4398 (merge 545be40ba6f4, closes #3320) taught pkgs/mcpx/scripts/affected-tests.py to render untracked files as added diff lines for the T1b exported-identifier scan, the T2 registry-name scan, and the e2e newEnv harness check. One diff consumer was left unpatched: changed_test_names still derives its changed-line ranges solely from git diff, which is silent about untracked files — so tests in an untracked e2e file never receive the changed-test prioritization the function exists to provide.
Evidence (verified on current main b337e1ac8b41f4c3b48e9ef47acf9e5c4d06bf0f)
pkgs/mcpx/scripts/affected-tests.py:266—changed_test_names(mcpx, e2e_rel_paths, root, base); at:280it runsgit diff --unified=0 <base> -- pkgs/mcpx/<path>per e2e file and builds test line ranges from the hunks. For an untracked filegit diffprints nothing, the range list is empty, and the functioncontinues past the file.pkgs/mcpx/scripts/affected-tests.py:550— the call site passesedited_e2e_all, which includes untracked e2e files (they are in the change set viagit ls-files --others), so untracked files reach the function and are silently dropped by it.pkgs/mcpx/scripts/affected-tests.py:584—prioritized = [t for t in changed_e2e_tests ...]is placed ahead of ranked name matches and the alphabetical fill precisely so changed tests are not truncated away at the 15-test T2 budget (see the comment block above it). Untracked-file tests miss that protection.- The untracked render added by fix(mcpx): include untracked contents in affected-tests (#3320) #4398 is applied at
:467(T1b/T2 diff text) and:547(e2enewEnvdiff) — never tochanged_test_names. - Partial mitigation already present: the
edited_e2eall-names path adds every test of an edited e2e file (untracked included) toe2e_selected, but only in the final alphabetical segment of the ordering. Selection parity therefore holds in small runs — the PR's own parity tests inpkgs/mcpx/scripts/tests/test_affected_untracked.pypass — and breaks exactly when the T2 budget truncates: a staged new e2e file's tests are prioritized, the identical untracked file's tests can be cut. (CI runs the full suite either way; this is local-selector fidelity, the same contract mcpx(affected-tests): untracked new files are counted as changed but their contents never reach the diff-text analysis — T2 name matching, T1b and harness detection silently skip them pre-commit #3320 fixed for the other three consumers.) - The parity tests added by fix(mcpx): include untracked contents in affected-tests (#3320) #4398 assert the T1b importer command, the T2 registry run-set, and the harness sample for staged vs untracked — none asserts changed-test prioritization for an untracked e2e file under a full T2 budget.
Why it matters
#3320's contract is staged/untracked parity for the selector's content-derived decisions. The one remaining consumer silently treats an untracked e2e file's tests as unedited, so the exact regression test a developer just wrote in a new file is the one the local selector may drop when the budget is tight — the failure mode the prioritization code was added to prevent.
Acceptance criteria
changed_test_names(or its call site) accounts for untracked e2e files — e.g. an untracked file's tests are treated as changed (whole-file added ranges), matching the staged-new-file result.- A parity regression in
pkgs/mcpx/scripts/tests/test_affected_untracked.py: identical e2e content staged vs untracked yields the same prioritized ordering, including a scenario where the T2 selection exceeds the 15-test budget. - Existing selector tests keep passing (
python3 -m unittest discover -s pkgs/mcpx/scripts/tests).
Filed by pr-diff-review-b from the review of PR #4398. Dedupe: gh search issues for changed_test_names returned nothing; affected-tests untracked returned only the closed parent #3320, whose fix this residual survives.
Activity
developing-today commentedon Nov 16, 2026
CODE-3924
dezren39 commentedon Nov 16, 2026
agent-note:v1
Agent: pr-diff-review-b
State: filed
Repo: developing-today/code
Source PR: #4398 (MERGED, head 66f8109, merge 545be40, ancestor-verified on main, compare behind) — closes #3320 (CLOSED, verified)
Finding: PR #4398 rendered untracked files as added diff lines for the T1b, T2 registry-name and newEnv harness scans, but changed_test_names (affected-tests.py:266, git diff --unified=0 at :280) still sees no hunks for untracked e2e files, so their tests never enter the prioritized segment (:584) and can be truncated away at the 15-test T2 budget while a staged identical file's tests are protected.
Verified against main: b337e1a (contents-API read of pkgs/mcpx/scripts/affected-tests.py; dedupe: "changed_test_names" -> nothing; "affected-tests untracked" -> only closed #3320)
Evidence: hidden_files/pr-review-2026-11-16-1718-code-b/issue-4398-changed-test-names-body.md + pr-4398.diff + pr-4398-view.json
kind/bug,task/triage,status/needs-triage,source/pr-diff-review,priority/low,queue/queued,app/mcpx
dezren39 commentedon Nov 16, 2026
🤖 Agent note · picked up
dezren39 commentedon Nov 16, 2026
🤖 Agent note · triaged
Merge pull request #10876 from developing-today/queue/17555-10874-cha…
dezren39 commentedon Nov 16, 2026
🤖 Agent note · done
changed_test_namesin pkgs/mcpx/scripts/affected-tests.py now takes the selector's untracked set and renders an untracked e2e file as one whole-file added range, so its tests enter the T2 prioritized segment exactly as a staged new file's do. Tracked/staged behavior unchanged.test_changed_tests_untracked_parity_over_t2_budget(18 tests in reverse name order over the 15-test T2 budget; staged output byte-identical to untracked) fails on the pre-fix selector and passes with the fix; full selector suitepython3 -m unittest discover -s pkgs/mcpx/scripts/tests= 30 tests OK on the laptop. Codex review on PR fix(mcpx): changed_test_names whole-file ranges for untracked e2e files (#10874) #10876 failed to run (Codex usage limits) — no findings were posted to disposition.dezren39 commentedon Nov 16, 2026
agent-note:v1
state: done (already_done — duplicate follow-on)
task: 17562 (queue repo-health-code-pilot, lane any-a, worker repo-worker-code)
issue: #10874
This follow-on packet (enqueued from task 17555's triage at 2026-11-16T23:43:17Z) duplicates work task 17555 itself completed in the same session: the changed_test_names untracked fix was implemented, regression-tested, and merged as PR #10876 (MERGED 2026-11-16T23:41:42Z, merge commit 5c64e99 — gh-verified by this lane), and issue #10874 is CLOSED with status:done. No further work exists for this packet; task 17562 completes as already_done.