feat: migrate CBOR module to core/ with Result-based API - #153
Merged
Conversation
- Create Result-based CBOR API in core/include/gitmind/cbor/cbor.h - Implement core/src/cbor/cbor.c with comprehensive bounds checking - Add extensive test suite in core/tests/unit/test_cbor.c - Update meson.build to include new CBOR module and tests - Delete legacy CBOR files from src/ directory - All tests passing with zero warnings across 6 C23 compilers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
flyingrobots
force-pushed
the
migrate/cbor-to-core
branch
from
July 8, 2025 22:05
4a119dc to
d6b6354
Compare
- Fix global constant naming (CamelCase) - Add missing stdint.h include - Reduce cognitive complexity by extracting helper functions - Replace magic numbers with named constants - Fix else-after-return warnings - All tests passing, zero warnings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Break down read_uint_value into smaller focused functions - Add missing result.h include - Rename parameter to avoid swappable-parameters warning - Each helper function now has simple, single responsibility - All tests still passing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix naming violations (CamelCase constants) - Fix short parameter names (3+ characters) - Add missing result.h includes - Maintain test compatibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix swappable parameters by reordering function signatures - Reduce cognitive complexity by extracting read_cbor_length helper - Add bounds-checked memcpy suppressions for security warnings - Update header files and all test calls to match new signatures - All tests passing, cognitive complexity now under threshold 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed swappable parameters in CBOR module read functions - Added required POSIX feature test macros for time operations - Fixed signed char conversion issues in ULID module - Replaced magic numbers with named constants - Fixed short parameter names in time.h interface - Added proper NOLINT directives for system requirements - Changed ULID DECODING array from int8_t to int for proper sign handling All 20 warnings have been resolved. The codebase now passes clang-tidy with zero warnings under maximum strictness. Fixes #153 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Headers should not define feature test macros as they can conflict with definitions in .c files. The macro is already properly defined in time.c and ulid.c where needed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code