Skip to content

Count a test-dir runner and skip engine sidecars in the retro test census - #4306

Closed
huongtran84 wants to merge 2 commits into
garrytan:mainfrom
huongtran84:fix/retro-test-census-sidecars
Closed

huongtran84 wants to merge 2 commits into
garrytan:mainfrom
huongtran84:fix/retro-test-census-sidecars

Conversation

@huongtran84

@huongtran84 huongtran84 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

/retro on a Godot repo whose whole suite is tests/run.gd (run with godot --headless -s tests/run.gd) reported TEST_FILES_TOTAL: 0, while TEST_FILES_CHANGED: 2 counted the tests/run.gd.uid sidecar Godot writes next to every script.

Changes (bin/gstack-retro-metrics)

  • TEST_FILES_TOTAL fallback: the filename-convention census runs first, as now. Only when it finds 0 does it count code files under tests?/, specs?/ and __tests__/, minus prose and .uid/.import/.meta. Repos that follow a convention keep today's number, so the existing "dir-homed helpers do not count" case (tests/utils.py) still passes.
  • is_test: .uid/.import (Godot) and .meta (Unity) sidecars return 0 like prose, so they leave TEST_FILES_CHANGED and TEST_INSERTIONS.

Test (test/gstack-retro-metrics.test.ts)
New fixture: games/brick.gd, tests/run.gd, tests/run.gd.uid, tests/README.md → TEST_FILES_TOTAL: 1, TEST_FILES_CHANGED: 1, TEST_INSERTIONS: 1. Seen failing before the change (0, then 2), passing after.

Verified locally: bun test test/gstack-retro-metrics.test.ts: 16 pass, 0 fail. bun test test/skill-validation.test.ts -t 'TEST_FILES_TOTAL|retro': 13 pass. Paid evals not run.

CHANGELOG: changelog.d/fix-retro-test-census-sidecars.md (patch, no important).

🤖 Generated with Claude Code

…nsus

A Godot repo whose suite is tests/run.gd follows no test filename
convention, so TEST_FILES_TOTAL read 0, while is_test counted the
tests/run.gd.uid sidecar as a second changed test file.

- TEST_FILES_TOTAL: when no conventionally named test file exists, fall
  back to code files under tests?/ spec?/ __tests__/, minus prose and
  .uid/.import/.meta. Repos that do follow a convention keep today's
  count, so dir-homed helpers still do not count there.
- is_test: .uid/.import/.meta (Godot, Unity) are metadata, not tests,
  so they leave TEST_FILES_CHANGED and TEST_INSERTIONS.
- Fixture test: tests/run.gd + run.gd.uid + README.md gives TOTAL 1,
  CHANGED 1, TEST_INSERTIONS 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trunk-io

trunk-io Bot commented Nov 12, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Thanks @huongtran84. Godot projects matter to us, and the before-and-after fixture makes the problem easy to see. We're picking it up: we'll bring the change onto current main ourselves and credit you when it lands.

@capy-ai

capy-ai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Thank you for this. We're picking up the idea. A maintainer agent working through a batch of fixes (our tracking thread GSTA-802) will first reproduce the problem on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author, because we don't merge outside branches directly, and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed.

@capy-ai

capy-ai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Thanks @huongtran84. We rebuilt this on current main and merged it in #4677 (ef72e41), with you credited as co-author. A test runner kept in tests/ without a test-style name now counts, and Godot .uid/.import and Unity .meta files no longer count as tests. Closing this PR in favor of that one.

@capy-ai capy-ai Bot closed this Nov 22, 2026
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