Delete single-send P2P crypto trade asks Laya keeps under the gate (#142) #48
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/jev_antispam_bot!48
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/142-crypto-trade-rule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes agentboard #142.
What
Adds a third structural ad rule,
crypto_trade_ask, next to the #124 and #126 rules. It targets unsolicited P2P crypto buy/sell asks that Laya keeps under the 0.80 gate. The incident was "Всем привет, есть кто продаёт усдт? Напишите, договоримся." (0.7404, sent once, so the repeat boost never applied).The rule matches a shape, not wording. It needs three parts on the existing
promoTextnormalization (lookalikes, case, emoji):It plugs into
promoPattern, so it gets the existing 0.30 floor, thepromo_pattern_detectedlog withpattern: "crypto_trade_ask", the audit and stats path, and the cleanup of earlier repeat copies. Reports, warnings, quoted text, attributed reposts, addressed messages, doubts and replies to another member's crypto/trade question all stay kept. The prompt, the model and the 0.80 gate are unchanged, with no retraining.Replay (prod capture, latest request per message)
The 5 new deletions are 35320, the #124 asks 34977 and 34979, an earlier copy 34781, and an English "Who can exchange my 2.4k$ in bank to crypto, DM me" ask. The side-gig and testimonial match sets are identical to
main, and the crypto match set has been identical across review rounds 4–10.Tests
promo-patterns.test.ts: the incident, the #124 asks and "will buy usdt, any amount" match standalone, as channel comments and forwarded. Held-out paraphrases match, crypto controls never match, requested answers are tested, and adversarial 4096-char inputs stay linear.src/fixtures/crypto-trade-corpus.ts: 815 ads and 846 conversations from eleven independent review rounds and thefe81e3bande7df6abreviews) keeps its exact outcome, with known residuals listed (80 ads left to the model, 53 conversations that still match). Tokens that are also common words (TON, TRX, эфир, Solana) count only in trade context, crypto-themed goods ("BTC майнер", "crypto wallet Ledger") are goods with or without a hyphen, and rule reminders that quote a trade ad ("…здесь запрещены", "…— бан", "not allowed") stay kept.bot.test.ts: single sends at 0.7404 and 0.6407 and an edit into an ask are pattern-deleted, with logs, audit and stats checked. Controls at 0.79 and requested answers stay kept, and an ask under the floor only logs.bun run check: typecheck clean, 661 pass / 0 fail.