chore: ignore the runtime artifacts a local test run writes into the tree - #3363
Merged
Conversation
…tree Removes seven generated TestBox stub files that should never have been committed, and stops the whole class of mistake at the source. `public/testbox/system/stubs/*.cfm`, `rewrite.config` and a root `box.json` are all written into the working tree by a local test run or dev server. None are source. None were ignored either — so any `git add -A` after running the suite swept them into the diff. That happened twice. I caught it in self-review across the #3334 / #3350 / #3349 / #3325 / #3351 batch and cleaned all five branches before they merged. I then did exactly the same thing on #3362 and did not catch it, so seven stubs are on develop. Verified they really are regenerated rather than needed: deleting every file in public/testbox/system/stubs/ and running the full core suite gives 4757 pass / 0 fail / 0 error, with TestBox recreating seven of them during the run. With the ignore in place a full run now leaves `git status` completely clean, which is the property that was missing. One file (F952D54F…) was already tracked before any of this and is deliberately left alone — ignoring a directory does not untrack what is already in the index, and it is not mine to remove in a cleanup commit. Signed-off-by: Peter Amiri <peter@alurium.com>
Contributor
There was a problem hiding this comment.
Wheels Bot — Reviewer
TL;DR — This chore removes seven generated TestBox mock stubs that were accidentally committed onto develop (via #3362) and adds three .gitignore entries so the whole class of git add -A-after-a-test-run mistake stops at the source. The change is correctly scoped, the deletions are verified-regenerable, and there are no code paths to break. Verdict: approve.
Conventions
.gitignore— The root-anchored form is the right call and I verified it does not over-reach./box.jsonand/rewrite.configonly match the repo root, so the 15+ legitimately-trackedbox.jsonfiles (tools/build/core/box.json,examples/tweet/box.json,vendor/wheels/tests/_assets/plugins/**/box.json, …) andcli/lucli/templates/app/rewrite.configare all untouched. No root-levelbox.json/rewrite.configis tracked, so nothing source is being shadowed.- The added block also fixes the pre-existing missing trailing newline on the file — small but nice.
Correctness
- The seven deleted files are TestBox-generated
_mock*/tmp_*statemachine stubs (e.g.tmp_closeSSEStream_…,tmp_$getChannelEngine_…), which are runtime mock artifacts, not source. The PR body documents a full-suite run (4757 pass / 0 fail / 0 error) that regenerates them, which matches their content. Safe to remove.
Non-blocking note
public/testbox/system/stubs/ignores the whole directory, which leaves the already-trackedF952D54F1096E25C030C8E3149ABD8C4.cfmin a tracked-but-ignored state (a gitignore entry does not untrack an indexed file). This is intentional and clearly documented in both the commit message and the.gitignorecomment — flagging only so a future reader is not surprised that one stub is still versioned while its siblings are ignored. No action needed.
Clean chore with an unusually thorough justification. Nice work closing the loop at the source rather than re-cleaning branches.
bpamiri
added a commit
that referenced
this pull request
Aug 4, 2026
…ed them (#3364) Third occurrence of the same slip, with a wrinkle worth recording. PR #3363 untracked seven generated TestBox stubs and added the .gitignore entries that stop them coming back. PR #3360 then merged on top and re-added all seven — its branch was cut from 2c98644, before the ignore existed, and it was committed with `git add -A` while the paths were still untrackable-but-not-ignored. Merging the cleanup first and the older branch second undid the cleanup. The .gitignore is on develop now, so a branch cut from this point cannot repeat it. This commit just finishes what #3363 started: seven removals, no other change. Verified after committing that exactly one stub remains tracked — F952D54F…, which predates all of this and is deliberately left alone. The lesson is about ORDER, not just about `git add -A`: after merging a cleanup PR, every already-open branch that predates it still carries the thing that was cleaned, and merging it silently reverts the fix. Check the remaining branches for it before merging them, not after. Signed-off-by: Peter Amiri <peter@alurium.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes seven generated TestBox stub files that should never have been committed, and stops the whole class of mistake at the source.
What happened
public/testbox/system/stubs/*.cfm,rewrite.configand a rootbox.jsonare all written into the working tree by a local test run or dev server. None are source. None were ignored either — so anygit add -Aafter running the suite sweeps them into the diff.That happened twice:
super<name>originals are only registered for model overrides — controller/view helper overrides get nosuperLinkTo()#3325 / Job.cfc persists jobClass from GetMetadata(this).name, whose casing is not guaranteed stable across reloads/engines #3351 batch, and all five branches were cleaned before merging.Cleaning the branches was treating the symptom. This is the fix.
Verified rather than assumed
Removing tracked files is only safe if they are genuinely regenerated. Deleting every file in
public/testbox/system/stubs/and running the full core suite:And with the ignore in place, a complete suite run now leaves
git statusentirely clean — which is the property that was missing and the reason this kept happening.One file deliberately left alone
F952D54F…was already tracked before any of this. Ignoring a directory does not untrack what is already in the index, so it stays exactly as it is — it is not mine to remove in a cleanup commit. Worth knowing it is there, because its presence is what makes a stray stub look unremarkable at a glance.🤖 Generated with Claude Code