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>
This commit is contained in:
martbost
2026-10-27 07:05:06 -05:00
parent 4645d5605a
commit e5c55c2d8b
5 changed files with 10 additions and 10 deletions
+3 -1
View File
@@ -196,7 +196,9 @@ async function partB() {
ok(me && me.tankHold && me.tankHold.until - me.tankHold.since === 24 * H, '/api/me answers tankHold with a 24-hour clock', JSON.stringify(me && me.tankHold));
ok(me && !me.sponsorId && me.sponsorBlocked === 'tankHold', '/api/me: no fallback sponsor (sponsorId ' + (me && me.sponsorId) + ')');
const sp = (await api('/api/sponsor?intent=buy', null, { Cookie: tc })).j;
ok(sp && !sp.sponsorId && sp.sponsorBlocked === 'tankHold' && sp.tankHold && sp.tankHold.until === me.tankHold.until, '/api/sponsor (buy) holds too, no fallback', JSON.stringify({ id: sp && sp.sponsorId, b: sp && sp.sponsorBlocked }));
ok(sp && sp.sponsorId === 1 && !sp.sponsorBlocked && !sp.tankHold, '/api/sponsor (buy) is NEVER held: falls back to the catch position #1 (Marty 2026-10-27)', JSON.stringify({ id: sp && sp.sponsorId, b: sp && sp.sponsorBlocked }));
const spa = (await api('/api/sponsor', null, { Cookie: tc })).j;
ok(spa && !spa.sponsorId && spa.sponsorBlocked === 'tankHold', '/api/sponsor without buy intent still holds (activation only)', JSON.stringify({ id: spa && spa.sponsorId, b: spa && spa.sponsorBlocked }));
const adm = (await api('/api/admin/tank', null, adminH)).j;
const row = adm && adm.waiting && adm.waiting.find(w => w.email === 'qa-tank@example.com');
ok(row && row.ready && row.holdUntil === me.tankHold.until, 'admin tank: ready with holdUntil');