You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,16 @@
25
25
- Comments should explain **why**, not **what**. Describe the purpose and reasoning, not the mechanics that the code already shows.
26
26
- New features must include corresponding tests and documentation updates.
27
27
28
+
### Test discipline
29
+
30
+
- Tests verify contracts, not implementations: a test is well-formed only if a different correct implementation of the same contract passes it.
31
+
- Before writing a test, name the concrete incorrect behavior it would catch; if you cannot name one, do not write it.
32
+
- Assert on observable outcomes through public/stable interfaces; do not assert private method return values or exact internal strings unless pinning a specific fixed bug (justify in a comment).
33
+
- Anchor to an external oracle or an independently derived reference instead of re-implementing the logic under test.
34
+
- Mocks must stand in for a collaborator's documented contract (schema, protocol), never for internals of the module under test.
35
+
- Changes that affect the external contract at the training-loop or inference level require integration tests, not just unit tests (e.g. a minimal training loop with `SimpleModel`).
36
+
- Integration tests must be executed on actual devices, not merely written: report the execution hardware spec and results in the PR.
Copy file name to clipboardExpand all lines: CLAUDE.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,16 @@
25
25
- Comments should explain **why**, not **what**. Describe the purpose and reasoning, not the mechanics that the code already shows.
26
26
- New features must include corresponding tests and documentation updates.
27
27
28
+
### Test discipline
29
+
30
+
- Tests verify contracts, not implementations: a test is well-formed only if a different correct implementation of the same contract passes it.
31
+
- Before writing a test, name the concrete incorrect behavior it would catch; if you cannot name one, do not write it.
32
+
- Assert on observable outcomes through public/stable interfaces; do not assert private method return values or exact internal strings unless pinning a specific fixed bug (justify in a comment).
33
+
- Anchor to an external oracle or an independently derived reference instead of re-implementing the logic under test.
34
+
- Mocks must stand in for a collaborator's documented contract (schema, protocol), never for internals of the module under test.
35
+
- Changes that affect the external contract at the training-loop or inference level require integration tests, not just unit tests (e.g. a minimal training loop with `SimpleModel`).
36
+
- Integration tests must be executed on actual devices, not merely written: report the execution hardware spec and results in the PR.
0 commit comments