Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
020f34d
Test GPG signing with ryankung@ieee.org
RyanKung Sep 21, 2025
e4c4578
refactor: Transform castorix from binary to binary+library architecture
RyanKung Sep 23, 2025
bd01836
Remove environment variable usage from all modules except consts
RyanKung Sep 23, 2025
869c871
Create centralized test_consts.rs module for environment variable man…
RyanKung Sep 23, 2025
362fdce
Implement strict import guidelines and create development rules
RyanKung Sep 23, 2025
c83f933
Remove unavailable submit-proof-eip712 command
RyanKung Sep 23, 2025
4d39ee0
Rename ens create command to ens proof
RyanKung Sep 23, 2025
a673370
Update and enhance README.md with comprehensive improvements
RyanKung Sep 23, 2025
ae8007a
Add comprehensive ENS workflow integration test
RyanKung Sep 23, 2025
678107b
Add Base blockchain support with dedicated node and comprehensive tests
RyanKung Sep 23, 2025
156e603
Optimize Base node startup performance
RyanKung Sep 23, 2025
2dbe44d
Refactor node startup commands with unified CLI interface
RyanKung Sep 23, 2025
d0ff77c
Fix compilation errors and warnings
RyanKung Sep 23, 2025
bcec11d
Update default RPC URLs to official public endpoints
RyanKung Sep 23, 2025
9fa47a1
Apply code formatting improvements
RyanKung Sep 23, 2025
52195d8
Fix import formatting to use one import per line
RyanKung Sep 23, 2025
9e58c68
Setup git flow and PR testing infrastructure
RyanKung Sep 23, 2025
504e5a7
Fix GitHub Actions workflow issues with generated files
RyanKung Sep 23, 2025
88a42b7
Add crates.io release management system
RyanKung Sep 23, 2025
e34c8e5
Optimize package configuration for crates.io
RyanKung Sep 23, 2025
d8af653
Fix Cursor detected bugs
RyanKung Sep 23, 2025
490bd9d
Fix clippy warnings with auto-fix
RyanKung Sep 23, 2025
a33d271
Fix import formatting issue
RyanKung Sep 23, 2025
e0046f6
fix: enforce strict test error handling - replace warning prints with…
RyanKung Sep 23, 2025
bd7a0c3
feat: add pre-commit hook for automatic formatting and linting
RyanKung Sep 23, 2025
2e9e380
fix: add nightly rustfmt component to GitHub Actions workflows
RyanKung Sep 24, 2025
a997532
fix: correct placeholder URL and binary path in CLI integration tests
RyanKung Sep 24, 2025
d84a857
feat: implement separate payment wallet support in FarcasterContractC…
RyanKung Sep 24, 2025
4c9fbf2
test: add comprehensive tests for separate payment wallet functionality
RyanKung Sep 24, 2025
4335eb1
refactor: consolidate key managers and remove unimplemented features
RyanKung Sep 24, 2025
d4a35d4
fix: resolve compilation errors and warnings
RyanKung Sep 24, 2025
d19123b
fix: resolve CI errors and improve test compatibility
RyanKung Sep 24, 2025
efaddce
docs: add Cursor AI assistant rules
RyanKung Sep 24, 2025
c391fc5
docs: migrate to latest .cursorrules format
RyanKung Sep 24, 2025
fd0cf09
feat: migrate to latest Cursor rules format (.cursor/rules/*.mdc)
RyanKung Sep 24, 2025
2ebe80c
docs: align Cursor rules with official specification
RyanKung Sep 24, 2025
5e53129
cleanup: remove deprecated .cursorrules file
RyanKung Sep 24, 2025
edbc15c
fix: remove invalid path literal from get_castorix_binary function
RyanKung Sep 24, 2025
bb16d94
fix: improve Anvil node startup in integration tests
RyanKung Sep 24, 2025
3c63322
fix: make integration tests fail fast when critical components fail
RyanKung Sep 24, 2025
b842b7e
fix: ensure all integration tests panic on critical failures
RyanKung Sep 24, 2025
4ead563
fix: correct anvil fork-block-number parameter usage
RyanKung Sep 24, 2025
637e934
fix: improve test error handling and workflow optimization
RyanKung Sep 24, 2025
031e15a
refactor: clean up duplicate implementations and optimize code structure
RyanKung Sep 24, 2025
62de6b3
fix: improve test node startup and make ENS resolution more strict
RyanKung Sep 24, 2025
08806c6
style: improve code formatting in test file
RyanKung Sep 24, 2025
b329714
fix: resolve protobuf field type compatibility issues
RyanKung Sep 24, 2025
58a404f
fix: resolve integration test timeout issues by using single-threaded…
RyanKung Sep 24, 2025
683b224
feat: implement complete Base ENS workflow with 9-char hash domains
RyanKung Sep 24, 2025
861c8c2
fix: ensure node startup does not block test processes
RyanKung Sep 24, 2025
c1fd814
feat: Add comprehensive Python integration tests and fix storage path…
RyanKung Sep 24, 2025
476cc1b
feat: Enhance Python integration tests with ENS proof generation and …
RyanKung Sep 24, 2025
ca6f395
cleanup: Remove obsolete tests and fix remaining test failures
RyanKung Sep 24, 2025
dd137c6
feat: Add Python integration tests to GitHub Actions workflow
RyanKung Sep 24, 2025
0529026
fix: Make ENS workflow test CI-friendly by gracefully handling Anvil …
RyanKung Sep 24, 2025
d0a1cd6
fix: Remove all downgrade logic from ENS workflow test - enforce stri…
RyanKung Sep 24, 2025
e958cd5
Fix custom storage_path bug in key management functions
RyanKung Sep 24, 2025
1a231db
Fix code formatting
RyanKung Sep 24, 2025
b61f8df
fix: update prompt_password function calls to use correct module path
RyanKung Sep 24, 2025
b15ae11
fix: remove Anvil dependency from ENS workflow test
RyanKung Sep 24, 2025
96960ac
fix: update test RPC configuration to use public endpoints
RyanKung Sep 24, 2025
eec2eef
docs: add comprehensive testing guide and update pre-commit script
RyanKung Sep 24, 2025
1cd9226
fmt
RyanKung Sep 24, 2025
91c7eb5
fmt
RyanKung Sep 24, 2025
ed6d8c3
fix: improve error messages for Anvil node startup failures
RyanKung Sep 24, 2025
e01a66a
🔧 Fix Anvil node startup issues in GitHub workflow
RyanKung Sep 24, 2025
e100b3c
fix: ENS test now verifies both OP and Base nodes
RyanKung Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .cargo/config.toml

This file was deleted.

53 changes: 0 additions & 53 deletions .cursor/rules

This file was deleted.

44 changes: 44 additions & 0 deletions .cursor/rules/castorix-rules.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
description: Castorix project development rules and best practices
globs:
- 'src/**/*.rs'
- 'tests/**/*.rs'
- '**/*.toml'
- '**/*.md'
alwaysApply: true
---

# Castorix Project Rules

You are an expert Rust developer working on the Castorix project, a Farcaster protocol integration tool.

## Core Behaviors
- After completing any significant task (bug fixes, feature implementation, CI/CD work, etc.), use `osascript` to notify the user
- Use meaningful notification messages that summarize what was accomplished
- Include relevant status indicators (✅ for success, ❌ for failures, etc.)
- Always provide clear summaries of work completed

## Code Quality Standards
- Always run `cargo fmt` and `cargo clippy` before committing code
- Ensure all tests pass before considering a task complete
- Use descriptive commit messages that explain the changes made
- Follow Rust naming conventions and best practices
- Use proper error handling and logging throughout the codebase

## Project-Specific Guidelines
- This is a Rust project with Farcaster protocol integration
- Tests should be cross-platform compatible (avoid hardcoded paths)
- Use `get_castorix_binary()` helper function for test binary paths
- Prefer editing existing files over creating new ones
- Add all necessary import statements and dependencies

## Communication Style
- Explain technical decisions and their rationale
- Use emojis appropriately to make output more readable
- Always verify fixes work as expected before marking tasks complete
- Provide actionable feedback and next steps when relevant

## Error Handling
- When tests fail, investigate the root cause before proposing fixes
- For CI/CD issues, check both local and remote environment differences
- Always run tests locally before pushing changes
35 changes: 35 additions & 0 deletions .cursor/rules/ci-cd.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
description: CI/CD and deployment rules for Castorix
globs:
- '.github/workflows/**/*.yml'
- '.github/workflows/**/*.yaml'
- 'Dockerfile*'
- 'docker-compose*.yml'
alwaysApply: false
---

# CI/CD Rules

## Pre-commit Checks
- Run `cargo fmt --all -- --check`
- Run `cargo clippy --all-targets --all-features -- -D warnings`
- Run `cargo test --lib`
- Check for TODO/FIXME comments in source code

## GitHub Actions
- Use latest stable Rust toolchain
- Cache cargo dependencies for faster builds
- Run tests in parallel when possible
- Use meaningful job names and descriptions

## Testing Strategy
- Unit tests must pass locally before pushing
- Integration tests should be robust and handle network failures
- Use environment variables for test configuration
- Skip tests that require external services when appropriate

## Release Process
- Tag releases with semantic versioning
- Update CHANGELOG.md for each release
- Build and test release binaries
- Verify all features work in release mode
28 changes: 28 additions & 0 deletions .cursor/rules/notification.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
description: Task completion notification requirements for Castorix project
alwaysApply: false
---

# Task Completion Notifications

## Core Requirement
- After completing any significant task (bug fixes, feature implementation, CI/CD work, etc.), ALWAYS use `osascript` to notify the user
- This is a critical requirement that must be followed for every completed task

## Notification Format
Use the following osascript command format:
```bash
osascript -e 'display notification "✅ [Task Summary]" with title "Castorix [Category]" sound name "Glass"'
```

## Examples
- ✅ CI errors fixed and code committed
- ✅ Feature implementation completed
- ✅ Bug fix deployed successfully
- ❌ Task failed - requires attention

## Status Indicators
- Use ✅ for successful completion
- Use ❌ for failures or errors
- Use 🔧 for ongoing work or maintenance
- Use 🚀 for new features or releases
33 changes: 33 additions & 0 deletions .cursor/rules/rust-standards.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
description: Rust coding standards and best practices for Castorix
globs:
- 'src/**/*.rs'
- 'tests/**/*.rs'
- 'benches/**/*.rs'
alwaysApply: false
---

# Rust Standards

## Code Formatting
- Always run `cargo fmt` before committing
- Use `cargo clippy` with `-D warnings` flag
- Follow standard Rust naming conventions (snake_case for functions/variables, PascalCase for types)

## Testing
- Write comprehensive unit tests for all public functions
- Use `get_castorix_binary()` helper for integration tests
- Ensure cross-platform compatibility in tests
- Run `cargo test --all-features` before committing

## Error Handling
- Use `anyhow::Result<T>` for error handling
- Provide meaningful error messages
- Log errors appropriately using the `log` crate
- Handle network errors gracefully

## Performance
- Avoid unnecessary allocations
- Use `&str` instead of `String` when possible
- Consider using `Cow<str>` for string handling
- Profile performance-critical code
99 changes: 99 additions & 0 deletions .github/workflows/pr-simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: PR Simple Tests

on:
pull_request:
branches: [master, main]
types: [opened, synchronize, reopened]

env:
CARGO_TERM_COLOR: always

jobs:
pr-tests:
name: PR Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
override: true

- name: Install nightly Rust with rustfmt
run: rustup toolchain install nightly --component rustfmt

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Initialize contracts submodule
run: |
if [ -f "contracts/.git" ]; then
echo "Contracts submodule already initialized"
else
echo "Initializing contracts submodule..."
git submodule update --init --recursive contracts || echo "Warning: Failed to initialize contracts submodule"
fi

- name: Build project first (to generate required files)
run: cargo build --all-features

- name: Check formatting
run: cargo +nightly fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features


- name: Run unit tests
run: cargo test --lib

- name: Run integration tests
run: cargo test --test "*"

- name: Test CLI commands
run: |
cargo run --bin castorix -- --help
cargo run --bin castorix -- key --help
cargo run --bin castorix -- fid --help
cargo run --bin castorix -- storage --help
cargo run --bin castorix -- ens --help
cargo run --bin start-node -- --help

- name: Check for TODO/FIXME comments
run: |
echo "🔍 Checking for TODO/FIXME comments..."
if grep -r "TODO\|FIXME\|XXX\|HACK" src/ --include="*.rs"; then
echo "⚠️ Found TODO/FIXME comments in source code:"
grep -r "TODO\|FIXME\|XXX\|HACK" src/ --include="*.rs" || true
echo "Please review and address these comments before merging."
else
echo "✅ No TODO/FIXME comments found in source code"
fi

- name: Generate test summary
run: |
echo "## PR Test Results ✅" >> $GITHUB_STEP_SUMMARY
echo "- **Build**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "- **Formatting**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "- **Clippy**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "- **Unit Tests**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "- **Integration Tests**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "- **CLI Tests**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "- **Code Quality**: ✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "🎉 All tests passed! Ready for review." >> $GITHUB_STEP_SUMMARY
Loading
Loading