Rules: offer patterns match the everyday word for a vacancy, so acknowledgements and rejections become offers #16
Labels
No labels
bug
documentation
enhancement
performance
security
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-imap#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found on 2026-09-29 in a read-only review of postulo-imap at
cc09c6381, runningclassifyon ordinary acknowledgement, rejection and invitation sentences in each language.offer is the first kind tried in every rule file, and several of its patterns are not specific to an offer of employment. Some are the ordinary words for a job advert, which most automatic mail from job boards and recruiting systems contains; others match any sentence that is "pleased to offer" something, an interview included. Because offer outranks every other kind, the message's real kind is never reached, and the suggestion says would move it to Offer for an acknowledgement or a rejection.
Where:
src/postulo_imap/rules/es.json:15:oferta (de trabajo|de empleo|laboral).src/postulo_imap/rules/it.json:15:offerta di (lavoro|impiego|assunzione).src/postulo_imap/rules/pl.json:15-16:oferta (pracy|zatrudnienia),propozycja (zatrudnienia|wsp[óo][łl]pracy).src/postulo_imap/rules/pt.json:13-16:temos o prazer de lhe (oferecer|propor),proposta de (trabalho|emprego|contrata[çc][ãa]o),oferta de emprego.src/postulo_imap/rules/en.json:18:job offer.src/postulo_imap/rules/fr.json:13:nous avons le plaisir de vous proposer.src/postulo_imap/rules/de.json:13:freuen uns.{0,40}anbieten zu k[öo]nnen.tests/test_imap.py:260-317,test_the_rules_recognise_each_kind_in_each_language: one sentence that must match per kind and language, and none that must not be an offer.What happens: run on the snapshot, each line is
classify(text.lower()):offer(es), matchedoferta de empleo.offer(es).offer(it).offer(it).offer(pl).offer(pt).offer(pt).offer(en).offer(fr).offer(pt).offer(de).offer(pl).French, German and Dutch acknowledgements that name the vacancy (
offre d'emploi,Stellenangebot,vacature) are read correctly, because those files do not list the bare word:fr.json:15asks foroffre d'emploi ferme.Why it matters: the suggestion carries
suggested_status="offer"and the event kindoffer(src/postulo_imap/classifying.py:40-46), so accepting it moves the application to Offer. A person applying in Spain, Italy, Poland or Portugal will meet this on most automatic replies; they either decline, and lose the acknowledgement or the rejection the message really was, or accept a wrong status. An interview invitation read as an offer also loses its proposed dates, which are only collected for theinterviewkind (src/postulo_imap/classifying.py:126).Fix:
fr.jsondoes.le poste,die Stelle,a posição,el puesto) instead of accepting any object.propozycja współpracy, or move it to a kind that suggests no status.Done when
tests/test_imap.pyhas a parametrised test of sentences that must not be an offer, per language: an acknowledgement that names the vacancy, a rejection that names the vacancy, and an interview invitation worded as "pleased to offer". Each must come back asacknowledged,rejectedandinterview. With the sentences above it fails today in es, it, pl, pt, en, fr and de.Fixed by pull request #25.