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: .coderabbit.yaml
+2-348Lines changed: 2 additions & 348 deletions
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,8 @@ reviews:
19
19
poem: false # Do not write a literal poem (spammy)
20
20
enable_prompt_for_ai_agents: false # Disable prompts for AI agents (spammy)
21
21
22
+
# --- CUSTOM INSTRUCTIONS FOR EXAMPLES DIRECTORY ---
22
23
path_instructions:
23
-
# --- CUSTOM INSTRUCTIONS FOR EXAMPLES DIRECTORY ---
24
24
- path: "examples/**/*"
25
25
instructions: |
26
26
You are acting as a senior maintainer reviewing SDK examples. Your goal is to ensure examples work verbatim for users who copy-paste them.
@@ -63,352 +63,6 @@ reviews:
63
63
- Be concise, technical, and opinionated.
64
64
- Flag out-of-scope improvements as potential new issues rather than blocking.
65
65
66
-
# --- UNIT TESTS REVIEW INSTRUCTIONS ---
67
-
- path: "tests/unit/**/*"
68
-
instructions: |
69
-
You are acting as a senior maintainer reviewing unit tests for the hiero-sdk-python project. Your goal is to ensure tests are extensive, deterministic, and protect against breaking changes.
70
-
71
-
**CRITICAL PRINCIPLES - Tests Must Fail Loudly & Deterministically**:
72
-
- Tests must provide useful error messages when they fail for future debugging.
73
-
- No `print()` statements - use assertions with descriptive messages.
74
-
- No timing-dependent or unseeded random assertions.
75
-
- No network calls or external dependencies (unit tests are isolated).
76
-
- No unjustified TODOs or skipped tests without tracking issues.
77
-
78
-
**PRIORITY 1 - Protect Against Breaking Changes**:
79
-
- Assert public attributes exist (e.g., `assert hasattr(obj, 'account_id')`).
80
-
- Assert return types where relevant (e.g., `assert isinstance(result, AccountId)`).
- Assert backward-compatible defaults are maintained.
83
-
- If a breaking change is introduced, tests must assert deprecation behavior and test old behavior until removal.
84
-
85
-
**PRIORITY 2 - Constructor & Setter Behavior**:
86
-
- Test constructor behavior with valid inputs, edge cases, and invalid inputs.
87
-
- Test setter behavior including method chaining (fluent interface).
88
-
- Verify that setters validate input and raise appropriate exceptions.
89
-
- Test that getters return expected values after construction/setting.
90
-
91
-
**PRIORITY 3 - Comprehensive Coverage**:
92
-
- Unit tests should be extensive - test even if we don't expect users to use it currently.
93
-
- Cover happy paths AND unhappy paths/edge cases.
94
-
- Test boundary conditions, null/None values, empty collections, etc.
95
-
- Avoid brittle ordering assertions unless order is part of the contract.
96
-
97
-
**PRIORITY 4 - No Mocks for Non-Existent Modules**:
98
-
- All imports must reference actual SDK modules - no hallucinated paths.
99
-
- Validate import paths against the actual `src/hiero_sdk_python` structure.
100
-
- Mocks should only be used for external dependencies, not SDK internals.
101
-
102
-
**PRIORITY 5 - Test Framework Philosophy**:
103
-
- Prefer repetitive but clear tests over abstracted helper functions.
104
-
- Some core functionality may warrant helper files (considered an exception).
105
-
- Discourage custom helper functions; prefer pytest fixtures when shared setup is needed.
106
-
- Prefer testing real functionality over mocked behavior.
107
-
108
-
**AVOID**:
109
-
- Linter or formatting feedback (leave that to ruff/pre-commit).
110
-
- Nitpicking minor stylistic issues unless they impact maintainability.
111
-
- Overly abstracted test helpers that obscure what's being tested.
112
-
113
-
**PHILOSOPHY**:
114
-
- Unit tests protect our future selves - be defensive and forward-looking.
115
-
- Tests should be readable by SDK developers: clear names, brief docstrings, key inline comments.
116
-
- When tests fail, we should immediately know what broke and why.
117
-
118
-
# --- INTEGRATION TESTS REVIEW INSTRUCTIONS ---
119
-
- path: "tests/integration/**/*"
120
-
instructions: |
121
-
You are acting as a senior maintainer reviewing integration tests for the hiero-sdk-python project. Your goal is to ensure end-to-end tests validate real network behavior safely and deterministically.
0 commit comments