Skip to content

feat(blob): name the accept failures for an expired or missing allocation - #10

Merged
alanshaw merged 4 commits into
mainfrom
ash/feat/accept-allocation-errors
Nov 12, 2026
Merged

alanshaw merged 4 commits into
mainfrom
ash/feat/accept-allocation-errors

Conversation

@alanshaw

@alanshaw alanshaw commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

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

…tion

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The receipt contract remains incomplete and ambiguous about expiry, named failure conditions, and the documented pre-expiry missing-piece behavior, leaving the specification inconsistent with the implementation.

3 open issues
What changed in this PR

Updates the blob protocol specification to document named /blob/accept failures for expired and missing allocations, while clarifying acceptance behavior around allocation expiry.

Changes:

  • Names AllocationExpired and AllocationNotFound failures.
  • Documents missing, rejected, and removed allocation cases.
  • Clarifies when content delivered around expiry may still be accepted.
File Description
blob.md Documents the /blob/accept failure names, allocation lookup conditions, and expiry-related acceptance behavior.

Review effort: Lite

Comment thread blob.md Resolved
Comment thread blob.md Resolved
Comment thread blob.md Resolved
…ocking rule

The failures are stated by what the storage node finds when the accept
arrives, and the accept that arrives before the content is documented as
one that can be invoked again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The change still has two active specification issues: its success condition conflicts with the mandatory AllocationNotFound rule, and it omits the required explicit success rule and value semantics before the receipt schema.

2 open issues
3 resolved since last review

Review effort: Lite

Comment thread blob.md Resolved
Comment thread blob.md Resolved
…the success value

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new MUST requirement conflicts with the existing handler behavior, which accepts already-present blob bytes without allocation metadata, leaving the specification and implementation inconsistent.

1 open issue
2 resolved since last review

Review effort: Lite

Comment thread blob.md Resolved
alanshaw added a commit to fil-forge/piri that referenced this pull request Nov 12, 2026
#230)

A `/blob/accept` succeeded for a blob the space had never allocated, as
long as the node already held the bytes and the accept did not say which
allocation it was for. A space must have an allocation of a blob before
it can accept it, so this now fails with `AllocationNotFound`.

Accepts that follow a `/blob/allocate` are unaffected.

Several tests accepted blobs without allocating them first; they now
allocate.

This brings Piri in line with the accept rule in
fil-forge/ucan-protocol-specs#10.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
@alanshaw
alanshaw requested a lite review from Copilot November 12, 2026 12:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The retry condition in blob.md is ambiguous because it does not explicitly state that the content must be delivered while the allocation remains unexpired.

1 open issue
1 resolved since last review

Review effort: Lite

Comment thread blob.md Resolved
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The change warrants human assessment because its updated non-blocking behavior is accompanied by a contradictory invocation comment that could cause implementers to preserve the old waiting behavior.

No open issues 🎉

1 resolved since last review

Review effort: Lite

@alanshaw
alanshaw merged commit 3cdaa93 into main Nov 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants