chore(claude): learn from #278#284
Closed
claude[bot] wants to merge 1 commit into
Closed
Conversation
Add a hard rule that tests mutating module-level state (e.g. the dedup flags `_CONTROL_MODE_WARNED` / `_SKIP_TIMESTAMP_WARNED` in `lerobot_dataset.py`) must save and restore the original value via try/finally. Captured from the reviewer "fix the nit" feedback on #278. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
[claude-review] summary for commit 65f6b63 No blocking issues found.
|
Member
|
Not worth an entry in project-level CLAUDE.md |
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.
What this does
Captures one rule from the reviewer feedback on #278 and adds it to
CLAUDE.mdas hard rule #6:Context: #278 added a second module-level dedup flag
(
_SKIP_TIMESTAMP_WARNED) alongside the existing_CONTROL_MODE_WARNEDinsrc/opentau/datasets/lerobot_dataset.py.The first round of that PR's test mutated the flag without restoring
it; the reviewer's
@claude fix the nitcomment asked for atry/finallysave/restore so the test doesn't leave the flagflipped for subsequent tests in the same pytest-xdist worker. The
shape of the fix landed as
test_skip_timestamp_warning_emitted_once_per_processin
tests/datasets/test_datasets.py, which the new rule pointsto as the canonical example.
This is a recurring concern — there are now two such flags in the
same file, and the dedup pattern is likely to grow as more
mixture-wide warnings get added. Recording it here means future
tests in this codebase get the convention right on the first try
without re-litigating the nit.
No code changes; documentation only.
How it was tested
CLAUDE.md, no executable code touched.How to checkout & try? (for the reviewer)
Checklist
🤖 Generated with Claude Code