Commit Graph

397 Commits

Author SHA1 Message Date
martbost 2d4fc7a9f3 Merge branch 'hub-listener' 2026-11-13 07:51:48 -06:00
martbost 00cfd09c8f Network sign-in reaches Downline Banners (Marty 2026-11-13): networksso.js vouches for a wallet site (/go/bannerline, /sso/check?r=bannerline carry the member's wallet + username); public /api/network/member lookup (username <-> linked wallet) so Downline Banners share links use the network username
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 07:35:15 -06:00
martbost 4cf3512106 Network links (Marty 2026-11-13 'yes please proceed'): every click on a link to the other site goes through /go/<peer> (InstantAdPay -> /go/linkspin, LinkSpin -> /go/iap), so a signed-in member arrives signed in; signed out it is a plain redirect. Click-time rewrite in the shared scripts (IAP common.js; LinkSpin common.js + cr-shell.js), so copied share links stay clean; data-nogo opts a link out. Browser check: path+query+hash kept, other hosts and data-nogo untouched. iap-qa member ALL PASSED. common.js/cr-shell.js ?v=20261113nl
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 05:28:11 -06:00
martbost ff2f668583 Network sign-in: a wallet-only session counts as signed in when its wallet belongs to an account (session carries the address, not the email), so a member who signed in with their wallet is signed in on the other site too (Marty 2026-11-13: signed in on IAP, LinkSpin's check came back 'not signed in here'). networksso.test + e2e ALL PASSED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 05:09:53 -06:00
martbost fab7732620 Merge network sign-in (InstantAdPay <-> LinkSpin) into main for the Friday launch (Marty 2026-11-13: 'we need to get that done now'). Conflicts only in script version tags (kept today's newer assets, re-tagged ?v=20261113sso). networksso.test 'ALL PASSED' both repos, networksso.e2e ALL PASSED, iap-qa member ALL PASSED. NETWORK_SSO_SECRET set on both Coolify apps. Chatbot KNOWLEDGE_DATE 2026-11-13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:53:08 -06:00
martbost 5c896cb782 Network hub listener (hubsync.js), off unless HUB_ENABLED
POST /api/hub/events: signed hub hooks (HUB_SECRET, 5-minute window), each seq applied once, 503 so the hub retries.
member.joined from another door: /v1/resolve the person (climbing to sponsors not here yet) and make waiting accounts
through lsinbound.receive (joinedVia 'hub', joinedRef 'hub:<door>'); existing accounts keep their sponsor and the
difference is listed in /api/admin/hub. wallet.connected fills waiting accounts only; sponsor.changed is a TODO.
Our own new accounts and wallet links go to /v1/join and /v1/wallet from a persisted outbox (hubsync.json), never
in the way of a sign-up. With the flag off nothing is initialised, wired, routed or written; the LinkSpin sync is
unchanged. Test: qa/hubsync.test.cjs against a local network-hub (needs /v1/resolve by id, branch hub-resolve-id).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:02:45 -06:00
martbost 85d43f7483 Chasing Unicorns promo tool (Marty 2026-11-12): /chasing-unicorns, a labeled training simulation of a fake earnings dashboard where every button is one of 8 scam red flags (reveal card + scam-radar score), then PAS: what chasing unicorns costs, then how InstantAdPay works instead with a free join that keeps the sharer's ?ref=. Promo tools card with the member's link, OG image, chatbot fact, qa/chasing-unicorns.mjs (18 checks). my.js?v=20261112cu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 13:34:11 -06:00
martbost cedb291aaa My line: your directs' email (with copy), where they came from (referrer + ?src= tag) and how they joined, up front in 'Your line', the Activity drop-down and the three-level card; levels 2-3 never get emails (Marty 2026-11-12: 'it was kind of buried in there'). Search also matches email + source. qa/line-origin.mjs (11 checks). Chatbot fact. my.js/site.css ?v=20261112ln
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 12:59:09 -06:00
martbost 574a0cafb1 Join page records the ?src= tag in the first-touch source (Marty 2026-11-12: 'we need the source tag so we can know where these things come from'): joinedRef = <referrer host>/<src> or just <src> when the referrer was stripped; a tagged visit replaces an untagged 'direct' first touch; a real earlier source is kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (PolHunter/Drip Runner arrivals stay untagged for the bounty proof.)
2026-11-12 12:10:44 -06:00
martbost 55d3597f12 My line: search box on every member list (Your line, three-level downline, Holding tank) to find a member by name, username (with or without @), email or member number (Marty 2026-11-12). Narrows as you type, keeps focus across re-renders, restarts paging at page 1, works with sort + filter chips. Chatbot fact added. my.js/site.css ?v=20261112q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:24:53 -06:00
martbost 5585abb663 Network sign-in with LinkSpin (Marty approved 2026-11-12): signed in on one site = signed in on the other, no email code
networksso.js (same file in both repos): /go/linkspin hop for signed-in members' cross-site links; /sso/start (state cookie +
30-minute loop guard) -> LinkSpin /sso/check -> /sso/in?t=<v1 HMAC-SHA256 token, NETWORK_SSO_SECRET, 60 s, single-use nonce
(MySQL table network_sso_nonces when on the DB, else DATA_DIR file), bound to the browser's state cookie, email, audience and a
same-site relative path>. Member sessions only (admin portal never shared), ordinary 4-hour session, /my lands with ?welcome=1
so the login ad runs as after a code sign-in. An email with no account here or a waiting LinkSpin/BTC4Hits account gets the
normal email-code sign-in, email prefilled; nothing is created. Silent check on /my via public/assets/netsso.js
(/api/sso/status); never for bots/fetches; sign-out pauses it 12 hours. Engine Room + Fuel links go through /go/linkspin.
Chatbot knows it (KNOWLEDGE_DATE 2026-11-12). Off until NETWORK_SSO_SECRET (32+ chars) is set.

qa: networksso.test.cjs all passed, networksso.e2e.mjs (both servers, real browser) 31/31, run.sh member green (0 bugs)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:00:23 -06:00
martbost db1ab8359c Admin member card: Message (inbox + email) button (Marty 2026-11-12). POST /api/admin/member/message puts a broadcast in the member's inbox and emails it through the site mailer (opt-outs and unsubscribe link kept); reports when email is skipped. admin.js?v=20261112msg; qa member passed; local route test passed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 06:47:52 -06:00
Marty Bostick 3eae242dc3 BTC4Hits import, round 2: tank cap 10 at one time (setting tankAdoptCap), BTC4Hits wording in the adoption note/email/auto-assign message, lssync rows carry origin btc4hits (not hashed), chatbot knows the import + the cap (KNOWLEDGE_DATE 2026-11-11). qa: tank-cap 13/13, tank-hold all passed, sponsorfollow 30/30, sponsorfollow-e2e 24/24
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:08:58 -06:00
Marty Bostick 5e8dee7517 Holding tank: an adopter may hold up to 6 people at one time (open adoptions not yet switched on payouts; setting tankAdoptCap, default 6; was 2 open adoptions), clear message at the cap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:49:03 -06:00
martbost 0013416af7 Forum reward lookup (Marty 2026-11-10: 1 POL for an introduction, ongoing, linked wallet + payouts on): GET /api/forum/member?email= signed with the forum secret (HMAC of email.ts, 5-minute window) returns found/username/activated (member id > 0)/address/suspended for the earnerscorner.com reward service. qa/forumsso 17/17.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:22:27 -06:00
martbost e00c820d2f Earners Corner invites credit the inviter (Marty 2026-11-10): /forum/join/<username>[?to=/path] sets the member as sponsor exactly like /join/ (30-day cookie, last touch wins, first-touch source earnerscorner.com, link view recorded) and forwards to the forum (?to= must be an on-forum path); /forum/invite shows a signed-in member their link. The forum's Log In carries a shared thread's ?u= through this route. qa/forumsso 14/14 (incl. a new sign-up landing under the inviter); member walk 0 bugs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:29:00 -06:00
martbost f20e845cf1 Earners Corner forum sign-in (Marty 2026-11-10): InstantAdPay is the DiscourseConnect identity provider for earnerscorner.com. /forum/sso verifies Discourse's HMAC-signed request (return URL must be on the forum), a signed-out visitor signs in on /my (request kept in a 30-minute cookie, my.js hands back via /api/my/forum), then a signed payload goes back: email, external id, username, Stack POL page as website, groups network_members (on-chain position) and wallet_linked. Suspended accounts are refused. Env FORUM_SSO_SECRET + FORUM_URL. qa/forumsso.mjs 9/9; member walk 0 bugs; my.js ?v=20261110forum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 06:51:34 -06:00
martbost 1da37f05ab Admin: grant Stack POL Pro for a $10+ package bought without a Pro order first (Marty 2026-11-09, Orlando). POST /api/admin/stackpro/grant {memberId, tx}: the tx must be an on-chain Purchase of $10+ by that member; recorded as a package sale with its tx, marks the Stack POL page Pro and posts the badge once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:30:34 -06:00
martbost 054ce10985 Stack POL pages ON by default (Marty 2026-11-09: "Everyone's should be enabled by default"): every paid member has stackpol.com/<username>; only an explicit switch-off hides it. Promo tools copy, note and chatbot updated; my.js ?v=20261109pro3; qa/stackpro expects on by default. Pro features stay Pro-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:41:21 -06:00
martbost bafeff9bf4 Stack POL Pro (Marty 2026-11-09): a one-time unlock for the member's stackpol.com page, new money only. Promo tools > Stack POL > Get Pro opens an order; the member's next ad package of $10 or more (mined after the order, by their own position) fulfils it, one package fulfils one order, credits never count (gamepass.js order book, persisted map 'stackpro', durable). The fulfilment marks pro[username] in stack-optin.json for the stackpol.com indexer. New Stack POL Pro achievement badge (badge-stackpro.jpg, ribbon 0.855), celebrated and posted like Game Pass. /my#promo?s=stackpol deep-links the tab (the Pro page's Unlock Pro button). Chatbot canned answer + prompt carry Pro. qa/stackpro.mjs 16/16; member walk 0 bugs; qa/gamepass.mjs has the same 7 date-based failures on the untouched HEAD.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:29:48 -06:00
martbost 2aa98bdbd2 Promo tools > Stack POL: 'Show my Stack POL page' switch (GET/POST /api/my/stackpol, DATA_DIR/stack-optin.json read by the stackpol.com indexer); chatbot knows Stack POL (KNOWLEDGE_DATE 2026-11-09); my.js v=20261109sp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:39:25 -06:00
martbost 03284aa281 Conversion linkage, InstantAdPay side (Marty 2026-11-07, "Yes ship these"): a LinkSpin click stays with the account, and its sign-up, wallet link and each package purchase are reported to LinkSpin. Reporting only: no sponsor, payout, credit or chain path changes; accounts.js only gains a notification after a wallet is linked.
lsreport.js. A click id (lsclk or lsid) arriving on any page is kept in a first-party cookie iap.lsclk, 30 days, last click wins, like the sponsor cookie. The join page also sends its own copy with the code request and verify (the cookie is refused in traffic-exchange frames and never crosses browsers, the 2026-09-29 lesson) and it is remembered per email. It is stored in its own table ls_account_clicks when the account is created or a waiting LinkSpin shell is claimed, on /api/signup, email sign-in and in-game sign-in (a game may pass lsclk; none does yet).

Reports queue in ls_events, whose primary key is the idempotency key (join:<hash>, wallet:<hash>, purchase:<tx>:<log index>), so two app copies in a deploy cannot double a row, and LinkSpin dedupes on the same key. A background loop sends them signed, retrying up to every 5 minutes; a sign-up or a purchase never waits on LinkSpin. The purchase hook runs after the existing ev: claim and its value is the USD price on the chain event. A first purchase finds its buyer through the contract's wallet for that member id, since member_id may not be stored yet. Linked positions count as the account's purchases. Past 30 days from the sign-up nothing is queued (LinkSpin's window is from the click).

Campaigns > Conversion tracking lists everything the member's clicks led to, and joins, wallets and purchases on each campaign row. Guide, privacy page and chatbot (CANNED + FACTS) updated; common.js, join.js and my.js tags bumped.

QA: bash qa/run.sh netconv (54 checks: local InstantAdPay + local LinkSpin + a mock Polygon RPC, a real Purchase log through the real event fan-out, LinkSpin down, two copies racing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 07:48:36 -06:00
martbost bfbea142b6 Holding tank: 24-hour sign-up grace plus a Who invited you card (Marty 2026-11-07: "24-hour grace plus the prompt"). On Nov 2 a sponsorless sign-up was adopted five hours after joining, before he could say who invited him.
Grace: for 24 hours from an account's created time nobody can adopt the person by hand. They stay on the waiting list after the open ones with an Opens in badge and no Adopt button, and adopt() refuses in plain words. Only sign-up counts, so someone back in the tank later has no grace. Auto-assign does not wait for it: the 24-hour hold still runs from the wallet link and is not stretched. No notice tells people to adopt someone they cannot adopt yet: the wallet-ready post waits for the grace and says the time really left, is skipped when the rotation takes them in that tick, the arrivals post moves to when the grace ends (marks.claim per member), and the Overview note and weekly email count only people who are open.

Prompt: a member with no sponsor and no member number sees the card at the top of Overview, types a username, confirms in an in-page box, and that person becomes their sponsor through setSponsor as a deliberate change with by 'invited', so it follows to LinkSpin and clears the hold. Refused: self, unknown username, already sponsored, member number or wallet already on the contract, a chain loop, a suspended sponsor, a no-payout chain, and a line with nobody on the contract (they would walk up to the company). The network sponsor is tried first. Nobody invited me hides it and a small link brings it back. Not an adoption: status 'invited', no 7-day window, not counted toward the two. The named sponsor gets the referral email and an on-site notice. Switch-on-payouts reminders track the named sponsor.

Chatbot canned + systemPrompt, KNOWLEDGE_DATE 2026-11-07. my.js, admin.js, admin-sponsorcheck.js ?v=20261107tg. qa/tank-hold.mjs, qa/sponsorfollow.test.cjs and qa/sponsorfollow-e2e.mjs extended (SF_E2E_PORT overrides the ports).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 07:04:18 -06:00
martbost 973fc80570 Shards of Valor testing: the Games card and the chatbot say all testing progress is wiped at launch (Marty 2026-11-06: "we're just testing for bugs right now")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 09:56:25 -06:00
martbost a845155c88 Shards of Valor open for testing from the Games tab (Marty 2026-11-06, Dallas ready for players): card tagged Open testing, Pays "Nothing yet. No POL until we set a launch date", strip line, card art; chatbot says it is open testing with no POL and no date (KNOWLEDGE_DATE 2026-11-06). Shows once gamesLive has 'shardsofvalor'
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 09:43:04 -06:00
martbost abfb3e3199 Shards of Valor bonus heroes sold one time (Marty approved 2026-11-05): Kestrel, Valda, Morag, Roland $20 each, $50 bundle (Valda + Morag + Roland), behind heroSales (OFF)
Paid exactly like a pass: no credits, no POL. POST /api/my/heroes/buy opens a waiting order (kind hero); a fresh package of at least the
price from one of the member's own positions fulfils it in gamepass.onEvent (one package, one order: the highest-priced it covers, pass
or hero; each tx once). Ownership is permanent on the passes record (heroes, heroBundle), never in bought, so hero sales never feed the
Pass Tournament pool. No double charge: an owned hero is refused, a bundle is refused once any of its heroes is owned, and waiting orders
made pointless by a purchase are cancelled.
Settings (Admin > Settings): heroSales '0', heroPrice<Kestrel|Valda|Morag|Roland>Cents 2000 (0 = free for every account),
heroBundlePriceCents 5000, heroBundleHeroes 'valda,morag,roland', heroBundleCap '' (unset: the bundle is heroes only, no cap change).
Hand-off: sovMint (and GET /api/partner/player for shardsofvalor) carries heroes, heroBundle, heroSale { free, bundle, each, bundlePrice },
and heroBundleCap only when set. TIER_DEFS perks: Champion no longer lists the Druid, Sovereign no longer the Necromancer (dropped),
Legend every bonus hero while active. Member Game Pass card: a Bonus heroes block (shown while heroSales is on or to an owner);
Admin > Game Pass: hero test on the admin's own account (test buy / cancel / give / remove) and /api/admin/heroes/stats.
Chatbot: canned sov-bonus-heroes answer + heroesFact following heroSales; KNOWLEDGE_DATE 2026-11-05. my.js?v=20261105hr, admin.js?v=20261105hr.
QA: qa/sov-heroes-store.cjs (39 checks, in member and sov-passes); sov-passes-local expects the hero test panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:04:47 -06:00
martbost e61475f89b Zealy quest checks for the games (Marty 2026-11-05: game quests are important): /api/quest/zealy/game passes once the account has earned any network-game reward (gamepass.activity = grants and POL in the ledger), /api/quest/zealy/gamepass passes while a Game Pass is active (gamepass.flag). Read-only, same key and 200/400 contract as the other checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:19:17 -06:00
martbost 2e935b3081 Quest-site checks for Zealy (Marty 2026-11-04): POST /api/quest/zealy/account|wallet|member reads accounts.email or accounts.wallet from Zealy's API task call, checks X-Api-Key against QUEST_API_KEY, answers 200 (claimable) or 400 with a message that tells the member what to do (join link martbost, link a wallet, get a package). Read-only lookups; 503 until the key is set
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:38:17 -06:00
martbost 769c04e639 Share domain is instantadpay.link (Marty 2026-11-04: ctbgo.com confuses people; a branded domain, bought on NameSilo $8.39): SHARE_HOSTS default instantadpay.link,ctbgo.com,mylinehq.com so every old ctbgo.com link keeps working; shareDomain default instantadpay.link; chatbot short-banner example on the new domain; my.js?v=20261104il, KNOWLEDGE_DATE 2026-11-04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 06:18:01 -06:00
martbost 0865a4967b Short banner links remember a missing file for one minute, not ten (Road Agent's banners were uploaded 2026-11-03 right after Michael asked for them and stayed 404 on the short link)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 08:35:23 -06:00
martbost 7d28ec7b5f Short banner image URLs (Michael Camire via Marty, 2026-11-03): the Spaces CDN links in the Games and BixPay kits ran about 105 characters and exchange / safelist image fields cut them off, so the banners never showed. /b/<slug>/<file> on instantadpay.com and the share hosts (https://ctbgo.com/b/turkeydrop/728x90.png) serves the same game-banners CDN file in place (no redirect, HEAD works, 300-file six-hour cache); promo.js builds every game and BixPay banner URL on the share domain; chatbot banner-image answer; promo.js?v=20261103b, KNOWLEDGE_DATE 2026-11-03
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 07:36:55 -06:00
martbost c6b4a84abc Free allowance across the games (Marty 2026-11-02, "cap these so if they want to keep playing they spend a tiny amount"): an account with no Game Pass receives at most capFreeLifetime POL of game rewards ever, across every game (2 POL default, site setting). After that a free account's room for the day is zero: progress rewards defer until a pass is active, repeatable rewards drop, carry waits too. Grant answers and partner caps carry lifetimeHit / freeUsed / lifetime; chatbot facts; QA block for the allowance
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 17:01:27 -06:00
martbost ae3a08b991 Gem Kingdom Royal Charter: /gk/shop charges a paidOnly order from purchased credits only (never the earned pool); chatbot and promo copy carry the new ladder (guests chapters 1-2, free account for 3, $5 Charter for 4-6, taste rewards then Charter-only rewards capped at what the player paid in)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 11:27:00 -06:00
martbost 4bcc867679 Daily growth snapshot also posts to the InstantAdPay support topic: the 'support' target has been in snapshotTargets since 2026-09-24 but post() only knew feed and echo (Marty, 2026-11-02); POST /api/admin/snapshot/send takes {target} for a one-off post to one destination
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 08:23:40 -06:00
martbost 27d7215f0f Merge light and dark themes into main (Marty 2026-11-02 after the Turkey Drop launch): token sets, the Light/Dark/Auto switch saved on the account, the theme head script and its CSP hash, contrast and QA tooling; chatbot answers theme questions; KNOWLEDGE_DATE 2026-11-02 (covers the Turkey Drop note) 2026-11-02 06:32:07 -06:00
martbost 0aaffc308e Turkey Drop integration, gated (2026-10-28): the Thanksgiving season game at turkeydropgame.com, same protocol as POL Miner. TD_SSO_SECRET / TD_URL (default https://turkeydropgame.com) / TD_ALT_URLS (default www + turkeydrop.saasy.top) with tdMint/tdOpen/tdIsGameUrl/tdCallback (code defaults only, no env set); GAME_AUTH turkeydrop (in-game sign-in kit, three origins); /api/my/turkeydrop hand-off + iap.return + my.js redirect; refuel game 'turkeydrop' (label "back on the air", receipt kind td-life, note "Turkey Drop back on the air", gameplay only, never POL; refuel.js done text "WFWL is back on the air"); GAMES() card with season TD_SEASON 2026-11-02..2026-12-01 (Limited time ribbon, gone after Nov 30, CDN art game-banners/turkeydrop/og-turkeydrop-clean.jpg, per-action copy: first score milestones + weekly top 3) and STRIP line, both hidden until 'turkeydrop' is in gamesLive (admin preview kept); /api/public/games/all now shows a seasonal game's "Opens" date only once it is in gamesLive (it used to list any pre-season game); growth snapshot "opened today" counts a season start only when live; walletnudge entry (idle until the secret is set); gamestats name; Game Pass: gamepass GAMES/NAMES += turkeydrop, GP_SECRETS, GP_PERKS row "one free back on the air extra life every day" shown only while the game is in the public games list (Spooky Doors row the same, so it drops after Oct 31), pass copy made count-free ("every game" / "all the games": my.js card, perks table, cap nudge, chatbot pass/Friday/tiers answers + fact, friday.html, Friday pass email); promo tools Games entry (turkeydropgame.com/?ref=, og + 11 CDN banners, 2 posts) shown only while listed and from Nov 2; chatbot CANNED turkeydrop + fact follow gamesLive and the season (coming-soon answer without a date before launch, like POL Miner's; season-over answer from Dec 1; KB answer kept out of the prompt unless live), Game Pass answer names the Turkey Drop perk only while live. my.js?v=20261028td, promo.js?v=20261028td, refuel.js?v=20261028td. qa member 0 bugs (2 old admin warnings), qa public 0 bugs (1 old /shorts warning), refuel-fallback + kb all passed; local e2e (23 checks) and chatbot gating (7 checks) passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 04:33:54 -06:00
martbost 1aec9caf6c Theme switch: auto | light | dark, stored in localStorage iap.theme and on the account, applied before first paint on every page
themehead.js is the one source of the tiny inline head script (and of AUTO_DEFAULT, the one constant Marty decides later: 0 = nothing stored keeps the page's current look, dark everywhere on InstantAdPay; 1 = follow the device). It mirrors LinkSpin's themehead.js with only the storage key (iap.theme), the global (window.IAPTheme) and the event name (iap-theme) changed. The script sets data-theme on <html> from iap.theme (auto follows prefers-color-scheme and tracks changes live). tools/stamp-theme-head.cjs writes it into all 28 static site.css pages before the first stylesheet with data-theme-base="dark" on <html>; the blog, the leaderboard, what's-new, the badge page, the unsubscribe page and the wall 404 read the module directly. The site CSP allows inline scripts by hash only, so themehead.CSP_HASH joins script-src (without it the script is silently blocked).

Account side: accounts.theme (JSON store and MySQL, alterSafe theme VARCHAR(8)), in the public account JSON and /api/me; POST /api/my/profile {theme} rides the existing profile save path, never touches the username, and does not tap changed() (appearance is not mirrored to LinkSpin, same as LinkSpin's side). common.js owns the client side for every page: paints every .theme-seg, saves a click to the account, and IAP.themeSync lets the account value win over the local one at sign-in (a local choice is pushed up when the account has none yet); my.js calls it from render(). The Light / Dark / Auto segmented control sits in the member-area header (#boTheme) and in a Profile pane "Appearance" card, and in the admin header for the same session. shorts.html pins the dark ink set on its black video stage; view.html stops reading an undefined --bg. ?v= tags bumped on every changed stylesheet and script (20261101th): site.css on all 28 pages, common.js on 25, welcome.js on 17, support.js, my.js, engine-room.js, admin.js, admin-kits.js, blog-page.js.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 11:55:06 -06:00
martbost 47ce40b858 Coach nudges never guess from a failed chain read, and the site owner is never coached (Marty 2026-10-31): a chain.member() failure cached null for 60 s, rungFor() then classed the member as "payouts on, no purchase" and mailed the rung-2 "See a payout land: your first package" nudge to the owner (memberId 1, 4 purchases, 7 buyers). describe() now reports unknown and stalled requires a known state; nudgeTick skips adminEmail.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 07:44:22 -05:00
martbost fda27ad43f Merge warpwares-integration: Warp & Wares hand-off, sponsor dock visit kind (dockCapPerDay 10), Games tab card, promo entry, chatbot, walletnudge, qa (gated by gamesLive); conflicts resolved: KNOWLEDGE_DATE 2026-10-30 kept, my.js tag 20261030ww, ads.js dock changes re-applied onto the prohibited-content version (git saw the file as binary)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-30 11:23:31 -05:00
martbost 012250360e Wall profile rendering: a purchase alone decides (a quarantined account that buys a package gets its bio and links back, as the quarantine notice promises)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-30 07:33:19 -05:00
martbost 337d4f9e8f Link-farm hardening (2026-10-30 incident: 106 free accounts used casino bios and website links as backlinks; Google indexed the text through /wall pages)
Public walls: profile fields (bio, avatar, socials, intro video) render only for a paying member (memberId > 0 or a registered position), on /api/wall and in the OG image; a free account's wall shows the name, the line's ads and the join call. The meta/og description is a fixed site sentence with the handle, never the bio. Outbound profile links are rel="sponsored ugc noopener" target="_blank". A deleted or unknown name is a real 404 with X-Robots-Tag noindex (was a bare "Banner wall" page at 200, a soft 404 that stayed indexed).

Policy (prohibited.js, byte-for-byte copy on LinkSpin): bios may not carry a URL or a domain token ("Links go in the social fields, not the bio"); gambling, adult, pharma, weapons and link-selling terms (Unicode aware, Vietnamese and Portuguese terms included) are refused in bios, social URLs, line banner targets, wall offers and every campaign field, with the refusal logged. lssync applies it on the way out and lsinbound on ingest.

Quarantine rule: a brand-new free account (no wallet, no sponsor, under 24 h) whose first profile save plants a link is saved with profileQuarantined (JSON + MySQL column), never rendered publicly, and told "Your profile links will appear after your first ad package"; the admin member card shows the flag.

Daily link-farm scan (spamscan.js, same copy on LinkSpin): in-app job at 06:30 Central, claimOnce per day, lists memberId-0 walletless accounts with a link plus a farm signal (prohibited term, sign-in over within 15 min, no sponsor), skips the spamScanAllow setting (seeded), writes DATA_DIR/wall-spam-scan.json and sends one Telegram to the private admin chat only when there are candidates. Admin > Members > Link-farm list: rows with "also on LinkSpin", Delete selected (existing DELETE /api/admin/member, on-chain refused, no cascade) and Allow.

Terms section 8 "Prohibited content", bio hint in the profile editor, chatbot canned answer "What content is not allowed?", KNOWLEDGE_DATE 2026-10-30. Test: qa/profile-policy.test.cjs (unit + local copy; runs in qa/run.sh member and policy).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-30 07:29:11 -05:00
martbost a058fd515d Warp & Wares integration, gated (2026-10-29): the 30-day Trade Wars-style season game, same protocol as POL Miner and Turkey Drop. WW_SSO_SECRET / WW_URL (default https://warpwares.saasy.top, staging for now) / WW_ALT_URLS / WW_SEASON_START + WW_SEASON_END (default 2026-11-30..2026-12-30, Central, end exclusive) with wwMint/wwOpen/wwIsGameUrl/wwCallback (code defaults only, no env set); GAME_AUTH warpwares (in-game sign-in kit); /api/my/warpwares hand-off + iap.return + my.js redirect; a new visit kind 'dock' in ads.js VISIT_KINDS with its own daily cap (dockCapPerDay, default 10; repeats after the cooldown like refuels; house visits count toward it) and the refuel rail serving game 'warpwares' with that kind (label 'sponsor dock', receipt kind ww-dock, note 'Warp & Wares sponsor dock', refuel.js done text 'Your bonus turns are waiting on the bridge'); GAMES() card with the season window (hidden until 'warpwares' is in gamesLive, its 'Opens' date shown only once live, gone after the season) and STRIP line; growth snapshot counts a season start only when live; walletnudge entry (idle until the secret is set); gamestats + gamepass GAMES/NAMES + GP_SECRETS; Game Pass perks row 'the Season Pass' shown only while the game is in the public games list (gpShown, the Turkey Drop pattern); cap-nudge names; promo tools Games entry (warpwares.saasy.top/?ref=, 3 posts) shown only while live; chatbot CANNED warpwares + fact follow gamesLive and the season window (coming-soon and season-over answers, KB answer kept out of the prompt unless live), KNOWLEDGE_DATE 2026-10-29b; my.js?v=20261029ww, promo.js?v=20261029ww, refuel.js?v=20261029ww. qa/warpwares.mjs (bash qa/run.sh warpwares): 21 checks on a local copy with a mock game (card gating, the hand-off token, a sponsor dock open/challenge/done with receipt + callback, the dock cap separate from refuels, chatbot gating), all passing. Not merged, not deployed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 16:43:49 -05:00
martbost ed6febe0b8 BixPay card integration, phase 1 (Marty approved the copy 2026-10-29; docs/BIXPAY-INTEGRATION.md): gated by site config bixpayLive (off by default). Profile > BixPay card field (partner link validated: bix.ibportal.io/auth/register, e= token, a=1; the appId=3 card-customer link is refused with a message), bixpay.js resolver own > sponsor chain (10 levels) > company link (bixCompanyLink, seeded with Marty's partner link), every surface says whose link it is. Wallet tab card, one-week Overview announcement (24 h snooze), one sentence in TierPaid payout emails and the games' wallet nudges, Promo tools > BixPay tab (3 posts, email swipe, 4 text-only banners on the Spaces CDN, tracked link + per-member clicks), public guide /bixpay with masked app screenshots, chatbot canned answers + facts gated to 'coming soon' while off (KNOWLEDGE_DATE 2026-10-29). Clicks per surface via /go/bixpay in the admin Traffic tab; admin Overview counts members with a link; member card shows it; signed /api/partner/bixpay and the lssync profile row carry it for LinkSpin/CTB. accounts.bix_partner_link column (db.js alterSafe). Tests: qa/bixpay.test.cjs (17) + walk.mjs BixPay block; my.js/promo.js/admin.js ?v=20261029bx.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 07:56:49 -05:00
martbost 6e1ab102f1 Holding-tank Telegram notice: a wallet that predates the tank visit says 'already linked (last seen <date>)' instead of 'linked a wallet' (Marty 2026-10-29: @teamearning, dormant since Sep 18, was returned by a sponsor and the notice read as a live member); digest wording to match; readyTick carries lastSeen + linkedNow
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 07:16:47 -05:00
martbost 7d134e55a2 Game refuel visits never come up empty (Marty 2026-10-28): after every sponsor has been seen, a member video, then a house sponsor (one of Marty's programs, never the game the player is in; 0 credits, no pool income) and, after the doorRepeatDays cooldown, a sponsor seen before again (a real, paid repeat visit, visit_repeat kind refuel). Repeats and house visits count toward the 20-a-day refuel cap. Applies to every game using /refuel (supply crates, paddles, continues, refuels, hints). Earn stays once-ever. Chatbot fact updated. qa/refuel-fallback.mjs (10 checks); member + earn qa clean; qa/door.mjs prints the callbacks on its pre-existing credits failure (admin-seeded packs are house ads, 0 credits, fails on main too)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:23:46 -05:00
martbost f1482deb12 POL Miner joins the Game Pass (2026-10-28, Marty): gamepass.GAMES/NAMES += polminer (polgrant accepts it with POLMINER_SSO_SECRET); pass copy "nine games" -> "ten games" (my.js card + perks table, chatbot pass/Friday/tiers answers, friday.html, Friday pass email); GP_PERKS + chatbot perk line "POL Miner: daily crystal limit 1.5 POL instead of 0.5, plus one free supply crate every day" (PolyBreak gem precedent + Gem Kingdom free-continue precedent); Games card art -> Spaces CDN og-polminer-clean.jpg; promo tools Games entry (link polminer.com/?ref=, og + 11 CDN banners, 4 posts) shown only once polminer is in the public games list; my.js?v=20261028pp, promo.js?v=20261028p. qa member 0 bugs (2 old warnings), qa public 0 bugs (1 old /shorts warning), qa/gamepass.mjs same 5 date-based failures as without this change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:11:29 -05:00
martbost 6096bf38c6 POL Miner integration, gated (2026-10-28): POLMINER_SSO_SECRET / POLMINER_URL / POLMINER_ALT_URLS with pmMint/pmOpen/pmIsGameUrl/pmCallback; GAME_AUTH polminer (in-game sign-in kit); /api/my/polminer hand-off + iap.return + my.js redirect (my.js?v=20261028pm); refuel game 'polminer' (label "supply crate", receipt kind pm-crate, note "POL Miner supply crate"); GAMES() card (art polminer.com/og-polminer.jpg) and STRIP line, both hidden until 'polminer' is in site config gamesLive; walletnudge entry (idle until the secret is set); gamestats name; chatbot CANNED + systemPrompt fact follow gamesLive (coming-soon answer and fact until launch, its KB answer kept out of the prompt), KNOWLEDGE_DATE 2026-10-28. qa member: 0 bugs (2 old admin warnings), qa public: 0 bugs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:07:26 -05:00
martbost 59607d0c94 One-tap switch on payouts after a holding-tank assignment + reminders (Marty approved 2026-10-27)
- Assignment chat + member email (manual adoption and the 24h auto-assign) carry "Switch on payouts" -> https://instantadpay.com/my?activate=1#wallet
- /my?activate=1: signed in, wallet linked, real sponsor, no hold -> Wallet tab, explainer line, the Activate button's own flow (injected wallet or the WalletConnect picker on a phone). Survives sign-in and the wallet link (sessionStorage); never starts on tankHold, a blocked/routed sponsor or the #1 fallback (/api/me sponsorFallback)
- payTick (in the 15-min readyTick): not activated 24h after the assignment -> ONE member email + ONE in-app notice to the sponsor; 72h -> last member email; stops on memberId / MemberActivated / sponsor change. State tank-ready.json `pay`, each send gated by marks.claim (deploy overlap), record saved before the send; Admin tank view gets payReminders
- Chatbot: tank-activate-link canned answer + system prompt; my.js ?v=20261027pa
- qa/tank-hold.mjs: link texts, reminder schedule on a mocked clock, overlap copy, ?activate=1 browser flows (stubbed wallet)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 07:29:43 -05:00
martbost e5c55c2d8b Never hold a purchase (Marty 2026-10-27): a holding-tank buyer with no sponsor anywhere goes ahead under the catch position #1; the 24h hold only stops a plain switch-on-payouts. Network alignment still runs first. home.js buys with intent=buy; chatbot + QA updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 07:05:06 -05:00
martbost 4645d5605a Holding tank activation hold (Marty approved 2026-10-27, "hold them for no longer than 24 hours"): a tank member is never bound under the fallback #1
- Align first: a tank member whose email or wallet already has a sponsor on LinkSpin (the inbound registry rows) is placed under that sponsor when they have a real account here, never a sponsor they were released/rescued from, never a loop (recorded in tank-ready.json, shown in Admin tank)
- Hold: /api/me and /api/sponsor answer tankHold {since, until} instead of the fallback sponsor; Wallet tab hides Activate payouts and shows "You're being matched with a sponsor..." with time left, Getting started has no activate button, buy flows (my + home) refuse on tankHold. The 24-hour clock starts when the member is first seen with a wallet linked (already-linked members start at deploy)
- Surface: Ready to activate badge + hours left, ready members on top (My line tank, Admin tank, Overview notice count); one Telegram line per newly ready member (digest when more than 3, e.g. the first tick after deploy)
- Safety net (readyTick every 15 min + hourly sweep): unadopted 24 h after readyAt -> next eligible adopter in rotation (own $20+ buy, fewer than 2 open, signed in within 7 days, not suspended/flagged, not company, not a no-payout chain, not in their own downline; least recently auto-assigned first, ties by earliest qualification) through adopt() with "auto-assigned after 24 hours in the tank", chat + email to both, Telegram pickup "(auto-assigned)". Nobody eligible: keep holding, one admin alert
- tank.eligibility is now exported (the Overview tank notice was silently failing on it)
- Chatbot: tank-hold canned answer, holding-tank answer + system prompt updated, KNOWLEDGE_DATE 2026-10-27
- qa/tank-hold.mjs (mocked clock unit + local copy e2e), wired into run.sh member and run.sh tankhold; cache tags bumped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 06:03:41 -05:00