fix(gitignore): keep the bytecode rule in evals/ #267

Merged
claudiomaradonna merged 1 commit from windmill-implement/266-4322 into main 2026-12-01 15:32:51 +01:00
Collaborator

Why

Every repository the source adopts copies the root .gitignore as it is — docs/INSTALL.md, step 2 of the adoption steps — but evals/ stays in the source, so the copied .gitignore has always carried a rule and a comment that serve only the source's compiled readers: # Python bytecode of the eval readers and __pycache__/, added in commit 6930f9c for evals/evidence.py. An adopted repository holds text that names files it does not have, and its change review reports the entry as needless text that the adoption steps give it no way to drop.

Closes #266

What changed

The rule and its comment move from the root .gitignore into evals/.gitignore, which stays in the source with the readers it serves. The copied .gitignore — what every adopter receives — no longer carries either. The source's own bytecode exclusion is preserved: evals/__pycache__/*.pyc stays ignored, and the pre-existing check in tests/agent-config/real-source.sh guards it.

No other file changes; the validator, the tests, and the documents keep their current text.

How to verify

Base 7e74699 (main), branch windmill-implement/266-4322 at 7f979bd.

Scenario A — the rule moves with the readers (a fresh checkout): on the base, git check-ignore -q scripts/__pycache__/x.pyc exits 0 — the root rule reaches everywhere. On the branch, the same command exits non-zero — the copied .gitignore carries nothing for it. And git check-ignore -q evals/__pycache__/evidence.cpython-314.pyc exits 0 on both revisions — the source keeps its exclusion. On 7f979bd, bash tests/agent-config/real-source.sh prints all 13 agent configuration tests passed.

