Skip to content

Fix all cargo check warnings and enforce zero-warning requirement#6101

Merged
fubhy merged 1 commit intoclaudefrom
fix-cargo-check-warnings
Aug 14, 2025
Merged

Fix all cargo check warnings and enforce zero-warning requirement#6101
fubhy merged 1 commit intoclaudefrom
fix-cargo-check-warnings

Conversation

@fubhy
Copy link
Member

@fubhy fubhy commented Aug 14, 2025

Summary

Fixes all 16 cargo check warnings across the codebase and updates CLAUDE.md to make cargo check a mandatory requirement for all implementations.

Changes Made

🔧 Cargo.toml Fix (1 warning)

  • Remove invalid doc = false key from stable-hash_legacy git dependency

🔕 Dead Code Warnings (4 warnings)

  • Add #[allow(dead_code)] to reference implementations and test utilities:
    • PoI struct and helper functions in proof_of_indexing/reference.rs
    • AscSubgraphEntityOp enum in runtime/wasm
    • CopyVid struct in store/postgres

Lifetime Syntax Warnings (11 warnings)

  • Add explicit '_ lifetime parameters to fix confusing syntax across:
    • graph/src/components/store/write.rs (2 fixes)
    • graph/src/util/timed_rw_lock.rs (4 fixes)
    • runtime/wasm/src/module/instance.rs (1 fix)
    • store/postgres files (4 fixes)

📚 Documentation Updates

  • Update CLAUDE.md to make cargo check mandatory alongside tests
  • Establish clear success criteria: tests pass + zero warnings + formatting
  • Add stronger enforcement language for code quality requirements

Validation

cargo check now produces zero warnings
All existing tests continue to pass
Code is properly formatted

New Development Requirements

Going forward, ALL implementations must satisfy:

  1. 🚨 MANDATORY: All tests MUST pass
  2. 🚨 MANDATORY: cargo check MUST show zero warnings
  3. 🚨 MANDATORY: cargo fmt --all MUST be run after editing ANY .rs file

This ensures consistent code quality and prevents warnings from accumulating in the codebase.

🤖 Generated with Claude Code

@fubhy fubhy requested review from incrypto32 and lutter August 14, 2025 10:10
Fixes all 16 cargo check warnings across the codebase:

**Cargo.toml fixes:**
- Remove invalid `doc = false` key from git dependency

**Dead code warnings:**
- Add #[allow(dead_code)] to reference implementations and test utilities
- PoI struct and helper functions (proof_of_indexing/reference.rs)
- AscSubgraphEntityOp enum (runtime/wasm)
- CopyVid struct (store/postgres)

**Lifetime syntax warnings:**
- Add explicit '_ lifetime parameters to fix confusing syntax
- Fix 11 lifetime warnings across store, runtime, and utility modules

**Documentation updates:**
- Update CLAUDE.md to make `cargo check` mandatory alongside tests
- Establish clear success criteria: tests pass + zero warnings + formatting
- Add stronger enforcement language for code quality requirements

All tests pass and cargo check now produces zero warnings.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@fubhy fubhy force-pushed the fix-cargo-check-warnings branch from d5b70b5 to 58e107e Compare August 14, 2025 10:28
@fubhy fubhy merged commit ebcde81 into claude Aug 14, 2025
6 checks passed
fubhy added a commit that referenced this pull request Aug 14, 2025
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.

1 participant