Skip to content

Delete the two committed tool transcripts that hold master red - #853

Merged
philcunliffe merged 1 commit into
masterfrom
fix/issue-852
Aug 18, 2026
Merged

Delete the two committed tool transcripts that hold master red#853
philcunliffe merged 1 commit into
masterfrom
fix/issue-852

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

git rm x/npm-test.log x/typecheck.log. That is the whole change.

Why master is red

test/core/repo-scratch-hygiene.test.js has been failing on master since the
day it merged:

not ok 1938 - no tool transcript is tracked in the repo

a `.log` file is a tool transcript, not source; delete it and let `.gitignore` hold the line:
  x/npm-test.log
  x/typecheck.log

Both files are tracked (git ls-tree origin/master -- x/), and both arrived on
merge commit adb448ab (#785) through the same git add -A sweep that #786
introduced this test to catch. The files predate the test, so it was red on
arrival rather than regressed into. Every branch cut since inherits the failure,
which is currently blocking CI on #833, #849, #850 and #851, none of which touch
x/ or the hygiene test.

Why nothing else changes

No .gitignore edit. *.log is already committed there, and the file's
second test (.gitignore refuses a tool transcript) passes today, including on
the x/npm-test.log probe. The rule was never missing; a tracked path is simply
immune to an ignore rule, which is exactly why the hygiene file carries two
tests instead of one. Adding anything here would be adding a rule that is
already doing its job.

No other file under x/ removed. The test forbids tracked .log files and
nothing else, so burst.mjs, invert.mjs, line_asker.fixed.js,
line_asker.orig.js, msg.txt, order.mjs, pty_prog.mjs and
pty_variants.mjs are outside what this fix is authorized to decide. Whether
that scratch belongs in the tree is a real question; it is not this PR's, and
answering it here would put an unreviewed judgement inside an unblock.

No change to the test. The failing assertion is correct and its message
names the fix. Weakening it would delete the guard that caught this.

Verification

Both run in a clean detached worktree at origin/master with a temp HYP_HOME:

before after
npm test 4482 pass, 1 fail, 1 skipped 4483 pass, 0 fail, 1 skipped
npm run typecheck clean clean

The single before-failure is the hygiene test; nothing else on master is red.
The pass count rises by one because that same test now passes.

Fixes #852

`test/core/repo-scratch-hygiene.test.js` has been failing on `master` since it
merged: `x/npm-test.log` and `x/typecheck.log` are tracked, and the test's first
half asserts no `.log` is. Both came in on `adb448ab` (#785) via the `git add -A`
sweep that #786 wrote this test to catch; the files predate the test, so it was
red on arrival. Every branch cut since inherits it, currently blocking #833,
#849, #850 and #851 for a reason none of them caused.

The transcripts are deleted rather than the test relaxed, which is what its
message asks for. `.gitignore` needs nothing: `*.log` is already committed and
the rule test already passes, since an ignore rule cannot reach a path that is
already tracked. That asymmetry is the whole reason the file carries two tests.

Scope is exactly the two `.log` paths. The other eight files under `x/` are
untouched: the hygiene test forbids tracked transcripts and nothing else, and
sweeping up scratch it does not name would be a judgement this fix has no
authority to make.

Fixes #852

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@philcunliffe

philcunliffe commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Neutral review round: 7649c04d - clean

No actionable findings. The diff is exactly the two deletions, the guard is untouched, and I reproduced red-before / green-after from a clean detached worktree.

What was verified

1. The diff is exactly two deletions, nothing else.

$ git diff --name-status origin/master 7649c04d
D	x/npm-test.log
D	x/typecheck.log

gh pr view 853 --json files agrees: x/npm-test.log +0 -24648, x/typecheck.log +0 -5. One commit, and it already contains the current origin/master tip (ec3361bb), so MERGEABLE is not stale.

2. The guard is not weakened. git diff origin/master 7649c04d -- test/core/repo-scratch-hygiene.test.js is empty, as is the diff for .gitignore. The whole PR touches no file other than the two logs, so no ignore rule was broadened and nothing that could hide real source was added.

3. .gitignore already covers the class. *.log is committed at .gitignore:24, under a comment at line 23 naming this test. test/core/repo-scratch-hygiene.test.js:86 (.gitignore refuses a tool transcript) passes on origin/master today, including on the x/npm-test.log probe, and the probes run under --no-index, so they read the rules alone and do not depend on the deleted files existing. No .gitignore edit is needed and none was made - correct call.

4. Leaving the other eight files under x/ is right. The failing assertion at test/core/repo-scratch-hygiene.test.js:81 is trackedFiles().filter(f => f.endsWith('.log')) - .log and nothing else. burst.mjs, invert.mjs, line_asker.fixed.js, line_asker.orig.js, msg.txt, order.mjs, pty_prog.mjs and pty_variants.mjs are outside what the test forbids, and x/ is not in package.json files, so they do not reach the published set either. Whether that scratch belongs in the tree is a separate question and correctly not answered here. After this PR, git ls-tree -r --name-only 7649c04d | grep '\.log$' is empty repo-wide, not just under x/.

5. Provenance as described: red on arrival, not a regression.

$ git log --oneline --diff-filter=A -- x/npm-test.log x/typecheck.log
adb448ab Close the rl.question EOF-hang class ... (#785)      2026-08-18 12:24:32
$ git log --oneline --diff-filter=A -- test/core/repo-scratch-hygiene.test.js
bf9e4773 Tool transcripts cannot be committed again ... (#796) 2026-08-18 12:25:44
$ git merge-base --is-ancestor adb448ab bf9e4773 && echo YES
YES

The files were added once at adb448ab and never deleted before this PR; the test has not been touched since bf9e4773 landed. So the test merged already-red and was never green on master. Both bodies characterise this correctly.

Reproduction

Clean detached worktree, no node_modules needed (the file imports only node builtins):

node --test test/core/repo-scratch-hygiene.test.js
origin/master 3 tests, 2 pass, 1 fail (no tool transcript is tracked in the repo)
7649c04d 3 tests, 3 pass, 0 fail

Nothing outside the test references either deleted path (git grep on the head tree hits only the ignore-rule probes at test/core/repo-scratch-hygiene.test.js:92-94, which are path strings, not file reads).

Non-blocking note (no change requested)

Issue #852's body says the test came from "PR #786". #786 is an issue ("Follow-up: deferred review findings from PR #785"); the test actually landed in PR #796 (bf9e4773). The PR body here writes it as bare #786, which reads fine as the issue that requested the test. The substantive claim - that the test was red from the moment it merged - is accurate in both. Not worth a push on a green unblocker; recording it here instead.

Verdict

Ship it. Minimal, correct, and it is what unblocks the other open PRs inheriting master's red hygiene test.


Corroborated review: two independent passes, zero findings, no contradictions between them. This record was posted after the first pass alone; the second returned afterwards and is folded in here rather than posted as a separate comment. codex is not available in this environment, so the second pass is a separate agent, not a second vendor. Every claim above is direct evidence re-derived in a clean detached worktree at origin/master and at 7649c04d.

What the second pass added, all consistent with the above: after the deletion git ls-tree -r <head> | grep '\.log$' is empty and the tracked-file count is 1185, far above the files.length > 500 floor asserted at the end of the same test file; the neighbouring repo lints (house-style-em-dash.test.js, llp-ref-hygiene.test.js) are 13/13 green on the branch; neither .github/workflows/ci.yml nor llp-check.yml references .log or x/; and the deleted content is regenerable transcript (x/typecheck.log is 5 lines ending TC EXIT=0, x/npm-test.log is raw TAP). It reached the same conclusion on the eight remaining x/ scratch files: outside what this guard forbids, worth a follow-up issue, not a change here.

@philcunliffe philcunliffe added the neutral:approved neutral reviewed this and holds it for a maintainer merge (own or adopted PR; LLP 0025/0030) label Aug 18, 2026
@philcunliffe
philcunliffe merged commit 3f46f5b into master Aug 18, 2026
9 checks passed
@philcunliffe
philcunliffe deleted the fix/issue-852 branch August 18, 2026 22:19
philcunliffe pushed a commit that referenced this pull request Aug 19, 2026
x/npm-test.log and x/typecheck.log are tracked leftovers from the
git add -A sweep in #785 (pre-dating the repo-scratch-hygiene test
added by #786). master already carries this fix via #853; this
branch forked before that landed, so it inherited the red test
separately. Same fix, scoped to the same two paths.
philcunliffe pushed a commit that referenced this pull request Aug 19, 2026
Fixes the CI failure on this branch: fix/issue-854 forked before
master deleted the two committed tool transcripts (x/npm-test.log,
x/typecheck.log) that trip the repo-scratch-hygiene test. Bringing
master's fix in resolves the failing 'no tool transcript is tracked
in the repo' test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

neutral:approved neutral reviewed this and holds it for a maintainer merge (own or adopted PR; LLP 0025/0030)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

master is red: committed tool transcripts x/npm-test.log and x/typecheck.log trip repo-scratch-hygiene

1 participant