r/ChatGPTCoding • u/yashna005 • 5d ago
Discussion “All tests passed” is less comforting when you ran the wrong tests
My least favorite green checkmark is the one you get after testing approximately nothing. When I tried MemT 1.0, I used a repo setup where the obvious test command only covers part of the project. The backend has its own command, needs to run from its own directory, and wants a local database. Nothing particularly weird. Just enough to eat your lunch break if you don’t know.
I went through the setup with it, did some other work, then came back to the tests. Mostly I was watching which directory and command it used. The confident paragraph afterward wasn’t going to tell me whether it ran the right suite.
With Claude Code, I’d put this stuff in CLAUDE.md. That still feels useful because I can check it myself. Using internal memory got me wondering how I’d track down an outdated instruction after the setup changes. The README is staying. I’d just like to spend less time saying “those aren’t the tests I meant.” What command in your repo runs perfectly and tells you almost nothing?
2
u/Difficult_Duty2198 5d ago
a small thing that helped me: make it run the suite with one deliberately broken assertion first. if it doesn't go red, it's running the wrong tests.
1
u/WDA_Movers 5d ago
I got to be honest, I'm confoosed
1
u/ValenciaTangerine 5d ago
Go does this one when the backend is its own module with a go.mod:
go test ./...from the root skips it, prints ok for the root package and exits 0. I just tried it on Go 1.26 with a failing test in a nested module. The root run was green, and it only failed after I cd'd into that folder and ran it there. Whatever the agent says it ran, ask for the directory too.1
u/JaseciLabs 5d ago
Have the agent print the exact command, directory and how many tests ran. A zero or suspiciously low count is the tell, and a green check alone isn't.
1
u/dusanodalovic 5d ago
for the outdated instruction part, i'd keep the command in the repo and not in the agent's memory. a line like "backend tests: make test-backend" in CLAUDE.md at least shows up in git when someone changes it. does MemT tell you which memory it used for a run? that would answer most of my worry
1
u/Ebitsch_Nenegale 4d ago
Why not alias the default root test command to run both suites, or at least echo a warning explaining where the backend tests live? If an agent gets confused by the repo layout, a new dev probably would too
1
u/xqianliu 4d ago
i'd make the command part of the task itself. in my flow the ticket names the exact command that counts as done, including the working directory, and the review checks the result against the acceptance criteria in the ticket.
running the wrong suite still gives you a green checkmark. it just covered nothing you meant. naming the command per ticket beats a global memory that goes stale, because the ticket is read fresh every run.
a global note is still useful as a pointer to the repo docs, but the per-ticket line is what the agent checks against.
1
u/Lanky-Butterscotch28 4d ago
I stopped trusting the green check a long time ago. The agent picks the tests, runs them, then tells me they passed, that is the builder grading its own work. I let a different agent Codex if Claude is the builder analyse the specs and create TDD before the coding.
Claude has no access to these tests and does not know how and what Codex will test.
This proved efficient. But you need a watcher to make sure in large projects that this process is followed because both agents will drift at one time.
1
u/ThisGermanEngineer 4d ago
Instead of writing tests, you could also set up an AI agent with the sole task to “break” your code. Maybe it gets creative enough to find any bugs.
1
u/nur_plano 4d ago
This is my #1 trust issue with agents. The confident summary paragraph tells you nothing. What I want is the receipt: exact command, working directory, exit code, and how many tests ran. If the backend suite doesn't show up there, it didn't run. I now make agents print that block at the end of every run, and I have a second model check it against the repo's real test commands. (I build LetThemBuild, which does this automatically, but the habit works anywhere.)
1
u/Saver411 4d ago
If you let an agent guess how to test a split repo, it will pick the path of least resistance every single time.
I don't let models invent test commands. Put a strict wrapper at the root, like a Makefile target or a shell script that brings up the local database, walks into each directory, and executes the full suite. The agent only gets permission to run that single target.
If the model has to remember three directories and a local db flag, it's going to lie with a green checkmark.
1
u/Financial_Leader9701 4d ago
I’d temporarily make one assertion in the test I care about fail, then rerun the exact command the agent used
If it’s still green, that test probably never ran
I’d put the command and the directory to run it from right in the task
What tipped you off that it was running the wrong suite?
1
u/Sea-Chip-3684 2h ago
Wrong Tests, Right Green Checkmark.