Open
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: undefined
…s as binary data Implements issue #508 by creating a new validator that accepts both internal and external references: - Internal references (existing links) are validated for existence - External references (binary data via Hybrid type) are allowed without validation Changes: 1. Added EnsureReferenceExistsOrExternal extension methods to ILinksExtensions.cs - Validates internal references must exist in store - Allows external references (binary data) without existence checking 2. Created LinksExternalReferenceValidator decorator - Similar structure to LinksInnerReferenceExistenceValidator - Uses new EnsureReferenceExistsOrExternal validation methods - Enables doublets store to be used as file system/binary data storage 3. Added comprehensive test suite (7 tests, all passing) - Tests internal reference validation - Tests external reference support - Tests mixed internal/external references - Tests Each, Update, and Delete operations - Demonstrates real-world binary data storage scenario This enables variable-length reference sequences and allows the doublets store to function as a file system, archive, or file storage database as described in issue #508. Fixes #508 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 3899ed4.
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 📎 Log file uploaded as GitHub Gist (653KB) Now working session is ended, feel free to review and add any feedback on the solution draft. |
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
Implements issue #508 to allow treating links references as binary data, enabling the doublets store to function as a file system, archive, or file storage database.
Changes
1. New Extension Methods (ILinksExtensions.cs)
Added
EnsureReferenceExistsOrExternalmethods that validate references while allowing external (binary data) references:Behavior:
2. New Decorator: LinksExternalReferenceValidator
Created
LinksExternalReferenceValidator<TLinkAddress>decorator that:Each(),Update(), andDelete()methodsEnsureReferenceExistsOrExternal()for validationLocation:
csharp/Platform.Data.Doublets/Decorators/LinksExternalReferenceValidator.cs3. Comprehensive Test Suite
Added 7 tests in
LinksExternalReferenceValidatorTests.cs(all passing ✅):Key Features
External Reference Support via Hybrid Type
Uses
Hybrid<T>withisExternal: trueto mark references as binary data:Use Cases Enabled
Testing
Local Tests: ✅ All 7 tests passing
CI Status: ✅ Passing (auto-merge workflow succeeded)
Implementation Details
Validation Logic
Decorator Pattern
Follows existing pattern from
LinksInnerReferenceExistenceValidator:LinksDecoratorBase<TLinkAddress>ILinks<TLinkAddress>implementationBackwards Compatibility
✅ Fully backwards compatible
LinksInnerReferenceExistenceValidatorcontinues to workLinksExternalReferenceValidatoris opt-inRelated
LinksInnerReferenceExistenceValidator.cs(lines 10 and 80)🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com