Skip to content

Commit f91737d

Browse files
justin808claude
andauthored
Improve CLAUDE.md with testing requirements and clarity (#2096)
## Summary Adds critical testing requirements and documentation improvements to CLAUDE.md to help prevent CI iteration loops and ensure more reliable fixes. ## Changes ### Testing Requirements - **Require local testing before claiming fixes** - Developers must test locally before pushing - **Distinguish confirmed vs hypothetical fixes** - Clear language requirements ("Fixed" vs "SHOULD fix") - **Document testing limitations** - When local testing isn't possible, state why clearly - **Provide reproduction steps** - Even if you can't test locally, document how to reproduce ### Documentation Updates - **Clarify Pro changelog location** - It's at root, not in - **Add CI failure analysis guidance** - Steps for reproducing and marking untested fixes - **Update Pro changelog commands** - Correct rake command for Pro changelog updates - **Improve organization** - Better formatting and clearer sections ## Why This Matters These guidelines help prevent: - Pushing hopeful fixes and waiting for CI feedback - Claiming fixes work when they haven't been tested - Confusing reviewers about what's been verified vs what's theoretical ## Testing - ✅ Documentation-only change - ✅ No code changes required 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated internal documentation for testing workflows and CI failure analysis procedures. * Refined developer guidance for changelog management and verification processes. *Note: This release contains no user-facing changes.* <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8f31aca commit f91737d

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

CLAUDE.md

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,32 @@ Top-level documentation (like README.md, CONTRIBUTING.md) should remain at the r
2929

3030
These requirements are non-negotiable. CI will fail if not followed.
3131

32+
**CRITICAL - LOCAL TESTING REQUIREMENTS:**
33+
34+
1. **NEVER claim a test is "fixed" without running it locally first**
35+
- If working in Conductor workspace or similar isolated environment, clearly state: "Cannot test locally in isolated workspace"
36+
- If test requires specific environment (database, Redis, etc.), state: "Requires [X] setup not available in current environment"
37+
38+
2. **Distinguish hypothetical fixes from confirmed fixes:**
39+
- ✅ Use "This fixes..." or "Fixed" ONLY after local verification
40+
- ⚠️ Use "This SHOULD fix..." or "Proposed fix (UNTESTED)" when you haven't verified
41+
- 📋 Use "Analysis suggests..." or "Root cause appears to be..." for investigation without fixes
42+
43+
3. **When analyzing CI failures:**
44+
- Clearly mark all analysis as "UNTESTED - requires local reproduction" unless verified
45+
- Provide exact commands to reproduce and test the fix locally
46+
- State why you cannot test if applicable (workspace restrictions, missing services, etc.)
47+
48+
4. **Prefer local testing over CI iteration:**
49+
- Don't push "hopeful" fixes and wait for CI feedback
50+
- Test locally first whenever technically possible
51+
- Document what you tested and what results you got
52+
53+
5. **Document your testing:**
54+
- Include test commands in commit messages for complex fixes
55+
- Note in PR descriptions which fixes were tested locally vs. which are hypothetical
56+
- Explain any testing limitations encountered
57+
3258
**🚀 AUTOMATIC: Git hooks are installed automatically during setup**
3359

3460
Git hooks will automatically run linting on **all changed files (staged + unstaged + untracked)** before each commit - making it fast while preventing CI failures!
@@ -73,6 +99,21 @@ Pre-commit hooks automatically run:
7399

74100
**CRITICAL: NEVER wait for CI to verify fixes. Always replicate failures locally first.**
75101

102+
**When Analyzing CI Failures:**
103+
104+
1. **First, reproduce the failure locally** using the tools below
105+
2. **If you cannot reproduce locally**, clearly state why:
106+
- "Working in Conductor isolated workspace - cannot run full Rails app"
107+
- "Requires Docker/Redis/PostgreSQL not available in current environment"
108+
- "Integration tests need full webpack build pipeline not set up locally"
109+
3. **Mark all proposed fixes as UNTESTED** until they can be verified:
110+
- ❌ DON'T: "This fixes the integration test failures"
111+
- ✅ DO: "This SHOULD fix the integration test failures (UNTESTED - requires local Rails app with webpack)"
112+
4. **Provide reproduction steps** even if you can't execute them:
113+
- Include exact commands to run
114+
- Document environment requirements
115+
- Explain what success looks like
116+
76117
#### Switch Between CI Configurations
77118

78119
The project tests against two configurations:
@@ -196,11 +237,11 @@ cd react_on_rails_pro && bundle exec rake rbs:validate
196237

197238
**IMPORTANT: This is a monorepo with TWO separate changelogs:**
198239
- **Open Source**: `/CHANGELOG.md` - for react_on_rails gem and npm package
199-
- **Pro**: `/react_on_rails_pro/CHANGELOG.md` - for react_on_rails_pro gem and npm packages
240+
- **Pro**: `/CHANGELOG_PRO.md` - for react_on_rails_pro gem and npm packages
200241

201242
When making changes, update the **appropriate changelog(s)**:
202243
- Open-source features/fixes → Update `/CHANGELOG.md`
203-
- Pro-only features/fixes → Update `/react_on_rails_pro/CHANGELOG.md`
244+
- Pro-only features/fixes → Update `/CHANGELOG_PRO.md`
204245
- Changes affecting both → Update **BOTH** changelogs
205246

206247
### Changelog Guidelines
@@ -211,7 +252,7 @@ When making changes, update the **appropriate changelog(s)**:
211252
- **Use `/update-changelog` command** for guided changelog updates with automatic formatting
212253
- **Version management after releases**:
213254
- Open source: `bundle exec rake update_changelog`
214-
- Pro: `cd react_on_rails_pro && bundle exec rake update_changelog`
255+
- Pro: `bundle exec rake update_changelog CHANGELOG=CHANGELOG_PRO.md`
215256
- **Examples**: Run `grep -A 3 "^#### " CHANGELOG.md | head -30` to see real formatting examples
216257

217258
### Beta Release Changelog Curation

0 commit comments

Comments
 (0)