Skip to content

refactor(desci-api): update to match flattened schema - #8

Merged
0xmme merged 2 commits into
mainfrom
feature/prisma-flattening
Feb 17, 2026
Merged

0xmme merged 2 commits into
mainfrom
feature/prisma-flattening

Conversation

@0xmme

@0xmme 0xmme commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@0xmme
0xmme merged commit 4ddb888 into main Feb 17, 2026
2 checks passed
@0xmme
0xmme deleted the feature/prisma-flattening branch February 17, 2026 13:23
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>
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.

3 participants