Repository navigation
Conversation
BK-DEPOSIT-HOST-CANCEL-AFTER-START-OWNER-LINE PR 2 and BK-ECHO-UNMARKED-COPY-OWNER-LINE (BK-DEPOSIT-OWNER-RETURN-SCOPE = A, Engine 21 Nov 02:56; BK-ECHO-UNMARKED-SAME-SHAPE-COPY = C, lead 21 Nov 04:3x). Five tests at the end of tests/booking_deposit_refund_rules.rs: a calendar cancel that moved no money (a calendar never written to, and one seen after the start) lists a booking-held-deposit row for the selected host until the host's return; an unmarked same-shape copy read as the owner's own write lists it as a cancel we can't attribute; a started booking shows the line on its card only; an owner who was not a selected host gets no row and no Return deposit. Rows are read through self.inbox.get by name, so this commit builds on main and fails by assert.
BK-DEPOSIT-HOST-CANCEL-AFTER-START-OWNER-LINE PR 2 (BK-DEPOSIT-OWNER-
RETURN-ACT = A and -SCOPE = A, Engine 21 Nov 02:56) and
BK-ECHO-UNMARKED-COPY-OWNER-LINE (BK-ECHO-UNMARKED-SAME-SHAPE-COPY = C,
lead 21 Nov 04:3x).
- BookingOwnerCard.deposit (serde default, omitted when None): once the
booking is effectively cancelled or has started, what its deposit still
holds (capture due, captured, or the balance after a partial refund),
the reason (calendar_cancel, unattributed_cancel, cancelled, started),
the owner's line and return_offered (the reader is a host selected at
confirmation, who alone may call vault.booking.deposit.refund).
- An INBOX row booking-held-deposit:<event hex> for the live owners among
the selected hosts, any day, only where a calendar's cancel moved no
money (raw booking status live, a calendar.status cancellation) or a
cancel could not be attributed; opening it opens the booking card, and
a handle whose deposit no longer stands held opens nothing.
- deposit/held.rs: held_of() is the one rule for what is held; the
owner's return (owner_return) now reads it, so the line shows exactly
when the return moves money.
- DepositRow.unattributed_cancel_sequence (serde default, skipped when
None; stored change: keep, additive): set in the replay proof's own
writer when a cancelled write's replay read a stored copy with no write
marker as the owner's own (StoredCopy::Own { marker_proved: false }),
on a deposit a host cancel would have moved.
- Amounts read in the currency's major unit by its ISO 4217 exponent
(connector_key::iso_4217_exponent, now crate-visible).
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Warning Review limit reached
This review includes 12 billable files and costs up to $3.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 58 minutes for your next included review. View limit details
|
This branch has not been deployed
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.
FIX rows: [BK-DEPOSIT-HOST-CANCEL-AFTER-START-OWNER-LINE] PR 2 (the owner lines) and [BK-ECHO-UNMARKED-COPY-OWNER-LINE].
Rulings: BK-DEPOSIT-OWNER-RETURN-ACT = A and BK-DEPOSIT-OWNER-RETURN-SCOPE = A (Engine 21 Nov 02:56: "The actionable inbox line shows only for the calendar-cancel cases (a) and (b) and the held unproven-replay case. Everywhere else the act is on the owner's booking card only. Nothing refunds by itself."); BK-ECHO-UNMARKED-SAME-SHAPE-COPY = C (lead 21 Nov 04:3x: A plus an owner-visible line "a cancel we can't attribute: refund by hand?" with the Return deposit button). PR 1, the act
vault.booking.deposit.refund, is #9977 (merged).What changes
BookingOwnerCard.deposit, serde default, omitted when None): once the booking is effectively cancelled or has started (the return's own condition), what its deposit still holds:held(capture_due,captured, or thebalanceafter a partial refund),amount_minor,currency,reason(calendar_cancel,unattributed_cancel,cancelled,started), the owner'sline, andreturn_offered(the reader is a host selected at confirmation, who alone may callvault.booking.deposit.refund). Before then, or with nothing held, no field.booking-held-deposit:<event hex>(kind CoordinationUpdate, no new wire kind, nothing stored): for the live owners among the selected hosts, on any day, only where a calendar's cancel moved no money (the booking's own status still live, acalendar.statuscancellation counted: cases (a), (b) and the held unproven-replay case all read this way) or a cancel could not be attributed. Opening it opens the booking card; once the deposit no longer stands held (a return owed or made) the row goes, and its handle opens nothing. Its own id, so marking the same-daybooking:row done never hides it.booking/lifecycle/deposit/held.rsheld_of(); the owner's return (owner_return, refund.rs) now reads it, so the line shows exactly when Return deposit moves money.DepositRow.unattributed_cancel_sequence(serde default, skipped when None), set in the replay proof's own writer (outbound.rs write_replay_proof) when a cancelled write's replay read a stored copy with no write marker as the owner's own (StoredCopy::Own { marker_proved: false }), on a deposit a host cancel would have moved (capture due or captured). First one wins; no money moves.connector_key::iso_4217_exponent, now crate-visible): "40.00 USD".Line (captured, selected host):
Booking at 2026-03-02 09:00 (UTC) was cancelled in a calendar. 40.00 USD is still held as its deposit. Choose Return deposit to refund it in full.Unattributed:Booking at ...: a cancel we can't attribute: refund by hand? 40.00 USD is still held as its deposit. Choose Return deposit to refund it in full.Not in this PR: the emergency-repick note ("no deposit held (refunded at your emergency cancel)", 11-15 19:17 line of the row) follows as PR 3; the row stays open for it.
Stored change: keep (one additive optional field on the deposit row; old rows decode as before). No new verb;
self.inbox.get's output card gains the optionaldepositobject. Grants: the row and the card are read under the owner's own INBOX checks (own_inbox_item); the act staysvault.booking.deposit.refund(owner proof revalidated in the money write, selected host).Tests (tests/booking_deposit_refund_rules.rs, 5 new at the end)
Red pin
opus-deposits/deposit-owner-lines-red-ad866d58(tests only, on main a4da017; the rows are read throughself.inbox.getby name, so it builds and fails by assert); head pinopus-deposits/deposit-owner-lines-head-a0aa05cd. Proof runs are booked after the merge.Run:
RUSTFLAGS="--cfg oneiron_test_support" cargo test --locked -p oneiron --all-features --test booking_deposit_refund_rules.