Scenario B — the reproduction (the defect's own test): on the base, with the branch's new check copied into the tree, bash tests/agent-config/real-source.sh prints not ok - the root .gitignore carries no bytecode rule, keeping adopters from inheriting the eval readers' while the other 12 checks pass — it fails for the reported reason. On the branch, the same command prints all 13 agent configuration tests passed.

The checks already run on 7f979bd, all from the repository root: bash tests/verify-agent-config.sh — all 362 agent configuration tests passed; bash tests/check-work-folder.sh — all 46 work-folder check tests passed; .agents/hooks/shellcheck.sh repo — 51 files clean; prettier --check '**/*.md' — all matched files use Prettier code style; scripts/verify-agent-config.sh — agent configuration statically valid: state=template; git diff --check main — clean; .agents/scripts/check-work-folder.sh --verified — no gap.

Considerations

  • The copied .gitignore no longer ignores __pycache__/ anywhere in an adopter; that is the defect being fixed. The source keeps its exclusion through evals/.gitignore, so evals/__pycache__/ is still ignored there.
  • One review finding (duplication in the new check, severity medium) was fixed in the fold: the redundant second clause is gone, the root-rule assertion is kept, and the trimmed test fails on the base for the reported reason and passes on the tip, confirmed by the later review round. No finding was set aside.
  • No new dependency, no input, no execution, no network call, no secret, and no change to the security surface: the change moves an ignore rule and adds one check over git's own check-ignore.
  • No documentation was changed; docs/INSTALL.md, UPGRADING.md, and every other tracked file keep their current text.
## Why Every repository the source adopts copies the root `.gitignore` as it is — `docs/INSTALL.md`, step 2 of the adoption steps — but `evals/` stays in the source, so the copied `.gitignore` has always carried a rule and a comment that serve only the source's compiled readers: `# Python bytecode of the eval readers` and `__pycache__/`, added in commit 6930f9c for `evals/evidence.py`. An adopted repository holds text that names files it does not have, and its change review reports the entry as needless text that the adoption steps give it no way to drop. Closes #266 ## What changed The rule and its comment move from the root `.gitignore` into `evals/.gitignore`, which stays in the source with the readers it serves. The copied `.gitignore` — what every adopter receives — no longer carries either. The source's own bytecode exclusion is preserved: `evals/__pycache__/*.pyc` stays ignored, and the pre-existing check in `tests/agent-config/real-source.sh` guards it. No other file changes; the validator, the tests, and the documents keep their current text. ## How to verify Base `7e74699` (main), branch `windmill-implement/266-4322` at `7f979bd`. Scenario A — the rule moves with the readers (a fresh checkout): on the base, `git check-ignore -q scripts/__pycache__/x.pyc` exits 0 — the root rule reaches everywhere. On the branch, the same command exits non-zero — the copied `.gitignore` carries nothing for it. And `git check-ignore -q evals/__pycache__/evidence.cpython-314.pyc` exits 0 on both revisions — the source keeps its exclusion. On `7f979bd`, `bash tests/agent-config/real-source.sh` prints `all 13 agent configuration tests passed`. Scenario B — the reproduction (the defect's own test): on the base, with the branch's new check copied into the tree, `bash tests/agent-config/real-source.sh` prints `not ok - the root .gitignore carries no bytecode rule, keeping adopters from inheriting the eval readers'` while the other 12 checks pass — it fails for the reported reason. On the branch, the same command prints `all 13 agent configuration tests passed`. The checks already run on `7f979bd`, all from the repository root: `bash tests/verify-agent-config.sh` — all 362 agent configuration tests passed; `bash tests/check-work-folder.sh` — all 46 work-folder check tests passed; `.agents/hooks/shellcheck.sh repo` — 51 files clean; `prettier --check '**/*.md'` — all matched files use Prettier code style; `scripts/verify-agent-config.sh` — agent configuration statically valid: state=template; `git diff --check main` — clean; `.agents/scripts/check-work-folder.sh --verified` — no gap. ## Considerations - The copied `.gitignore` no longer ignores `__pycache__/` anywhere in an adopter; that is the defect being fixed. The source keeps its exclusion through `evals/.gitignore`, so `evals/__pycache__/` is still ignored there. - One review finding (duplication in the new check, severity medium) was fixed in the fold: the redundant second clause is gone, the root-rule assertion is kept, and the trimmed test fails on the base for the reported reason and passes on the tip, confirmed by the later review round. No finding was set aside. - No new dependency, no input, no execution, no network call, no secret, and no change to the security surface: the change moves an ignore rule and adds one check over git's own `check-ignore`. - No documentation was changed; `docs/INSTALL.md`, `UPGRADING.md`, and every other tracked file keep their current text.
fix(gitignore): keep the bytecode rule in evals/
Some checks failed
Maintenance / checks (pull_request) Failing after 3m51s
Maintenance / checks (push) Successful in 9m4s
7f979bdec9
docs/INSTALL.md step 2 has an adopter copy the root .gitignore as it
is, while UPGRADING.md step 3 keeps evals/ in the source. The rule
served only evals/evidence.py, so every adopter inherited a comment
and a pattern naming readers it does not have.

The rule moves to evals/.gitignore, which stays with the readers. The
root .gitignore is clean for adopters, while the source keeps its
bytecode exclusion, shown by both checks in
tests/agent-config/real-source.sh.
First-time contributor

Review ready: 7f979bdec9

Review ready: 7f979bdec9d95e81c1d8ce8960380e2682eb9f2e
aramaki left a comment

Review: comments

Reviewed 7f979bdec9d9: 0 blocking and 2 minor findings.

Reproduced

  • 7f979bd fresh checkout: real-source.sh 13/13, verify-agent-config.sh 362/362, check-work-folder.sh 46/46, shellcheck 51 clean, prettier clean, validator statically valid, git diff --check clean.
  • check-ignore on tip: scripts/pycache/x.pyc not ignored; evals/pycache/evidence.cpython-314.pyc ignored; on the base the root rule makes scripts/x.pyc ignored.
  • Scratch copy of base + the new check: the new check fails with the reported not-ok line while the other 12 pass; on the branch all 13 pass.

Questions and details

  • Should docs/INSTALL.md step 2 or 4 mention that the copied .gitignore no longer ignores bytecode, so stacks with compiled readers add it themselves?
## Review: comments Reviewed `7f979bdec9d9`: 0 blocking and 2 minor findings. **Reproduced** - 7f979bd fresh checkout: real-source.sh 13/13, verify-agent-config.sh 362/362, check-work-folder.sh 46/46, shellcheck 51 clean, prettier clean, validator statically valid, git diff --check clean. - check-ignore on tip: scripts/__pycache__/x.pyc not ignored; evals/__pycache__/evidence.cpython-314.pyc ignored; on the base the root rule makes scripts/x.pyc ignored. - Scratch copy of base + the new check: the new check fails with the reported not-ok line while the other 12 pass; on the branch all 13 pass. **Questions and details** - Should docs/INSTALL.md step 2 or 4 mention that the copied .gitignore no longer ignores bytecode, so stacks with compiled readers add it themselves?
@ -16,6 +16,13 @@ else
not_ok "$name"
fi
name="the root .gitignore carries no bytecode rule, keeping adopters from inheriting the eval readers'"
First-time contributor

Minor: The test name trails off with an apostrophe ('...the eval readers'') — the fold's trim cut the clause, leaving a dangling fragment. Finish the sentence.

**Minor:** The test name trails off with an apostrophe ('...the eval readers'') — the fold's trim cut the clause, leaving a dangling fragment. Finish the sentence.
@ -17,2 +17,4 @@
fi
name="the root .gitignore carries no bytecode rule, keeping adopters from inheriting the eval readers'"
if ! git -C "$REPO_ROOT" check-ignore -q scripts/__pycache__/x.pyc; then
First-time contributor

Minor: The check proves only that the scripts path is not ignored, so a scoped root rule like evals/pycache/ would still pass while the name would be false and the rule would reach adopters. Reading the root .gitignore for a bytecode rule would match the claim.

**Minor:** The check proves only that the scripts path is not ignored, so a scoped root rule like evals/__pycache__/ would still pass while the name would be false and the rule would reach adopters. Reading the root .gitignore for a bytecode rule would match the claim.
First-time contributor

Command failed

The agent did not complete this command, so nothing came of it. A person should look at this thread.

The run failed at step "aoe_purge". The operator reads the job logs in the Windmill editor, or finds the run with: wmill job list --path f/agents/bot_commands

## Command failed The agent did not complete this command, so nothing came of it. A person should look at this thread. The run failed at step "aoe_purge". The operator reads the job logs in the Windmill editor, or finds the run with: `wmill job list --path f/agents/bot_commands`
claudiomaradonna deleted branch windmill-implement/266-4322 2026-12-01 15:34:08 +01:00
Sign in to join this conversation.
No description provided.