Skip to content

fix: support inspecting hamt shards - #1014

Draft
achingbrain wants to merge 4 commits into
mainfrom
fix/support-inspecting-shards
Draft

fix: support inspecting hamt shards#1014
achingbrain wants to merge 4 commits into
mainfrom
fix/support-inspecting-shards

Conversation

@achingbrain

@achingbrain achingbrain commented Mar 24, 2026

Copy link
Copy Markdown
Member

When a path results in a 404, retry without HAMT translation

Refs: #1066

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

When a path results in a 404, retry without HAMT translation
response = await verifiedFetch(resource, init)

// special case - if the user is trying to preview HAMT sub-shards
if (response.status === 404) {

@achingbrain achingbrain Mar 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is expensive, a better solution would be for verified fetch to either somehow signal that the root CID was a HAMT shard so the translateHAMTPath option is available, or to add a new query string param to the service worker gateway that lets the user express their intention and set translateHAMTPath explicitly.

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.

1 participant