Skip to content

revert(bonanza): roll back 45-minute cap and live opening checks (#29) - #32

Merged
maghuro merged 2 commits into
mainfrom
revert/bonanza-pr29-45min
Oct 14, 2026
Merged

maghuro merged 2 commits into
mainfrom
revert/bonanza-pr29-45min

Conversation

@maghuro

@maghuro maghuro commented Oct 14, 2026

Copy link
Copy Markdown
Owner

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 revert

  • Version bumped to 1.5.16 instead of 1.5.14, so Tampermonkey/Gist update subscribers receive the rollback after v1.5.15.
  • 00-preamble.js explicitly documents the rollback; compiled userscript kept in sync with its 15 source parts.
  • Precise-version hardening test updated to 1.5.16.
  • The later repository-root README.md (added after PR fix(bonanza): enforce DarkPeers 45-minute giveaway limit #29) is retained unchanged.

Important implications

  • This deliberately removes the 45-minute cap, the stringent pending-opening confirmation/recovery flow, and the other command/sponsor safety modifications shipped in PR fix(bonanza): enforce DarkPeers 45-minute giveaway limit #29. This is a functional rollback, not a targeted hotfix.
  • The user reported having already manually cancelled the stuck live giveaway in the browser.
  • No live giveaway or BON transfer should be initiated as part of validation.

Verification

Wait for Validate BONanza workflow, source-to-bundle check, JavaScript syntax, and full tests, then merge and check Publish BONanza to Gist run on main.

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T22:00:09.289063Z 7a3339e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@maghuro
maghuro merged commit 13a6c63 into main Oct 14, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines 1842 to +1844
const tracker = new SponsorTracker({
chatroomId,
giveawayStartTime: new Date(
giveawayData.sponsorStartTs ?? giveawayStartTime.getTime()
),
giveawayStartTime,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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.

1 participant