Skip to content

fix(scripts): check:changed runs an eval's grader tests when its cases change - #804

Merged
lukemaj merged 3 commits into
mainfrom
fix/check-changed-eval-cases
Nov 18, 2026
Merged

lukemaj merged 3 commits into
mainfrom
fix/check-changed-eval-cases

Conversation

@lukemaj

@lukemaj lukemaj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

What: vp run check:changed now runs evals/<eval>/run.test.ts when a file under evals/<eval>/cases/ changes.
Why: a changed case file selected no test, because selection only picked tests beside changed code files; on #802 a new case broke evals/mcp-tool-use/run.test.ts and only CI caught it.
So what: ready for independent review, then merge.

Closes #803

Change

  • scripts/check-changed.ts: new evalCaseTests(files) maps each evals/<eval>/cases/... path to evals/<eval>/run.test.ts; checkChanged adds it next to docReaderTests when the file exists. Every other path is unchanged.
  • scripts/check-changed.test.ts: one new case (secrets and file-links cases select the grader once; an eval README and a cases/ dir outside evals/ select nothing).
  • scripts/check-changed.ts is an upstream file, so it is registered under fork-maintenance in docs/fork-features.md and scripts/fork-upstream-edits.txt. Upstream (pingdotgg/t3code main, PRs, Issues) has no fix for this.

Elon record

  • Requirements and who asked: AGENTS.md requires check:changed before push to run the tests beside changes; the PR feat(server): agents save a value shown in a browser tab to a private file #802 worker hit this gap on 2026-11-18.
  • Deleted: running all eval tests on any evals/ change.
  • Bottleneck: test selection in scripts/check-changed.ts (docReaderTests and the beside-file loop).
  • Checked myself: read scripts/check-changed.ts: selection uses only CODE files and their *.test.* siblings; .ndjson cases match neither.

Proof

  • Failing first: vp test run scripts/check-changed.test.ts -t "eval's grader" before the fix: Tests 1 failed | 17 skipped (18).
  • After the fix: vp test run scripts/check-changed.test.ts: Tests 18 passed (18).
  • vp run check:changed: format, lint, knip 1/2 and 2/2, typecheck (1 package), test (1 file) all pass.
  • bash scripts/fork-check.sh --upstream upstream: fork-check: OK.

Done by Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

lukemaj and others added 3 commits November 18, 2026 11:58
…s change

A changed evals/<eval>/cases/ file selected no test, so a broken case
reached CI unseen. check:changed now adds evals/<eval>/run.test.ts when
it exists.

Closes #803

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S labels Nov 18, 2026
@lukemaj

lukemaj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

What: Independent review round 1 passes head 69a9627d19320686e274028c7bcffd827fefb806; no blocking findings.
Why: The four-file diff implements #803's case-to-grader selection with an existence guard and the required upstream-edit registration.
So what: The parent can use this exact-head review verdict when assessing the remaining merge gates.

Reviewed Issue #803 in full, repository AGENTS.md including Verifying/test rules, docs/fork.md, the entire gh pr diff 804 -R toolboxmd/chromeria, each commit with git show, and surrounding selection/execution code. Base: main, 5d3c5ba248faa6eca63d951cdc67e1da41783f3d (ancestor of reviewed head).

Findings: none blocking.

  • scripts/check-changed.ts:259: anchored matching selects only evals/<eval>/cases/ descendants, derives the sibling run.test.ts, and deduplicates it. At line 378, fs.exists(inRoot(test)) prevents adding absent graders. Existing code-file, doc-reader, package and test execution paths retain their behavior. Deleted case paths are also covered because selection uses files, rather than only present.
  • scripts/check-changed.test.ts:53: the focused unit test is at the path-selection layer beside the existing doc-reader test. It checks the secrets path and duplicate selections, with non-case inputs. The real evals/mcp-tool-use/run.test.ts exists and reads cases/secrets.ndjson; this selects unit grader checks, not the paid eval runner. The existence guard and end-to-end command wiring are assessed by source inspection rather than additional test coverage.
  • docs/fork-features.md:362 and scripts/fork-upstream-edits.txt:281: both script files exist upstream (their pre-fix blobs match local upstream/main) and are now listed exactly once under fork-maintenance and in the carried-edit allowlist. PR fix(scripts): check:changed runs an eval's grader tests when its cases change #804 is a valid registry addition because the owned file set changes. No unrelated files or edits.

Proof assessed: PR reports failing-first Tests 1 failed | 17 skipped (18), followed by 18 passed, scoped checks and fork-check. Independently inspected the completed CI Test job log: check-changed.test.ts (18 tests) passed, job https://github.com/toolboxmd/chromeria/actions/runs/44290860548/job/134755687433; checkout log identifies the merge of this exact head into the stated base. Fork Stack Model also succeeded on this head.

Limitations: no local test execution or worktree creation; the historical failing-first transcript is reported in the PR, not independently replayed. The new helper does not exist on base, so transplanting the test alone fails on its missing export rather than exercising the former command selection. Source inspection independently confirms the former code had no case-to-grader mapping. CI proof is the GitHub synthetic merge, not a separate local exact-head run. No paid evals, edits to checkouts, fixes, or PR watch.

Reviewer: GPT-6.1-sol, Codex harness; did not author the change.

@lukemaj
lukemaj merged commit ac95824 into main Nov 18, 2026
24 checks passed
@lukemaj
lukemaj deleted the fix/check-changed-eval-cases branch November 18, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check:changed skips an eval's grader tests when only its case files change

1 participant