Repository navigation
feat(blob): add AllocationExpired and AllocationNotFound accept errors - #91
Merged
Merged
Conversation
A storage node reports them from /blob/accept: AllocationExpired when the allocation passed its expiry before the content was delivered, and AllocationNotFound when it holds no allocation for the blob. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified, and the change clearly defines and documents stable named errors for distinguishing allocation failure conditions.
No open issues 🎉
What changed in this PR
Adds stable, named errors for /blob/accept failures so callers can distinguish expired allocations from missing allocations without matching error messages.
Changes:
- Defines
AllocationExpiredErrorNameandErrAllocationExpired. - Defines
AllocationNotFoundErrorNameandErrAllocationNotFound. - Documents the conditions represented by each failure.
| File | Description |
|---|---|
| commands/blob/accept.go | Adds two exported, named allocation-related accept errors and documents the conditions they represent. |
Review effort: Lite
alanshaw
added a commit
to fil-forge/piri
that referenced
this pull request
Nov 11, 2026
…tion (#229) A `/blob/accept` for an allocation that had expired, been rejected, or been removed after expiry failed with a generic `HandlerExecutionError`. The upload service could only tell these cases apart by reading the message. They now fail with a named error: - `AllocationExpired`: the allocation passed its expiry before the blob was received. - `AllocationNotFound`: the node holds no such allocation. It was never made, was rejected, or was removed by the expiry task. What stays the same: - An allocation past its expiry whose blob was received in time is still accepted, as the spec asks. - An accept that arrives before the blob, on an allocation that has not expired, still fails with a short-lived error and can be sent again. Both new failures are ordinary receipts, where the old one was short-lived. Sending the same accept again returns the same answer; the blob has to be allocated again. The error names come from fil-forge/libforge#91. Picking that up also brings Piri up from its October libforge version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
alanshaw
added a commit
to fil-forge/ucan-protocol-specs
that referenced
this pull request
Nov 12, 2026
…tion (#10) Documents the two named failures a storage node returns from `/blob/accept`: - `AllocationExpired`: the allocation passed its expiry before the content was delivered. - `AllocationNotFound`: the node holds no allocation for the blob. It was never made, was rejected, or was removed after it expired. It also states that an allocation past its expiry whose content was delivered is still accepted. The rule that an accept blocks until content is delivered is replaced with what the storage node does: an accept that arrives before the content fails, and can be invoked again once the content is there. Piri returns these as of fil-forge/piri#229; the names are defined in fil-forge/libforge#91. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5.2 <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.
Adds two named failures for
/blob/accept, so a caller can tell why a storage node refused an accept without matching on message text:AllocationExpired: the allocation passed its expiry before the content was delivered.AllocationNotFound: the node holds no allocation for the blob. It was never made, was rejected, or was removed after it expired.Piri returns both today as a generic
HandlerExecutionError. A Piri PR that returns these names follows.🤖 Generated with Claude Code