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>
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>
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>
- 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>
- 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>
1. Own clicks: auth.onSeen notes the soft key of every InstantAdPay session (lsconv.noteSession, once per 6 h per email + soft key) and the click push carries them as owners [{owner, sk, ts}] (requeued on a failed push), so LinkSpin keeps members' own clicks on their ads, spin links and Banner Spins as tests. /api/ads/click flags a click self for conversions when signed in as the owner OR from a browser the owner signs in from; whether the click is counted and billed is unchanged (still the signed-in check). Linked positions share the owner's email.
2. Send a test conversion now loads the member's real LinkSpin pixel in test mode from the browser (cv.gif?px=..&test=1, reads X-LS-Result: test, the same request LinkSpin's button makes) and falls back to the signed partner call (op test) when the browser cannot load it; CSP connect-src adds https://linkspin.app. The card shows "N from your own clicks, kept as tests and left out" (selfTests from LinkSpin's summary).
4. Cost per goal (30 days): /api/my/conversions returns spend30 = each campaign's spend over the same 30 days from credit_log (ads.spendSince: delivery, login, buy, refund rows by Central day, ref = campaign id). Campaign lines read "Goals and cost per goal (30 days)"; a campaign started inside the window with no log rows uses its spend since start (labelled in the tooltip); an older campaign with no spend on record shows no cost rather than a lifetime figure.
Copy: Conversion tracking card note, /conversion-tracking (test button, own clicks, cost per goal (30 days) row). Chatbot CANNED + FACTS, KNOWLEDGE_DATE 2026-10-26. my.js ?v=20261026cv.
QA: convpixel all passed (new: owners pushed without raw IP, own-browser click self=1 and stranger 0, no re-push within 6 h, spend30 = 200 of the window with the 40-day-old row and another member left out, 50/200 credits each vs lifetime 75, no-log old campaign shows no cost, new campaign uses spend since start, own-click count on the card, test button loads cv.gif?px&test=1 in the browser (routed locally) and falls back to op test); fuel all pass (engine.js / engine-room.js / kit.js untouched, byte-identical with LinkSpin); member walk 0 bugs; public 0 bugs (known /shorts ellipsis warning).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why track, the click -> landing page -> thank-you page -> counted flow drawn in HTML/CSS (across on desktop, down at 390 px), the 4 steps (goal, landing tag, goal pixel, test incl. the &test=1 page check), copy-paste examples with placeholders for plain HTML, WordPress (footer plugin + Custom HTML block), page builders and Aweber/GetResponse custom thank-you pages, what to do without code on the thank-you page (image pixel = cookie / 24-hour match, hidden lsclk field, LinkSpin.goal for pop-up forms), how to read the report (cost per goal in credits, match methods, tests, 30-day window, own clicks) and a troubleshooting checklist. Copy buttons in conversion-guide.js; frames handled by common.js.
Route + TRAFFIC_PAGES + sitemap + viral-link page list. "How to set it up" link on Campaigns > Conversion tracking. Chatbot CANNED conversion-tracking answer + FACTS line point to the guide (KNOWLEDGE_DATE stays 2026-10-24).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Engine Room fix: the streak line said "Refuel the other site this cycle" after BOTH sites were refueled; engine.js streakNote() now says "Both engines fueled this cycle: +X% on each", names the other site when only one is done, and quotes next rates when the window is open (test added, 11/11).
Chatbot: CANNED refuel answer + refuelFact point to /refuel, say either site alone keeps the streak, and describe the Pit Stop exactly as refuel.js decides it (another package on a site already refueled this cycle before the window; the other site's first package is the second engine). my.js tags: fuel.js + engine-room.js ?v=20261024rg.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No content change: server.js back to CRLF, my.js/admin.js/html back to LF, so the override
commit's real diff is ~800 lines, not 13,000.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
override.js: the weekly payer for the 3% level-4 override. It pays only when overrideMode is 'live' AND
overrideGoLive is set AND OVERRIDE_PAYER_KEY (or _FILE) is present; otherwise the Monday dry-run report
runs as before. Default stays 'dryrun'. Nothing in this commit moves money.
- Week = Monday 00:00 to Monday 00:00 Central; settled from 9 AM CT the Monday after, weeks in order.
- Plan frozen once per week (claim plan:<week>), one row per recipient (POL wei summed), on the volume.
- Claims fail closed: exclusive file create on the shared volume plus event_marks when MySQL is on.
- Row marked 'sending' before the tx, tx hash stored on acceptance; lost answers become 'review' and are
never re-sent (settled from the chain index or by the admin). Pre-flight revert = carried, no gas.
- Dust under overrideDustPol (0.01) carried to next week; overridePayCapPol (100) holds the whole week;
wallet must cover total + gas or nothing is sent; Telegram alerts once each.
- Telegram summary to Marty's private chat says PAID with tx links.
- Members: AwardPaid from the payer emails + on-site notice "Your Level 4 override is paid" and shows in
Earnings as "Level 4 override" (common.js / my.js tags bumped to 20261023ov).
- Admin: /api/admin/override adds week status + payer state; POST /api/admin/override/pay (only when live)
and /api/admin/override/resolve; P&L pane card with "Pay this week now" shown only when live.
- Comp plan (earning.html) + Platform Facts card hidden behind data-when="override-live" (shown only when
overrideMode is live). Chatbot copy drafted in D:/tmp/override-copy, TODO in chatbot.js.
- qa/override.test.cjs (bash qa/run.sh override): 30 checks on a fake chain/signer/DB, throwaway data.
Reconciliation 2026-10-23: the dry run reads every Purchase in chain-index (229 events, full history);
per Central week it matches the index exactly. The ~$1,775 figure was the rolling 7 days 09-10..09-17.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ads.js: a login buy with every slot taken returns full:true and a reserve offer; with reserve:true it is charged the full slot price at once (purchased credits only, credit log 'Login slot reserved (queue #N)') and stored with status 'queued' + queuedAt, no starts/expires, never served or counted as a slot. First paid, first served.
- Promotion (promoteLoginQueue): on a slot expiring (scheduleSweep), a member pausing a slot, every new login buy, and a one-minute tick. The oldest reservation becomes active, starts now, ends in 30 days; the owner gets an on-site notice (kind 'notice') and an email unless unsubscribed.
- Deploy-overlap safety: the cap decision runs under a lease row in the new app_locks table (one conditional UPDATE takes it, an expired lease can be taken over); every start/cancel/edit is a conditional UPDATE on status='queued', so a reservation starts at most once and a cancel racing a start has exactly one winner. Live login buys and paused-slot resumes also take the lease, so the cap holds for them too.
- A freed slot goes to the line first: a paused slot resumes only while live + queued < loginSlotsMax, with a plain message saying the line is ahead.
- Cancel before the start: full refund as purchased-grade credits (credit log 'Login slot reservation cancelled: refund'), once. Edit target/image/headline before the start, free. Cancelled reservations can be archived.
- Estimated start per place from the live slots' end dates and the reservations ahead, shown in Central time and labelled an estimate.
- db.js: campaigns.queued_at BIGINT NULL, app_locks table + 'login_queue' row, all added on boot.
- server.js: loginLine in GET /api/my/campaigns, POST /api/my/campaigns/:id/cancel-reservation and /edit-reservation (safe-browsing, reach and image checks), GET /api/admin/login-queue, POST /api/admin/login-queue/:id/cancel, the promotion notice hook and the one-minute tick.
- Member UI (my.js, my.html): open slots or the line with place and estimated start on the Login ad form, the button becomes "Reserve the next slot", IAP.confirmBox before paying, In line #N + estimated start in the list, Edit and Cancel and refund. Admin (admin.js, admin.html): Login-ad line card with owner, queued at, place, estimated start, cancel + refund. Tags bumped to 20261023lq.
- chatbot.js: new canned 'login-ads' answer and the LOGIN ADS fact updated (6 slots, the paid line, cancel = full refund before start). The knowledge base seeds the new entry on boot.
- audit.js: queued/cancelled reservations are not per-day login campaigns.
- QA: qa/login-queue.cjs (JSON store end to end) and qa/login-queue-sql.cjs (SQL path guard logic against a fake SQL layer), bash qa/run.sh login-queue. qa/login-slot.mjs pattern follows the refactor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>