Exempt answers to ordinary work and pay questions from the side-gig rule (#128) #46

Merged
backmeupplz merged 4 commits from fix/128-work-question-exemption into main 2026-10-15 18:23:20 +00:00
backmeupplz commented 2026-10-15 18:05:46 +00:00 (Migrated from github.com)

Closes agentboard #128 (follow-up from #126 / PR #44).

Problem. answersRequest recognized a replied-to question as on-topic for side_gig_offer only through GIG || SEEKER. An ordinary question ("Кто работал в Ленте на выкладке?") was off topic, so a member's honest answer with a rate and a DM offer matched and was deleted above the 0.30 floor.

Fix. A replied-to or quoted member request now counts as on topic when it also contains a word about a job or its pay (WORK_TOPIC):

  • подраб…, (под)зараб…, работ…, кто(-нибудь)/где … работает and "работает кто", зарплат, зп, ваканс…, трудоустр…, трудил…, устроился/устраивался/устроиться, ставк…, оклад, смену/смены…;
  • whole forms of плат-/оплат-/доплат-/выплат-, плотят, and "сколько … получают/дают";
  • job/hiring/salary/wage/shift/worked/working, "you/anyone/who … work", and "how much … pay/earn/make", "what … pay/earn" and "the pay".

Something that works, paying for things, or a schedule change stays off topic: "Магазин работает сегодня?", "У кого работает интернет?", "Can I pay by card?", "Does the elevator work?", "Когда смена расписания?". This only adds exemptions; the request still has to be another member's text with a question mark or request phrase. Pay words are listed whole, so "платье" and "платформа" stay off topic.

Tests.

  • corpusRepliedAnswers in src/fixtures/promo-corpus.ts pins both ticket examples: each matches standalone and is none as a reply to its question. Existing corpus lists are unchanged and the pinned-corpus test still passes.
  • Fourteen more work and pay question forms exempt the answer.
  • Off-topic replies still match: "платье", "платформа", shop hours, internet, schedules, elevator, card payment, dinner plans, and the existing weather/bread/how-are-you cases.
  • A work statement that is not a question, or the author's own question, exempts nothing.
  • bun run typecheck clean; bun test 636 pass, 0 fail.

9-day replay. I diffed the promoPattern match set over the 72,511-row production capture between e494d6c (main) and this head: 74 matches on both, no differences. Incidents 619 and 1030 still match.

Accepted leaks (non-blocking, documented). Some close calls still count as work questions: "Где работает банкомат?", "Где оплата за газ?", "How much did you pay for the car?". In the capture, 49 of 20,630 replies to members get the exemption, against 5 at base, and no matched ad replies to a member: all 27 matched ads that carry a preview are comments on channel posts.

Not done (minor suggestions). I left these out on purpose:

  • Past-tense own-job phrases: they would not fix the ticket's examples, because RECRUITS ("подработ…") overrides OWN_JOB. They would also add misses for own-story ads.
  • "не советую/не рекомендую" as warnings: ads use them too ("не советую упускать шанс"). The reply exemption already covers the realistic case.
Closes agentboard #128 (follow-up from #126 / PR #44). **Problem.** `answersRequest` recognized a replied-to question as on-topic for `side_gig_offer` only through `GIG || SEEKER`. An ordinary question ("Кто работал в Ленте на выкладке?") was off topic, so a member's honest answer with a rate and a DM offer matched and was deleted above the 0.30 floor. **Fix.** A replied-to or quoted member request now counts as on topic when it also contains a word about a job or its pay (`WORK_TOPIC`): - подраб…, (под)зараб…, работ…, кто(-нибудь)/где … работает and "работает кто", зарплат, зп, ваканс…, трудоустр…, трудил…, устроился/устраивался/устроиться, ставк…, оклад, смену/смены…; - whole forms of плат-/оплат-/доплат-/выплат-, плотят, and "сколько … получают/дают"; - job/hiring/salary/wage/shift/worked/working, "you/anyone/who … work", and "how much … pay/earn/make", "what … pay/earn" and "the pay". Something that works, paying for things, or a schedule change stays off topic: "Магазин работает сегодня?", "У кого работает интернет?", "Can I pay by card?", "Does the elevator work?", "Когда смена расписания?". This only adds exemptions; the request still has to be another member's text with a question mark or request phrase. Pay words are listed whole, so "платье" and "платформа" stay off topic. **Tests.** - `corpusRepliedAnswers` in `src/fixtures/promo-corpus.ts` pins both ticket examples: each matches standalone and is none as a reply to its question. Existing corpus lists are unchanged and the pinned-corpus test still passes. - Fourteen more work and pay question forms exempt the answer. - Off-topic replies still match: "платье", "платформа", shop hours, internet, schedules, elevator, card payment, dinner plans, and the existing weather/bread/how-are-you cases. - A work statement that is not a question, or the author's own question, exempts nothing. - `bun run typecheck` clean; `bun test` 636 pass, 0 fail. **9-day replay.** I diffed the `promoPattern` match set over the 72,511-row production capture between `e494d6c` (main) and this head: 74 matches on both, no differences. Incidents 619 and 1030 still match. **Accepted leaks (non-blocking, documented).** Some close calls still count as work questions: "Где работает банкомат?", "Где оплата за газ?", "How much did you pay for the car?". In the capture, 49 of 20,630 replies to members get the exemption, against 5 at base, and no matched ad replies to a member: all 27 matched ads that carry a preview are comments on channel posts. **Not done (minor suggestions).** I left these out on purpose: - Past-tense own-job phrases: they would not fix the ticket's examples, because `RECRUITS` ("подработ…") overrides `OWN_JOB`. They would also add misses for own-story ads. - "не советую/не рекомендую" as warnings: ads use them too ("не советую упускать шанс"). The reply exemption already covers the realistic case.
Sign in to join this conversation.
No description provided.