Commit Graph

658 Commits

Author SHA1 Message Date
martbost a405c2cdd1 Games card: pass wording says what paid passes add (heroes, islands, a higher level cap, new looks); the 'never stronger' line is retired (Marty, 2026-10-22). my.js tag bumped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 13:14:21 -05:00
martbost 31b167e046 Game Pass package rail, part two: Admin > Game Pass gets a Pass sales table (every sale labelled package / credit-paid (old rule) / package (old rule), pass value, package value, package tx link) and stats passes.pay + sales; the chatbot canned answer, tier fact and system prompt say every pass is paid by a new package bought after tapping Get (sponsor and team paid, credits kept for ads, held credits never buy a pass); docs/GAME-PASS.md "Payment: the package rail" section; release-note update draft (not sent); admin.js tag bumped. Fulfilment stamps the pass at the event time again (as before). Tests: sov-passes store + local rebuilt on order + fresh package (seeded credits never spent), gamepass ALL PASS, member walk 0 bugs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:49:39 -05:00
martbost 6a3313a861 Game Pass: no pass is ever bought with credits again (Marty, 2026-10-22). Buy only opens a waiting order and sends the member to buy a package of at least the tier price; the order is fulfilled only by a fresh on-chain package Purchase by one of the member's own positions (main or linked), mined after the order was opened (block time, 30 s clock grace), each purchase tx used once across every account. The member keeps the package credits for ads; sponsors and team are paid by the package as usual. Existing passes untouched. Card and confirm copy say so; my.js tag bumped. qa/gamepass.mjs updated for the new flow (older-than-order, too small, another member, replayed tx): ALL PASS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:42:59 -05:00
martbost 839c867595 Pass tiers restructure (Dallas, Marty approved 2026-10-22): Explorer $19.99 (1999 credits) and Champion $39.99 (3999) for 30 days, new Sovereign $99.99 (9999, 30 days) and Legend $249.99 (24999, 365 days, the yearly pass). One table (gamepass.js TIER_DEFS: rank, names, settings stem, defaults, member-card perks); settings gamePassSovereign*/gamePassLegend* with kill switches; flag()/partner player/hand-off token carry sovereign/legend; buy, waiting orders ($100/$250 package copy), extend from max(now, until), comp/revoke, admin By pass tier table and comp options; chatbot tier fact says coming soon while sovTiers is off. All behind sovTiers (still 0): weekly Game Pass price, length and caps unchanged. Tests: sov-passes store + local extended (all pass), member QA 0 bugs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:26:58 -05:00
martbost 32eefae473 Admin badge repost accepts the Game Pass badge for anyone who has held a pass, even before their next dashboard load records it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 09:20:28 -05:00
martbost 7e902b9b26 Game Pass badge gets its unlock moment (Orlando bought a pass and nothing appeared): badges with no credit bonus (CELEBRATE_NO_BONUS: gamepass) are recorded once and celebrated like the rest (toast + team post), toast wording without credits, dashboard reloads right after a pass purchase; Promo tools pill renamed back to '✨ Your toolkit' (a member could not find it under 'AI Copy Engine'). QA member 0 bugs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 09:17:07 -05:00
martbost 4e51470cf5 Sponsor follow + one network holding tank + Sponsor check (Marty, 2026-10-22, approved 1-3)
Deliberate sponsor changes (tank adoption, dormant-lead rescue, release, adoption window ending, admin edit) are now
recorded (sponsorfollow.json: when, how, the sponsor before, origin) and travel on the LinkSpin sync rows as
sponsorSetAt/By/PrevEmail/Origin. A deliberate change from LinkSpin is applied here (a clear back to the tank included)
only when the member is not bound on the InstantAdPay contract (memberId or wallet on chain), it is newer than our own
deliberate change, and both sides agreed before it (or we have no sponsor). Bound, diverged and race cases change
nothing and are logged. Race within 15 min: the earlier change wins on both. Ordinary bindings keep the first-platform
rule. Accounts with no record behave as before; rows without the new facts hash exactly as before (no resend on deploy).

