Commit Graph

16 Commits

Author SHA1 Message Date
martbost 4787390e8b Tracked network links (Marty 2026-11-14: "make sure each of these sites is its own traffic source and link spun so we can track it"). netsites.js: /api/network-sites adds go = the LinkSpin network link for each site with ?src=iap (linkspin.app/r/nwls|nwdlb|nwvbb|nwsp|nwec, fixed codes on Marty's LinkSpin account), this site found by NETWORK_SITE_ID or the request host; common.js + netline.js footers use go (rel nofollow), plain url as fallback. Promo tools > Network sites: every kit link shows a tracked twin, credited to InstantAdPay (?src=iap) as the site that sent the visit; it lands on the same page with ?ref=<member>. Chatbot Network sites answer says so. Same netsites.js in all five sites. common.js?v=20261114ns, netline.js?v=20261114ns, netkits.js?v=20261114ns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:39:14 -06:00
martbost edc484db27 One network tank (Marty 2026-11-14: IAP and LinkSpin tanks should show the same people): waiting() counts waiting accounts that never signed in here (BTC4Hits / LinkSpin arrivals) as LinkSpin does; quiet hub-made accounts stay out. The weekly email only counts the tank. hubsync test + iap-qa member ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:28:36 -06:00
martbost 836c7b17c2 Hub switch-on (Marty 2026-11-14). Rule 2: a hub arrival (and a sponsor climbed for it) gets person.locks.iap's sponsor when the InstantAdPay contract holds them, never the plain network sponsor; sponsor.changed stays ignored. Quiet: lssync never pushes a hub waiting account to LinkSpin (its registry route would switch payouts on and email them). Rule 3: the holding tank (waiting, release, expiry, rescue, readyTick, autoAssign) leaves out anyone the hub reports locked on any contract or sponsored; /v1/locked detail cached 10 min, last answer kept 1 h, after that held (unknown). Alignment to the hub sponsor only with HUB_TANK_ALIGN=on. Needs network-hub b44dba6. qa/hubsync.test.cjs 19/19 (mail audit with recording mailer, messages, fetch and https), iap-qa member: ALL PASSED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 08:51:58 -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 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 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 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 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
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 a60905a9fb Tank, roster and downline: sortable/filterable lists with last seen, surf earnings and wallet/payout state; admin Members table loads 5000 accounts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 09:25:55 -05:00
martbost 0c58b80184 Holding tank: no releasing an adoptee within 3 days of pickup, dropped adoptions count toward the two-adoption limit, releases posted to the feed and Telegram
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 13:50:28 -05:00
martbost 3c81df2167 Holding tank: adoption posts to the Telegram payments topic naming the sponsor
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-12 13:18:59 -05:00
martbost b97e139ef8 Hotfix: quote reserved column name lead in lead_marks (MySQL 8 boot failure)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 08:10:19 -05:00
martbost 09dc6ed368 Dormant-lead rescue: 10-day warning, 14-day move to the holding tank, Contacted-them reset, dead sponsor links to the tank
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 08:06:40 -05:00
martbost 9709ce782d Holding tank: unsponsored free members, first-come adoption (own $20 buy required, 2 open, 7-day window, twice max), release to tank, admin view; PIF wallet-to-wallet POL gift with logging
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 07:57:44 -05:00