Holding tank: 24-hour sign-up grace plus a Who invited you box, the same rules as InstantAdPay (Marty 2026-11-07: "24-hour grace plus the prompt"). One network tank, so both sites behave the same.

Grace: for 24 hours from an account's created time nobody can adopt the person by hand: an Opens in badge, no Adopt button, a plain refusal from adopt(). Auto-assign keeps its clock from the wallet link, so the 24-hour hold is not stretched. 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: LinkSpin members land on the Control Room, not the /tools Overview, so the box sits at the top of every Control Room screen, /tools included (cr-shell.js). Same checks as InstantAdPay, through setSponsor as a deliberate change with by 'invited', so it follows and clears the hold. With a wallet already linked the engine switches payouts on under the named sponsor right away, as an adoption does, and the confirm box says so first. Nobody invited me hides it everywhere and a small link on /tools brings it back. The named sponsor gets the referral email and an on-site notice (new hooks.notify).

Chatbot canned + systemPrompt, KNOWLEDGE_DATE 2026-11-07. cr-shell.js, common.js, credits-screen.js, my.js, admin.js, admin-sponsorcheck.js ?v=20261107tg. qa/tank-hold.test.mjs and qa/sponsorfollow.test.cjs extended; qa/run.sh member now runs tank-hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-07 07:06:44 -06:00
parent b59b6eb017
commit 01ef4e9260
38 changed files with 416 additions and 58 deletions
+25
View File
@@ -173,6 +173,31 @@ async function network() {
assert.strictEqual(P.chats.length, 1); assert.strictEqual(Q.chats.length, 0, 'no chat on the quiet side');
const qr = await Q.tank.adopt('other@x.co', 'lead'); assert.ok(qr.error, 'cannot be adopted twice across the network');
});
await t('Who invited you: the member names a sponsor on one platform, the other follows and agrees (2026-11-07)', async () => {
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
const r = await P.tank.nameSponsor('lead@x.co', 'adopter'); assert.ok(r.ok, JSON.stringify(r));
assert.strictEqual(P.store.get('lead@x.co').by, 'invited');
const s = await settle(P, Q, ['lead@x.co', 'adopter@x.co']);
assert.strictEqual(s.moves, 1); assert.strictEqual(await spOf(Q, 'lead@x.co'), 'adopter@x.co');
assert.ok(!(await Q.tank.waiting()).some(w => w.email === 'lead@x.co'), 'gone from the other waiting list');
assert.strictEqual(Q.store.get('lead@x.co').by, 'invited'); assert.strictEqual(Q.store.get('lead@x.co').origin, 'instantadpay');
assert.ok((await Q.tank.adopt('other@x.co', 'lead')).error, 'nobody adopts them on the other side');
assert.ok((await Q.tank.nameSponsor('lead@x.co', 'otheradopter')).error, 'the other side refuses a second name');
});
await t('Who invited you: a bound member on the other platform keeps that sponsor; reported, not moved', async () => {
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
Q.bound.add('lead@x.co');
const r = await P.tank.nameSponsor('lead@x.co', 'adopter'); assert.ok(r.ok, JSON.stringify(r));
const { d } = await deliver(P, Q, 'lead@x.co');
assert.strictEqual(d.action, 'bound'); assert.strictEqual(await spOf(Q, 'lead@x.co'), null);
});
await t('sign-up grace holds on both platforms', async () => {
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
for (const X of [P, Q]) X.accounts.add('fresh@x.co', { username: 'fresh', created: Date.now() });
for (const X of [P, Q]) assert.ok(/less than 24 hours/.test((await X.tank.adopt('adopter@x.co', 'fresh')).error || ''), X.name);
assert.strictEqual(await spOf(P, 'fresh@x.co'), null); assert.strictEqual(await spOf(Q, 'fresh@x.co'), null);
});
await t('ping-pong guard: the applied change comes back as "same" and settles in one round trip', async () => {
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
await P.tank.adopt('adopter@x.co', 'lead');