Skip to content

chore: ignore the runtime artifacts a local test run writes into the tree - #3363

Merged
bpamiri merged 1 commit into
developfrom
chore/ignore-generated-test-artifacts
Aug 4, 2026
Merged

chore: ignore the runtime artifacts a local test run writes into the tree#3363
bpamiri merged 1 commit into
developfrom
chore/ignore-generated-test-artifacts

Conversation

@bpamiri

@bpamiri bpamiri commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

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.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 sweeps them into the diff.

That happened twice:

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:

✓ 4757 passed (0 fail, 0 error)
regenerated: 7 files

And with the ignore in place, a complete suite run now leaves git status entirely 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

…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>

@wheels-bot wheels-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json and /rewrite.config only match the repo root, so the 15+ legitimately-tracked box.json files (tools/build/core/box.json, examples/tweet/box.json, vendor/wheels/tests/_assets/plugins/**/box.json, …) and cli/lucli/templates/app/rewrite.config are all untouched. No root-level box.json/rewrite.config is 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-tracked F952D54F1096E25C030C8E3149ABD8C4.cfm in 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 .gitignore comment — 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
bpamiri merged commit 31a59e8 into develop Aug 4, 2026
10 checks passed
@bpamiri
bpamiri deleted the chore/ignore-generated-test-artifacts branch August 4, 2026 15:29
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>
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