refactor(desci-api): update to match flattened schema - #8
Merged
Merged
Conversation
DemidovVladimir
approved these changes
Feb 11, 2026
nour-karoui
added a commit
that referenced
this pull request
Aug 31, 2026
Tutorial 1 failed outright on 1 of 5 runs against staging:
initiateCreateOrUpdateFile returned NOT_FOUND ("Project 0x... does not
exist") immediately after createLab had returned success.
Cause is an asymmetry, not a transient: onchain_lab rows are written by the
event indexer that ingests the mint, and createLab tolerates their absence
via its ownerOf fallback (auth-service.ts:615) while the content writes read
the indexed record directly (auth-service.ts:283-300). So createLab can
succeed on a lab that is not yet writable.
- withIndexerLagRetry now lives in the shared setup block, with both lag
cases named: NOT_FOUND after a mint, UNAUTHORIZED after a role grant.
- Tutorial 1 Step 4 wraps its first call in it, in the snippet and the
complete script, and warns that Step 3 succeeding is no guarantee.
- Tutorial 3's withRoleGrantRetry is renamed to the same helper with
codes: ["UNAUTHORIZED", "NOT_FOUND"], so both tutorials teach one idiom.
- for-agents.md gains the rule as #8.
- Both upload tutorials document `UPSTREAM_UNAVAILABLE: "Path is occupied"`
as NOT retryable despite the code -- a re-run against the same lab. Fix
is a new `path`, or `ref` to add a version.
- Tutorial 1/3 Step 1 also carry the nonce rules from the previous commit,
since they share those regions.
- Tutorial 3 no longer implies isAgent must be true; a grant with
isAgent=false authorized an upload on staging exactly the same.
Verified: helper unit-tested as published (5/5), Tutorial 1 three clean
runs, full T1->T2->T4 chain on lab-1542, Tutorial 3 clean on testing-lab.
Co-Authored-By: Claude Opus 5 (1M context) <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.
No description provided.