Skip to content

fix: enforce safe DropsBot start payloads - #10

Merged
svg8bit merged 2 commits into
mainfrom
codex/activity-track-links
Aug 11, 2026
Merged

fix: enforce safe DropsBot start payloads#10
svg8bit merged 2 commits into
mainfrom
codex/activity-track-links

Conversation

@svg8bit

@svg8bit svg8bit commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • derive the maximum event slug length from Telegram's official 64-character start payload limit
  • add the exact long live Polymarket slug found during production verification as a rejection regression
  • retain strict official-host, slug-character, payload-length, and Hormuz override checks

Why the long event has no Track button

The live event's TRACKpm_... payload is 76 characters, so Telegram cannot deliver it through the official bot deep-link contract. OddsFront intentionally keeps the valid Market action and withholds an unusable Track action until a server-side short-ID lookup contract exists.

Verification

  • Red: the 256-character implementation accepted the invalid 76-character payload
  • Green: the exact live payload and every 57+ character slug are rejected
  • valid 64-character payloads and Hormuz overrides remain accepted
  • npm run check on Node 24.19.0

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation of DropsBot tracking links to enforce Telegram’s maximum supported parameter length.
    • Added clearer handling for malformed or unsupported event slugs and overlong tracking slugs.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
oddsfront Ready Ready Preview Aug 11, 2026 9:46am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds Telegram’s start-parameter limit, derives the DropsBot tracking slug limit from it, and updates preview tests for malformed and 57-character slugs.

Changes

Tracking slug limits

Layer / File(s) Summary
Slug limit contract and validation
lib/polymarket-links.ts, tests/global-conflict-map-preview.spec.ts
TELEGRAM_START_MAX_LENGTH is set to 64. MAX_DROPSBOT_TRACK_SLUG_LENGTH now derives from that limit and the tracking prefix length. Tests cover malformed slugs and 57-character slugs.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: enforcing safe DropsBot start payloads.
Description check ✅ Passed The description explains the change and verification, but it omits the template's What changed and Safety sections.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/activity-track-links

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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: 167e459270

ℹ️ 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".

Comment thread lib/polymarket-links.ts Outdated
@svg8bit svg8bit changed the title fix: keep Track available for long Polymarket slugs fix: enforce safe DropsBot start payloads Aug 11, 2026
@svg8bit
svg8bit merged commit cc15031 into main Aug 11, 2026
6 checks passed
@svg8bit
svg8bit deleted the codex/activity-track-links branch August 11, 2026 09:50
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