Releases: icdevsorg/inspect-mo
Releases · icdevsorg/inspect-mo
Improvements and metadata
[0.1.1] - 2025-09-03
🎉 Major Feature: ICRC16 CandyShared Integration
Added
- Complete ICRC16 Validation Suite: 15 validation rule variants for CandyShared metadata structures
icrc16CandyType- Validate CandyShared type matches expectedicrc16CandySize- Validate metadata size limitsicrc16CandyDepth- Prevent excessive nestingicrc16PropertyExists- Require specific propertiesicrc16ArrayLength- Validate array sizesicrc16BoolValue- Validate boolean valuesicrc16IntRange- Validate integer rangesicrc16NatRange- Validate natural number rangesicrc16FloatRange- Validate float rangesicrc16TextPattern- Validate text patterns (regex)icrc16BlobSize- Validate blob sizesicrc16ClassStructure- Validate class propertiesicrc16ArrayStructure- Validate array element typesicrc16ValueSet- Validate against allowed valuesicrc16CustomCandyCheck- Custom validation logic
🛠️ ValidationRule Array Utilities
Added
appendValidationRule: Append single validation rule to existing arraycombineValidationRules: Combine multiple validation rule arrays efficientlyValidationRuleBuilder: Fluent interface for building complex validation rule sets- Method chaining support:
.addRule().addRules().build() - Type-safe rule construction with generics support
- Comprehensive utility functions for common validation patterns
- Method chaining support:
Performance Characteristics
- Linear Complexity: All operations are O(n) with excellent performance
- Memory Efficient: ~5K-20K instructions, 272B heap usage
- Production Ready: Comprehensive testing with deployed canister validation
🔧 Core Enhancement: Efficient Argument Size Validation
Added
inspectOnlyArgSizeFunction: O(1) argument size checking without parsing overhead- Provides direct access to blob size in bytes for efficient size validation
- Integrates seamlessly with existing InspectMo validation pipeline
- No message parsing required - direct
Blob.size()operation for maximum performance - Returns
Natrepresenting exact argument size for pre-validation filtering
🔒 Security & Quality Assurance
Security Review Completed
- DoS Protection: Depth limits (maxDepth=10) and size constraints prevent resource exhaustion
- Memory Safety: Linear complexity operations, bounded memory growth
- Input Validation: Type-safe CandyShared validation with graceful error handling
- Information Security: Error messages sanitized to prevent sensitive data leakage
Testing & Validation
- Production Canister Testing: All features validated with deployed canisters on IC
- ValidationRule Array Utilities: Canister
ufxgi-4p777-77774-qaadq-cai - DeFi Protocol Example: Canister
uzt4z-lp777-77774-qaabq-cai - File Manager Example: Canister
umunu-kh777-77774-qaaca-cai - Basic Functionality: Canister
vizcg-th777-77774-qaaea-cai
- ValidationRule Array Utilities: Canister
- Comprehensive Unit Tests:
test/inspect-arg-size.test.mowith edge case validation - Integration Tests: Full pipeline testing with real canister deployment
- Performance Benchmarks: All targets met with excellent efficiency metrics
🏗️ Platform Integration
- Mixed Validation Pipelines: Seamless integration of traditional + ICRC16 validation rules
- Production Examples:
examples/simple-icrc16.mo- Basic ICRC16 validation patternsexamples/icrc16-user-management.mo- Complex ICRC16 integration with user profiles
- Comprehensive Testing: 15/15 PIC.js tests passing with real canister deployment
- Complete Documentation: Full ICRC16 integration guide in API.md and EXAMPLES.md
Dependencies
- Added
mo:candy/typesv0.3.1 for CandyShared type definitions
Technical
- ErasedValidator Integration: ICRC16 rules follow the same type-safe pattern as traditional validation
- Type Safety: Full compile-time validation of ICRC16 metadata structures
- Performance: Efficient validation with minimal runtime overhead
- Real-World Testing: Validated through actual canister deployment and execution
Documentation
- Updated README.md to highlight ICRC16 as a key feature
- Added comprehensive ICRC16 section to docs/API.md
- Added production-ready ICRC16 example to docs/EXAMPLES.md
- Updated workplan to reflect ICRC16 completion
- Created ICRC16_INTEGRATION_SUCCESS.md documenting achievement
Initial Release
[0.1.0] - 2025-08-25
- Initial public preview release
- Local-only code generation workflow (ts-node;
npm run codegen) - dfx.json cleaned (no unsupported hooks)
- Docker assets removed from repo
- Docs: added Local code generation section to README
- Tooling: modernized Jest/ts-jest config (removed deprecated globals); TypeScript esModuleInterop enabled
- Docs sweep: removed inaccurate "DFX prebuild hooks" claims; documented manual codegen and CI example (
npm run codegen && dfx build) - Tests: PocketIC/Jest integration suites passing locally (13 suites, 133 tests)
- Limitations: Rate limiting is stubbed, not functional in 0.1.0; RBAC examples are illustrative only