fix(tests): stop staging fake skills into the operator's real review queue - #291
Merged
Conversation
…queue test_skill_routes hit /api/skill/review through a TestClient, and the handler writes to ~/.codec/skill_reviews — the REAL one. Every run of the suite left a live `test_review.py` sitting in the Skills tab waiting for human approval. Six had accumulated before anyone looked; three landed in a single afternoon of test runs while preparing the demo. routes/skills.py already anticipated exactly this — `_reviews_dir()` is a function rather than a constant, documented "so tests can monkeypatch it to a tmp dir for isolation". Nothing ever did. An autouse fixture now points it at tmp_path. Verified: real review count is 6 before the suite and 6 after (was +1 per run). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Mickael noticed "weird looking skill creation requests" piling up in the Skills tab. They weren't weird — they were ours.
test_skill_routesposts to/api/skill/reviewthrough a TestClient, and the handler writes to~/.codec/skill_reviews— the real one. Every suite run left a livetest_review.pyawaiting human approval. Six had accumulated; three landed in one afternoon of test runs while preparing the demo.The irony:
routes/skills.pyanticipated this exactly —Nothing ever did. An autouse fixture now points it at
tmp_path.Verified: real review count 6 before the suite, 6 after — previously +1 per run. The 6 stale artifacts were cleared through the app's own reject endpoint (not by deleting files behind its back); only the genuine
moon_phase.pyremains.