Skip to content

feat(fetcher): bind upstream URL and fetch time into commitment#704

Merged
aggre merged 4 commits into
mainfrom
cursor/fetcher-request-response-commitment-507e
Jul 26, 2026
Merged

feat(fetcher): bind upstream URL and fetch time into commitment#704
aggre merged 4 commits into
mainfrom
cursor/fetcher-request-response-commitment-507e

Conversation

@aggre

@aggre aggre commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

  • fetchAndCommit now commits { request: { url, fetchedAt, date }, response: { data } } via existing data-commitment-v1 / commitDeep (no new circuit).
  • FetchResult is reshaped to { request, response: { data, canonical }, commitment }.
  • packages/feeds updated at the shared FetchResult boundary (dataresponse.data, etc.). Feed-local commitDeep payloads (scaled forex, compact snapshots) are unchanged.

Feeds impact

FetchResult is the FeedSource contract, so the type change does touch feeds. Scope was kept to envelope field access / construction only — commitment semantics inside each feed stay the same. Forex feeds that call the fetcher Workers API now read fetched.response.data.

Test plan

  • pnpm --filter @lemmaoracle/fetcher test (8 passed)
  • pnpm --filter @lemmaoracle/fetcher type-check
  • pnpm --filter @lemmaoracle/fetcher lint
  • pnpm --filter @lemmaoracle/feeds type-check
  • pnpm --filter @lemmaoracle/feeds lint
Open in Web Open in Cursor 

Commit `{ request: { url, fetchedAt, date }, response: { body } }` under
data-commitment-v1, and reshape FetchResult to `{ request, response,
commitment }`. Update feeds at the shared FetchResult boundary so forex
worker consumers and feed sources keep typechecking.

Co-authored-by: aggre <hiroyuki.aggre@gmail.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
fetcher 6236016 Commit Preview URL

Branch Preview URL
Jul 26 2026, 01:58 PM

Align the committed payload field with the data being committed, rather
than HTTP-body terminology.

Co-authored-by: aggre <hiroyuki.aggre@gmail.com>
@aggre
aggre marked this pull request as ready for review July 26, 2026 13:51
@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

cursoragent and others added 2 commits July 26, 2026 13:52
Sync fetcher-request-binding requirements into main specs and move the
completed change under changes/archive/.

Co-authored-by: aggre <hiroyuki.aggre@gmail.com>
Production fetcher still returns top-level `data`; read either
`response.data` or legacy `data` so forex feeds and registry tests work
across deploy order.

Co-authored-by: aggre <hiroyuki.aggre@gmail.com>
@aggre
aggre merged commit b5a1305 into main Jul 26, 2026
3 checks passed
@aggre
aggre deleted the cursor/fetcher-request-response-commitment-507e branch July 26, 2026 14:13
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