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
all: enhance CLAUDE.md with test verification and release build requirements
Add explicit test verification requirements to prevent false test successes:
- Verify tests actually ran by checking output for "X passed" where X > 0
- Never trust exit code 0 alone as cargo can exit successfully with 0 tests run
- Re-run with corrected filters if no tests were executed
Add mandatory cargo build --release step to catch linking/optimization issues
that cargo check might miss, preventing CI build failures.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
TEST_CASE=grafted cargo test -p graph-tests --test integration_tests -- --nocapture
92
103
```
93
104
105
+
**⚠️ Test Verification Requirements:**
106
+
-**ALWAYS verify tests actually ran** - Check the output for "test result: ok. X passed" where X > 0
107
+
-**If output shows "0 passed" or "0 tests run"**, the TEST_CASE variable or filter was wrong - fix and re-run
108
+
-**Never trust exit code 0 alone** - Cargo can exit successfully even when no tests matched your filter
109
+
94
110
**Important Notes:**
95
111
- Integration tests take significant time (several minutes)
96
112
- Tests automatically reset the database between runs
@@ -103,11 +119,15 @@ cargo fmt --all
103
119
104
120
# 🚨 MANDATORY: Check code for warnings and errors - MUST have zero warnings
105
121
cargo check
122
+
123
+
# 🚨 MANDATORY: Build in release mode to catch linking/optimization issues that cargo check misses
124
+
cargo check --release
106
125
```
107
126
108
127
🚨 **CRITICAL REQUIREMENTS for ANY implementation**:
109
128
-**🚨 MANDATORY**: `cargo fmt --all` MUST be run before any commit
110
129
-**🚨 MANDATORY**: `cargo check` MUST show zero warnings before any commit
130
+
-**🚨 MANDATORY**: `cargo build --release` MUST complete successfully before any commit
111
131
-**🚨 MANDATORY**: The unit test suite MUST pass before any commit
112
132
113
133
Forgetting any of these means you failed to follow instructions. Before any commit or PR, ALL of the above MUST be satisfied! No exceptions!
@@ -247,5 +267,5 @@ The setup combines built-in services-flake services with custom multiService mod
247
267
-**PostgreSQL**: Uses services-flake's postgres service with a helper function (`mkPostgresConfig`) that provides graph-specific defaults including required extensions.
248
268
249
269
**Custom Services** (located in `./nix`):
250
-
-`ipfs.nix`: IPFS (kubo) with automatic initialization and configurable ports
270
+
-`ipfs.nix`: IPFS (kubo) with automatic initialization and configurable ports
251
271
-`anvil.nix`: Ethereum test chain with deterministic configuration
0 commit comments