Skip to content

gitignore: .hrx123/ is run output, so copyright --check stops reding a developer clone (fixes #1564) - #1577

Closed
bong-water-water-bong wants to merge 1 commit into
mainfrom
pi-docs/1564-jsonl-gate
Closed

bong-water-water-bong wants to merge 1 commit into
mainfrom
pi-docs/1564-jsonl-gate

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Fixes #1564. tools/copyright.py --check reds a developer clone on files that are not in the repository.

Cause, and why .gitignore is the honest fix

The gate lists tracked files plus untracked-but-not-ignored ones (#1414, so a new file cannot pass on a green it never earned) through:

listing("--others", "--exclude-standard")     # tools/copyright.py:171

--exclude-standard honours .gitignore — and nothing ignored .hrx123/, so three probe logs arrived as:

no comment style known (add one to LINE_STYLES/BLOCK_STYLES or EXEMPT): .hrx123/logs/probe-dumpcheck.jsonl

That is a red about the working tree, not about the repository: the shape that teaches people to skip the gate which caught base-modes-keep's duplicated licence block within two hours (#1551 → #1560).

Measured in a clean worktree of 15713661

state --check
before, with .hrx123/logs/probe.jsonl present rc=1, 1 line naming .hrx123
after .hrx123/ is ignored rc=0, 0 lines naming it
untracked evil_probe.py with no header (the #1414 property) rc=1, and the failure names the file
tests/copyright_check_untracked_test.py 0 failures, including "an ignored file is left out"

Why .gitignore and not an EXEMPT entry

.hrx123/ is entirely run output on this fleet — nothing under it is tracked on main (git ls-tree -r origin/main -- .hrx123 is empty) — and ignoring it also stops a log being committed by accident, which is how a dump/ tree would get in. EXEMPT would hide a run log from the gate even if someone committed it, which is the wrong side to err on; a path that must stay visible can be un-ignored deliberately.

One line plus a two-line comment in .gitignore; no code change, so the gate's behaviour on source is untouched.

tools/copyright.py --check lists tracked files plus untracked-but-not-ignored
ones (#1414, so a new file cannot pass on a green it never earned), and
`git ls-files --others --exclude-standard` honours .gitignore. Nothing ignored
.hrx123/, so three probes' logs in a developer clone arrived as

    no comment style known (add one to LINE_STYLES/BLOCK_STYLES or EXEMPT): .hrx123/logs/probe-dumpcheck.jsonl

That is a red about the working tree, not about the repository - the shape that
teaches people to skip the gate that caught base-modes-keep's duplicated block
within two hours (#1551 -> #1560).

Measured in a clean worktree of 1571366, before and after, with a run log
present (.hrx123/logs/probe.jsonl):

    before: rc=1, 1 line naming .hrx123
    after : rc=0, 0 lines

and the #1414 property is intact - an untracked evil_probe.py with no header
still reds the gate (rc=1, and the failure names it). tests/copyright_check_untracked_test.py
still passes 0 failures, including "an ignored file is left out".

.gitignore rather than an EXEMPT entry, because .hrx123/ is entirely run output
on this fleet (nothing under it is tracked on main) and ignoring it also stops a
log being committed by accident, which is how a dump/ tree would get in. A path
that must stay visible to the gate can still be un-ignored deliberately.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

@pi-prs ready for review at 81e16a9. Fixes #1564: one .gitignore entry (.hrx123/), because the gate already uses ls-files --others --exclude-standard. Measured before/after in a clean worktree: rc=1 with 1 named log -> rc=0; an untracked headerless source file still reds (the #1414 property); tests/copyright_check_untracked_test.py 0 failures.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Closing as a duplicate of #1568 — my mistake, and worth naming.

I claimed #1564 from a sweep of issues with zero comments and did not search open PRs for an existing fix first. #1568 (59bdc2be) had already put .hrx123/logs/ in .gitignore 13 minutes before my branch was pushed. That is precisely the duplicate the fleet was warned about tonight, and the check that would have caught it is one command I skipped:

gh pr list -R 1bit-MONSTER/engine --search "1564"

For the record, the only substantive difference in mine: I ignored .hrx123/ (the whole tree) where #1568 ignores .hrx123/logs/. I reproduced the same before/after (rc=1 with the named log → rc=0, while an untracked headerless .py still reds, and tests/copyright_check_untracked_test.py passes) — so #1568 does fix it, and the narrower path is defensible if dump/ is meant to stay visible.

Nothing of this branch is worth carrying: #1568 is the smaller, already-verdicted change. Commented there with the one-line thought rather than opening a competing diff.

@bong-water-water-bong
bong-water-water-bong deleted the pi-docs/1564-jsonl-gate branch November 10, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant