app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit 42be1a19470d6c46dec0afe51a7ba15eeffeb979
parent 9c059aa95eb3d76521b708c9d93864e3996c1985
Author: triesap <tyson@radroots.org>
Date:   Fri, 19 Jun 2026 16:23:01 -0700

sync: guard deferred payment publish work

- keep app publish work limited to active farm listing and order lifecycle kinds

- reject checkout refund provider wallet and custody publish tokens

- preserve passive payment display while payment execution stays out of app sync

Diffstat:
Mcrates/sync/src/publish.rs | 22+++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/crates/sync/src/publish.rs b/crates/sync/src/publish.rs @@ -851,7 +851,7 @@ mod tests { } #[test] - fn publish_work_kinds_keep_payment_and_settlement_events_reserved() { + fn publish_work_kinds_keep_payment_and_checkout_surfaces_reserved() { let work_kinds = [ AppPublishWorkKind::FarmProfile, AppPublishWorkKind::Listing, @@ -863,15 +863,27 @@ mod tests { AppPublishWorkKind::OrderFulfillment, AppPublishWorkKind::OrderReceipt, ]; + let reserved_publish_tokens = [ + "payment", + "settlement", + "checkout", + "refund", + "wallet", + "invoice", + "processor", + "provider", + "escrow", + "custody", + ]; assert_eq!(work_kinds.len(), 9); for work_kind in work_kinds { let storage_key = work_kind.storage_key(); let sdk_operation = work_kind.sdk_operation(); - assert!(!storage_key.contains("payment")); - assert!(!storage_key.contains("settlement")); - assert!(!sdk_operation.contains("payment")); - assert!(!sdk_operation.contains("settlement")); + for reserved_token in reserved_publish_tokens { + assert!(!storage_key.contains(reserved_token)); + assert!(!sdk_operation.contains(reserved_token)); + } } }