Skip to content

sdk: retain partial reconciliation progress with relay outcomes - #1483

Merged
yukibtc merged 1 commit into
nostrdevkit:masterfrom
erskingardner:codex/upstream-sdk-sync-outcomes
Oct 12, 2026
Merged

yukibtc merged 1 commit into
nostrdevkit:masterfrom
erskingardner:codex/upstream-sdk-sync-outcomes

Conversation

@erskingardner

Copy link
Copy Markdown
Contributor

When reconciliation downloads a batch and then fails, its returned error currently discards the summary. Aggregate reconciliation also loses that failed relay's progress even when another relay succeeds.

Add SyncEvents::with_outcomes() and RelaySyncOutcome to return observed progress alongside the terminal error. Aggregate client reconciliation retains failed-relay progress while keeping the relay in Output::failed. Direct sync().await preserves its existing success/error behavior; preflight failures still return Err.

Builds on the reconciliation cleanup and download-rejection handling integrated from #1480, retaining upstream's refined implementation. Observed progress does not imply completed reconciliation or downstream durable admission.

Tests exercise success, preflight/read-capability failures, first/later rejected download batches, request cleanup, and an aggregate run where a healthy relay completes while a failing relay retains its first 100 downloads.

Validation: just precommit; stable workspace Clippy with all targets and warnings denied; stable all-feature SDK tests.

Add an opt-in relay outcome API and retain failed-relay progress in aggregate summaries while preserving direct sync error behavior. Exercise partial batch rejection, success, preflight failures, cleanup, and healthy/failing relay aggregation.
@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@erskingardner

Copy link
Copy Markdown
Contributor Author

Anything you'd like changed here @yukibtc ?

@yukibtc
yukibtc merged commit 9791c3f into nostrdevkit:master Oct 12, 2026
43 checks passed
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