Repository navigation
revert(bonanza): roll back 45-minute cap and live opening checks (#29) - #32
Conversation
Rollback opening verification and 45-minute duration hard cap introduced by #29. Preserve subsequent repo README and bump the Tampermonkey version to ensure users receive the rollback.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a3339e4be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // are immutable and must survive crash/reload unchanged. | ||
| const startTs = Number(snap.giveawayData.openedAt ?? snap.startTime); | ||
| const maxEndTs = getGiveawayMaxEndTs(startTs); | ||
| const overdueMs = Date.now() - endTs; |
There was a problem hiding this comment.
Quarantine pending v1.5.15 openings before restore
When 1.5.16 auto-updates over a 1.5.15 tab that left openingCheckpoint.status === "pending" after an ambiguous opening send, this loader now ignores that checkpoint and returns the snapshot as an ordinary active giveaway. restoreGiveawayFromSnapshot() then enables observation and sponsor reconciliation and eventually calls endGiveaway(), so an opening never proven to exist in Main Chat can accept entries and lead to refunds or payouts. Pending checkpoints from the immediately preceding release need to remain quarantined or be explicitly reconciled before entering the legacy restore path.
Useful? React with 👍 / 👎.
| const tracker = new SponsorTracker({ | ||
| chatroomId, | ||
| giveawayStartTime: new Date( | ||
| giveawayData.sponsorStartTs ?? giveawayStartTime.getTime() | ||
| ), | ||
| giveawayStartTime, |
There was a problem hiding this comment.
Restore the persisted v1.5.15 sponsor boundary
When an active giveaway created by v1.5.15 is restored after this auto-update, snap.startTime is the pre-send timestamp, while sponsor eligibility begins at the later persisted giveawayData.sponsorStartTs. Passing the pre-send time to SponsorTracker makes canonical reconciliation eligible to count Gift History rows from the send/publication gap, which can inflate the pot and subsequent transfers. Use sponsorStartTs for snapshots that contain it, falling back to the legacy start time only when it is absent.
Useful? React with 👍 / 👎.
Purpose
Revert all code/docs/tests introduced by the squash-merged PR #29 (
a30bd07d11ed13b888c0332cc2c6474021dc24bf), restoring the known previous v1.5.14 userscript behavior. PR #31 was closed without merge.Deliberate differences vs an exact
git revert1.5.16instead of1.5.14, so Tampermonkey/Gist update subscribers receive the rollback after v1.5.15.00-preamble.jsexplicitly documents the rollback; compiled userscript kept in sync with its 15 source parts.Important implications
Verification
Wait for
Validate BONanzaworkflow, source-to-bundle check, JavaScript syntax, and full tests, then merge and checkPublish BONanza to Gistrun on main.