Skip to content

feat(sync): upload assets before delivering records - #19

Open
massimoalbarello wants to merge 1 commit into
codex/sync-asset-storagefrom
codex/sync-asset-delivery
Open

feat(sync): upload assets before delivering records#19
massimoalbarello wants to merge 1 commit into
codex/sync-asset-storagefrom
codex/sync-asset-delivery

Conversation

@massimoalbarello

Copy link
Copy Markdown
Owner

Upload pending attachments independently before sending their records. Use a stable content key to recover uploads after lost responses, replace source placeholders with permanent destination links, and freeze the final content hashes and request body for record retries. This completes the sender side of #17 and #18 against context-use #74 and #75.

Add an optional asset import URL to destination configuration and the console. Assets and records share the destination's HTTPS origin and bearer credential. Successful upload mappings survive restarts, delivery leases renew during large uploads, and changing destination identity fences old work and invalidates its resolved mappings.

A batch is frozen before its first record request. If resolved URLs make an unsent batch too large, send its fitting prefix and keep the remainder queued. Source hashes remain independent of destination IDs, and tombstones retain the hash of the last resolved content. Receiver-side batch state and unreferenced-asset cleanup remain outside this change.

Stacked on #18. The destination needs the independent upload and record-reference endpoints from the context-use PRs before an attachment-producing sync is enabled.

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