Rebase onto upstream v1.6.8 #63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rebase/upstream-v1.6.8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Merges upstream v1.6.8 into the fork, then the two pieces of work that merge made necessary. Three commits, meant to be read in order.
Closes #33. Refs #41, #61.
1.
ae5affa— the mergeBrings in ticket waves (per-wave price/currency/stock/fiat), the paginated ticket endpoint, the organiser ticket-image template, and upstream's SatsPay on-chain surface.
Resolutions that were not mechanical:
set_ticket_paiddebits the wave named on the ticket, keeping upstream's> 0guards — ours decremented unconditionally and could go negative. The purchase and free-ticket paths now stampticket_wave_id/ticket_wave_title; without them every sale would have come off the primary wave.basket_totalstakes it as a required argument and the promo-validate endpoint resolves the same wave through a shared_resolve_ticket_wave, so the quote and the charge cannot disagree.event.price_per_ticketis a roll-up of the primary wave sincesync_event_ticket_waves, so pricing off the event charged the first wave's price to buyers who picked a later one._send_nostr_ticket_notificationsends bare pubkeys viasend_nostr_dm. The purchase-side rejection had merged in outside any conflict marker._ticket_image_urlexisted on both sides as two unrelated features. Ours (always-attached rendered QR card) became_ticket_card_url; upstream's (organiser template, opt-in per wave) kept the name./qr/{ticket_id}was likewise defined on both sides on the same route — merged into one handler rather than registered twice, where the second copy would have been unreachable.models._parse_datenow accepts a full ISO datetime. Upstream's date-onlystrptimeraisedValueErroron any event whoseclosing_datecarries a time, whichcreate_eventproduces by defaulting it fromevent_end_date. That would have 500'd the purchase path, the public event gate and the promo preview. Reproduced before fixing.statusout of the request body.2.
d90a0f8— drop the SatsPay/watchonly surfaceThe parity note on #41, as its own commit so the merge above stays a faithful diff of what upstream shipped. Removes the five SatsPay/watchonly HTTP clients,
GET /events/onchain/status, the SatsPay charge branch,POST /tickets/{id}/satspay-webhook,PUT /tickets/{hash}/onchain-confirm, the organiser's on-chain panel, and theonchain_{enabled,wallet_id,zeroconf,fasttrack}/satspay_charge_*fields.On-chain goes through the fork's native
LndRestWalletonce core can mint purpose-bound receiving addresses (aiolabs/lnbits#53), soonchainis no longer an acceptedpayment_method— there is no rail to fulfil it and accepting it could only fail later.TicketExtra.onchain/onchain_addressandTicketPaymentRequest.onchain_amount_satstay as vocabulary for #41, in upstream's names so it needs no migration.3.
15c2276— publish the active waveThe publisher read the event-level roll-up, so once an organiser created a second wave the public card advertised the early-bird price after early bird closed and counted stock in waves that had not opened.
docs/upstream-candidates.md; rationale and rejected alternatives in #61.tickets_availableis0and never omitted when nothing is open (omission meant "unlimited", which #34/#62 removed).tickets_payment_methodsis scoped to the advertised wave too — it was derived fromevent.allow_fiatand could offer a fiat rail the purchase endpoint would refuse whiletickets_allow_fiatwas absent.nostr_published_wave_id(m004) and the reconciliation sweep flags rows whose advertised wave has moved — reusing the existing retry path instead of adding a scheduler. NULL means "never published" and is left alone, so upgrading does not republish the whole table on first boot.Notes for review
docs/rebase-playbook.mdis new, and gained two failure modes found during this merge: C, misplaced conflict boundary (git anchors on an incidental shared line, so an entire parallel implementation lands outside the markers and reads as merged —ruffdoes not flag duplicatedefs, andmypy, which does, cannot run while any file in the package still has markers) and D, collided names. Theuniq -dcheck it prescribes is what caught the duplicate/qrhandler and a duplicatepaymentMethodOptionsindisplay.js.Still open and deliberately not in scope: #61 stays open to hold the richer tier-event representation; #41 stays blocked on aiolabs/lnbits#53; #34's remaining half — "capacity always required" needs restating as a per-wave rule now that
amount_ticketsis a roll-up.Verification
114 tests pass (17 new). ruff, black and prettier clean. 35 routes register with no duplicates and literal routes still precede parameterised ones. mypy's error set is byte-identical to
main's baseline, diffed against a clean checkout rather than counted.Not yet exercised against a running instance — worth a pass on aio-demo before
v1.6.8-aio.1is tagged, particularly a purchase on a second wave and a wave boundary crossing.