feat(sync): upload assets before delivering records - #19
Open
massimoalbarello wants to merge 1 commit into
Open
Conversation
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.
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.