Network tank: rows carry this site's own adoptions of a person; the waiting list hides someone adopted on LinkSpin, the
two-adoptions limit counts both sites, the 3-day hold applies to a LinkSpin adoption too, follows close local open
adoptions quietly (no chat, mail or feed post).

Admin > Members > Sponsor check: shared members whose sponsor differs or is one-sided, each side's when/how, chain
binding, and Use InstantAdPay's / Use LinkSpin's sponsor (applied on the other site, refused when bound there).
Partner endpoints /api/partner/sponsor-facts and /api/partner/sponsor-apply (same HMAC as the registry rows).

Tests: qa/sponsorfollow.test.cjs 27/27, qa/sponsorfollow-e2e.mjs 20/20 (local IAP + local LinkSpin, throwaway data),
QA member walk 0 bugs. No sponsor was changed on production.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 09:05:07 -05:00
martbost 06b0924651 Restore LF line endings in badge.js, chatbot.js and my.js (the Game Pass commit 1c29285 rewrote them as CRLF from a Windows text-mode edit; no content change)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:25:02 -05:00
martbost 16ec626d2c Dollar value at today's POL price on the member's own pages (Marty, 2026-10-22, Brian's ask; US dollars, not a dollar token): /api/public/polusd serves the contract's own package rate (Chainlink POL/USD) cached 5 min on the server; Overview 'POL earned' shows '≈ $x.xx today', every Earnings line gets '≈ $x.xx', and a note under Earnings gives the rate, when it was updated, and that it is today's value, not the payout-day value. Browser re-reads at most every 2 min; no outside price service. QA member walk 0 bugs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:21:29 -05:00
martbost 1c2928553a Game Pass: what you get, game by game (Marty, 2026-10-22: members must see what they are buying). The Game Pass card lists the account-wide caps, the weekly Pass Tournament, the badge, and each of the nine games' perks; new gold Game Pass achievement badge (badge-gamepass.jpg, name on the ribbon at 0.84) unlocked once a member has ever held a pass, shareable and postable like the others; chatbot canned answer + prompt carry the per-game perks and the 2026-10-29 free-cap date, KNOWLEDGE_DATE 2026-10-22; my.js cache tag bumped. QA member walk 0 bugs; qa/gamepass.mjs 2 date-based tournament expectations fail with or without this change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 07:40:42 -05:00
martbost 3ee605a8bf Email typo check on new addresses: "Did you mean you@gmail.com?" for gmai.com / gmial.com / hotmial.com / outlook.comz / gmail.con etc., and refuse domains that cannot receive mail (no MX/A). Applies only to addresses with no account yet (existing members always sign in), on sign-in/sign-up, password signup and the support form; skipped when the server has no mail key (local QA). DNS errors fail open. Same emailcheck.js in IAP and LinkSpin. Prompted by SendGrid bounces to gmai.com and outlook.comz (2026-10-22).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 06:09:38 -05:00
martbost 8b1395a90c Chatbot: replies never carry an em dash (scrubbed to a comma)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:57:31 -05:00
martbost 9992dd061d Merge InstantAdPay knowledge-base chatbot + Save as KB entry on support replies
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:52:06 -05:00
martbost 2e0a4af28f Share-link domains: ctbgo.com (active, site config shareDomain) and mylinehq.com (spare) 302 /<name> to /join/<name> (query kept, noindex); member invite line and promo tools now hand out https://ctbgo.com/<name>; old instantadpay.com/join links keep working
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:46:58 -05:00
martbost 6f194596fe Support: no 'Save as KB entry' on LinkSpin tickets (they would land in the InstantAdPay knowledge base; LinkSpin keeps its own)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:39:02 -05:00
martbost 1e040f21ff Chat knowledge base: the assistant answers from maintained entries, and support replies become entries
- kb.js: entries { id, title, questions, answer, tags, pattern, handoff, order, source, updated } in MySQL table kb_entries (created on boot) or DATA_DIR/kb.json without DATABASE_URL. BM25 over title, question variants and tags (answer at a low weight) with word bigrams; the top hits (within 30% of the best, score 3+) go into the system prompt as KNOWLEDGE BASE, and when nothing fits the prompt says to answer "I'm not sure, ask support".
- One source: chatbot.js CANNED seeds the KB (ids c-*, its regex becomes the entry's instant-answer pattern, same first-match order), kb-seed.js seeds the home FAQ, Platform Facts, wallets FAQ and the Coinbase support reply (f-*). The fast path now serves the KB entry, so an admin edit changes the instant answer; the in-code CANNED only answers if the KB store fails. Unedited seeds follow code changes, edited ones are left alone, deleted seeds stay deleted.
- Admin > Knowledge base: list, search, filter by source, add, edit, delete, and Try a question (instant answer or what the AI is given). Support tickets: "Save as KB entry" under each sent reply opens a draft with the member's question and the reply (greeting and sign-off trimmed). Em dashes in admin input become commas.
- chatbot.js: OPENROUTER_URL override for tests; solo-ads answer em dash removed; KNOWLEDGE_DATE 2026-10-20.
- qa/chatbot-sync.mjs: takes the later of KNOWLEDGE_DATE and /api/chat/kb-stamp (newest KB edit by a person, Central day; seed refreshes do not count).
- QA: qa/kb-retrieval.cjs (13 sample questions rank the right entry first, off-topic returns nothing), qa/kb-chat.mjs (local copy + mock OpenRouter: Coinbase answered from the KB, fast path without an AI call, admin CRUD, restart keeps edits), bash qa/run.sh kb; walk covers admin#kb and Save as KB entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:37:09 -05:00
martbost 4df932723e Speed: member reads cached 15 s (cleared on every new chain event) so line, stats and positions stop repeating RPC round trips
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:21:42 -05:00
martbost 0e528ae854 Game sign-in kit: a remembered sign-in on this device opens on 'Continue as @name' (new POST /api/game/auth/resume turns the 29-day kit pass into a fresh hand-off token, no code; pass checked for this game, suspended accounts refused), 'Use a different account' falls back to email; Shards of Valor login ad uses the card view (frames: false)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 17:26:15 -05:00
martbost 7af47ae921 Speed: catalog reads run in parallel and /api/catalog serves the cached ladder while refreshing in the background (was ~6 s of sequential chain reads on every 20 s miss); position rows read the chain side by side
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 15:30:30 -05:00
martbost 0aa22e9984 Merge Shards of Valor Explorer/Champion passes (behind sovTiers, default off)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:47:30 -05:00
martbost 0688bdeb72 Pass tiers: Explorer ($20/30 days) and Champion ($40/30 days) beside the weekly Game Pass, behind sovTiers (default off, admin-only preview)
Islands and looks in Shards of Valor, never power and never more POL: every tier gets exactly the weekly pass caps and polgrant
still answers pass: true. Per-tier expiry side by side (record.tiers, legacy until mirrors weekly, lazy migration); flag() adds
tier (highest active) and tiers; hand-off token gamePass { active, until, tier }; /api/partner/player pass { active, until, tier,
tiers }. Buy { tier } with purchased credits or a waiting order per tier that a big-enough package fulfils (highest price first,
each tx once). No auto-renew, no proration. Admin: per-tier stats (Central week/month), comp per tier, end-a-tier (refund).
Tournament pool keeps weekly sales only unless passTournamentTierSales. Member card shows three tiers; /my#passes opens it.
Tests: qa/sov-passes-store.cjs, qa/sov-passes-local.mjs (bash qa/run.sh sov-passes). Cache tags my.js/admin.js 20261018tiers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:46:51 -05:00
martbost 5e8f2c0b6b Shards of Valor sign-in: /api/my/shardsofvalor hand-off (SOV_SSO_SECRET, Game Pass flag rides along), in-game sign-in entry, Game Pass game list + caps, return-to-game after sign-in; not in the public games list until launch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:08:15 -05:00
martbost 34a1de0b15 P&L: Game payouts card, an all-time running total of every game wallet's payouts read from Polygon (incremental, cached); PolHunter ledger detail folded under it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 07:11:25 -05:00
martbost 017017ad63 Login ad in the games: the sponsor interstitial after a fresh in-game sign-in, counted per surface
- Game sign-in kit (game-signin.js): after a fresh email sign-in (never a remembered
  pass) the kit shows the login ad before the hand-off to /auth?t=, same as the
  dashboard: sponsor card, Open Ad (a counted click through /api/ads/click), sponsor
  framed in a full-screen overlay when frameable else a new tab, 10 s countdown
  (loginDwellSeconds), then Continue to the game. No ad, an error, a non-200 or a
  7 s stall all go straight to the game. A game page whose CSP blocks the frame gets a
  new-tab link instead. mount option loginAd: false switches it off.
- GET /api/game/ads/login?game=<slug>: CORS only for that game's GAME_AUTH origins
  (dev: localhost); the dashboard /api/ads/slot route keeps no CORS. Both share
  loginAdFor() (ads.serve: impression + lastShownDay as before). Drip Runner and
  PolyBreak are marked frames: false (their CSP is default-src 'self'), so their ad
  opens in a new tab; frame checks for games ignore an instantadpay.com-only
  frame-ancestors allowance.
- loginshows.js: every login-ad request tallied per Central day, surface (dashboard or
  game slug) and kind (member slot, house, none); MySQL table login_shows (created on
  first use) or DATA_DIR/login-shows.json. GET /api/admin/login-shows + a Login-ad
  showings card on the admin Traffic pane (dashboard vs games, house, no-ad, by game).
- The kit is served no-cache so games pick it up without a tag bump; admin.js tag bumped.
- Chatbot fact updated (slot rules + games), KNOWLEDGE_DATE 2026-10-18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 06:17:41 -05:00
martbost d520eb67af Login slots: purchased-only at charge time, resume obeys the cap, no top-up on slots
- chargeCredits takes opts.purchasedOnly (new poolShare helper, JSON + MySQL): the
  1,000-credit slot charge draws only the credited purchased-grade pool, the rest burns
  on-chain; viewing credits never pay, even when the member holds enough of them.
- setStatus: resuming a paused member login slot is refused while 3 are live
  (loginSlots() helper, exported).
- topUpCampaign refuses login slots; the dashboard no longer offers Buy more views on one.
- audit: the days-charged check skips 30-day slots (expires set).
- JSON grantWelcome keeps the purchased grade, milestones and streak fields.
- my.js cache tag bumped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 05:57:28 -05:00
martbost 716dd8066f Override dry run: dollar amounts were 100x (cents shown as dollars); POL amounts were right
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:32:01 -05:00
martbost 34d2284051 Level-4 override DRY RUN: 3% of each purchase to the 4th upline with 5+ qualifying buyers, hunting upward up to 25 hops; weekly Monday report to Marty's Telegram + /api/admin/override; no money moves
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:29:52 -05:00
martbost af66f7f865 Help desk translation: member messages in other languages get an English translation (Telegram, admin email, admin view, bot thread); Marty's replies go back in the member's language with his English underneath (OpenRouter, reasoning off; failures fall back to untranslated)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:03:30 -05:00
martbost e490e15abf Email intake: iap-support@linkspin.app is the InstantAdPay support alias (NameSilo's forwarder will not deliver to the help. subdomain)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:57:04 -05:00
martbost ad17017250 Help desk email intake: SendGrid Inbound Parse -> /api/inbound/email (secret key) creates tickets or threads replies; robots, bounces, auto-replies and our own mail dropped; ticket mail carries reply+<ref>@ reply-to and Auto-Submitted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:10:53 -05:00
martbost 524ce843dc Help desk: signed partner API for LinkSpin tickets (LS- refs on the one shared desk)
POST /api/partner/support/{create,list,view,reply,token,token-reply}, signed exactly
like the registry rows (LS_SYNC_SECRET, X-LS-Ts + X-LS-Sig, now one readLsSigned helper
shared with /api/partner/registry). Only platform 'linkspin' tickets are reachable there.

LinkSpin tickets: requester mail, links and footer say LinkSpin support and point at
LS_URL (/support/t/<token>, /help#t=<ref>); no InstantAdPay in-app notice is sent for
them. Telegram ping, admin mail and the support bot's thread/list views mark them
LinkSpin. The member Help pane here lists InstantAdPay tickets only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:04:52 -05:00
martbost 80885705d2 Restore CRLF line endings changed by the previous commit's cache-tag bump (no content change)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:22:02 -05:00
martbost e2d15aa751 Support in the top nav of every public page, and the chat bubble's greeting points to support; cache tags bumped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:20:31 -05:00
martbost 8fe527ab67 Support bot menu: persistent buttons (Open, Waiting, High, Recently closed, Help), command menu via setMyCommands, tappable ticket lists that open the thread
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:01:55 -05:00
martbost 6f6412d908 Help desk in Telegram: @CTBTickets_bot pings with Close/Waiting/High/Open buttons, reply to a ping to answer (/note = internal), /tickets and /t <ref>; secret-header webhook, only Marty's private chat is obeyed; old one-way ping stays as fallback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:56:54 -05:00
martbost 9be58bd5ef Help desk: support tickets for members (Help pane), the public /support page with private ticket links, chatbot hand-off, and an admin Support pane
- tickets.js: one shared desk (platform iap now, linkspin later), dual-mode store (MySQL tables tickets + ticket_messages, else support.json); refs IAP-<1000+id> / LS-; private no-login link /support/t/<ref>.<HMAC> signed with DATA_DIR/support.key (or SUPPORT_SECRET); ingestEmail() ready for the support@ intake step (threads by Message-ID, then [ref] in the subject from the same sender)
- Member Help pane (/my#help): list with status + unread badge, new ticket (category, subject, message, up to 2 screenshots via /api/my/upload), thread + reply (a reply reopens a closed ticket)
- Public /support: name, email, category, subject, message behind the sign-up walls (honeypot, form age, per-IP limits with the icon check, global cap) plus a per-email cap; confirmation email with the ref and the private link
- Chatbot: CANNED + systemPrompt know the help desk; answers that cannot help (or "talk to a human") offer "Send this to support", which files the last turns as a ticket (members: Help pane; signed out: email + the same guard)
- Admin Support pane: open / waiting / closed / all, platform, category, search; open-count badge; ticket view with requester account info, internal notes, status/priority/category, saved replies (site setting supportTemplates); deep link /admin#support?t=<ref>
- Notifications: new ticket / member reply -> Telegram to Marty's private chat only (supportTelegramChat, default 1289244227, site bot then Hermes fallback, never a group or the Discord relay) + email to ADMIN_EMAIL, max one per ticket per 10 min; Marty's reply -> email "[IAP-1042] subject" + a 'notice' inbox message for members, bursts batched
- support* settings are kept out of /api/config; Support link in the site footer, home footer, member page foot, terms and privacy; "Contact support" errors point at /support
- QA walk: member Help ticket flow, admin Support pane + deep link, internal-note leak check, public /support + private link + tampered token + form-age refusal
- Cache tags: common.js 20261016a, chat.js 20261016a, my.js 20261016r, admin.js 20261016sp, support.js 20261016a

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:51:30 -05:00
martbost f0c868ef23 Leader tools: Training section (Leader's Guide PDF, presentation, build-wide video) with cards in My line and Pipeline; #training?g=leader deep link; training entries can name their button; chatbot knows it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:09:55 -05:00
martbost 79e48b3cad Home hero: packages from 5 to 500 dollars; cache tags bumped for the re-voiced platform and partner overview videos
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:25:38 -05:00
martbost 9b7b166097 Presentation: packages scene re-voiced and rebuilt for $5 to $500 (7 packages); captions in 6 languages; cache tags bumped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:27:48 -05:00
martbost 4c470d8e3c Packages: Starter $10 (1,000 credits) and Elite $500 (70,000) across tiles, calculators, promo copy, kits, facts, chatbot; tiles sorted by price; cache tags bumped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:16:45 -05:00
martbost 084d1ea3d6 Game Pass: tournament/pending answers rows (the field the games' polgrant.js reads), games-side integration test, docs "Games: as built"
- /api/partner/tournament/pending returned only `pending`; every game's polgrant.js tournamentPending() reads `rows`, so
  PolHunter's prize payer would never have seen a row. Answer now carries both (`pending` stays for the admin pane + qa).
- qa/gamepass-games.cjs (bash qa/run.sh gamepass-games): boots a local copy like qa/gamepass.mjs and drives the REAL
  spooky-doors/server/polgrant.js and polhunter/lib/tournament.js against it (fetchPass, daily/progress caps, carry:<day>
  zero-POL call on the next Central day, void, bad secret / IAP down -> retry, retry queue, tournament dry run + live). 44/44.
- qa/gamepass.mjs pins the `rows` field.
- docs/GAME-PASS.md: 3a item 8 updated, "Games: as built" section merged from the games' notes (per game files/refs/perk/tests,
  decisions, the tournament payer and its dry-run claim trap, the integration test).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16 09:27:46 -05:00
martbost 4d6a0f2f83 Game Pass (IAP side): $5 weekly pass across all nine games + account-wide POL cap service
- gamepass.js: durable pass store, waiting orders fulfilled by the next $5 package, cap ledger
  (daily/total per Central day, progress deferral + next-day carry-forward, idempotent refs kept 90 days,
  void), weekly Pass Tournament (Monday 9 AM Central, marks.claim, prizes recorded for the game faucets),
  admin stats. Settings in site config, caps enforced only from capsStartDate (recorded before).
- server.js: /api/partner/player, /api/partner/polgrant(+/void), /api/partner/tournament/pending|paid,
  /api/my/gamepass(+/buy), /api/admin/gamepass/stats|comp|tournament/run; gamePass claim on every
  sign-in hand-off token; purchase-event fulfilment inside the marks.claim block.
- Members > Games: Game Pass card (Buy via IAP.confirmBox, deep link /my#games?pass=1), Overview nudge
  after a free-cap hit. Admin > Game Pass pane. Chatbot canned answer + FACTS, KNOWLEDGE_DATE 10-16.
- qa/gamepass.mjs scripted test (bash qa/run.sh gamepass), Games tab card in qa/walk.mjs.
- docs/GAME-PASS.md: 3a clarifications + Built section; docs/GAME-PASS-RELEASE.md draft (not sent).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16 08:18:09 -05:00
martbost d0cc45eadb AI calls: reasoning off (deepseek-v4-flash began thinking by default and used the whole max_tokens, so chatbot and Copy Engine answers came back empty)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:30:23 -05:00
martbost 0db7c94728 Plan lab: honest licence booking, licence levels kept after the replay, unsponsored joins under the top position, sponsor leg obeys the gap toggle, pool-only members no longer count as paid
- Licence value now books the money each leg actually moved for it (its own share of the level), not the full level price; labelled "licence value funded" with a note on what a licence-granted level costs the system
- gStartRun: after replaying an org, money counters reset but members keep every level they hold, licence-won ones included, and keep what they actually paid in
- Joins with no recruiter go to the top position (spread placement) instead of the earliest member with one recruit, which qualified members who never brought a second
- Sponsor-leg licences respect the gap toggle (skip vs fund), like the depth leg
- "Paid" counts cash or entry share only; pool-only members are reported apart
- The climb and the drawn tree are labelled as simplified depth-only illustrations; headline numbers come from the month-by-month run
- Cache tag bumped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:10:12 -05:00
martbost be268beb66 Presentation sponsor card: a capped bio ends on a whole word with an ellipsis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:57:13 -05:00
martbost bb11f8183d Chatbot: Road Agent (live 10-15) and its fuel-stop visits, from today's two release notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:52:50 -05:00
martbost 7aec7d5169 Presentation page + Build Wide 'wide' join angle
- /presentation: the narrated InstantAdPay presentation (video on Spaces
  training/iap-presentation.mp4, poster .jpg), caption pills for
  en/it/fr/es/de/pt (VTTs served from /captions, text/vtt MIME added),
  sponsor card from /api/sponsor ("Shared with you by @name" + Join to
  /join/<ref>?v=wide, or the plain join link). Works framed: join and
  sign-in open a new tab, internal links carry ?ref.
- Site menu + footer: Presentation. Sitemap, Traffic pages and the viral
  page list include it. Promo tools: "Share the presentation" strip copies
  instantadpay.com/presentation?ref=<username>.
- 'wide' join angle (Width unlocks depth.): server JOIN_ANGLES with the
  buildwide poster as og:image, join.js angle (portrait video on phones,
  16:9 otherwise, files promo/buildwide*), link stats row, promo VIDEOS
  first entry with a per-entry file override, front-door list entry.
- Chatbot: presentation canned answer + facts, ?v=wide in the angle lists,
  KNOWLEDGE_DATE 2026-10-15.
- common.js/my.js/promo.js/join.js cache tags bumped; qa/walk.mjs PUBLIC
  gains /presentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:51:04 -05:00
martbost d86f2fbcf8 Reverse registry sync: LinkSpin-first members arrive on InstantAdPay as waiting accounts
POST /api/partner/registry (same HMAC LS_SYNC_SECRET scheme LinkSpin accepts from us, 10-minute window) feeds
lsinbound.js: an email already on InstantAdPay keeps its sponsor and only gets empty fields filled (username if free
and allowed, wallet if no other account or linked position holds it, profile); a new email becomes a waiting shell
(joinedVia linkspin) under its LinkSpin sponsor, building the sponsor's shell upward from known rows (25 levels),
remembering a sponsor whose row has not arrived and binding it later, refusing sponsor loops. No mail, notices or chain.

Unclaimed shells are left out of accounts.listAll by default (tank, coach nudges, Friday/Wednesday broadcasts, member
update audiences, leaderboard, 1,000-member milestone count); the admin members table and lssync ask for them. The first
sign-in claims the shell: the sign-up anti-fraud checks run then, a sponsorless shell takes the link used, lastSeen set.

Loop guard: lssync mutes an email while its LinkSpin row is applied, then records the result as already pushed when it
equals what LinkSpin sent; touch() now skips rows whose hash is unchanged. Status: GET /api/admin/lsinbound (also under
/api/admin/lssync as inbound).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:44:53 -05:00
martbost ae72a06a85 Mail: every non-transactional email carries an unsubscribe link and honours opt-outs
instantadpay.com landed on the Spamhaus DBL. Only the drip and the admin update
tool had an unsubscribe link; the Wednesday/Friday broadcasts, coach nudges and
digests, milestone, refill, reach, wallet nudges and sponsor notices had none,
and several did not check opt-outs. The rule now lives in mailer.send, so new
senders inherit it: skip anyone who unsubscribed, append the signed link (unless
the body already has one) and add RFC 8058 one-click List-Unsubscribe headers.
Exempt (transactional): sign-in codes, mail to ADMIN_EMAIL, purchase receipts
and payout notices. /unsubscribe now accepts the one-click POST too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 06:34:40 -05:00
martbost 4759cabf09 Game art off the adrotate.xyz host: ad blockers filter 'adrotate', so the PolyBreak card showed no image (Games tab, public games page) and promo banner previews went blank; serve from the Spaces CDN instead
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:28:31 -05:00