Skip to content

Conversation

fubhy
Copy link
Member

@fubhy fubhy commented Aug 20, 2025

Summary

  • Add explicit test verification requirements to prevent false test successes from cargo test commands that match 0 tests
  • Add mandatory cargo build --release step to catch linking/optimization issues that cargo check might miss

Test plan

  • Review changes to CLAUDE.md documentation
  • Verify all test sections now include verification requirements
  • Confirm release build is added to mandatory pre-commit checks

🤖 Generated with Claude Code

CLAUDE.md Outdated
@@ -103,11 +119,15 @@ cargo fmt --all

# 🚨 MANDATORY: Check code for warnings and errors - MUST have zero warnings
cargo check

# 🚨 MANDATORY: Build in release mode to catch linking/optimization issues that cargo check misses
cargo build --release
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release builds are really slow. Wouldn't cargo check --release be enough here? That can sometimes fail because of conditional compilation, but I've never seen a linking/optimization error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea. I just noticed that I was getting build errors in CI sometimes despite cargo check passing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will ask claude to adjust with your feedback later

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just changed it to cargo check --release for now so I can merge this

…rements

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 <noreply@anthropic.com>
@lutter lutter merged commit 50383a5 into master Aug 20, 2025
6 checks passed
@lutter lutter deleted the claude-md branch August 20, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants