Capturing the same advert twice makes two captures and two listings, silently #178
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#178
Loading…
Add table
Add a link
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?
Observation
Nothing anywhere checks whether a posting has been captured before. Capture the same advert
on Monday and again on Thursday — or press the button twice — and you get two captures, and
after reviewing both, two listings for one job.
What exists
The extension has half of it, locally:
That is exact string equality, in one browser, and only for captures not yet sent. Once a
capture reaches Postulo the extension forgets it, so the second capture of the same advert is
the ordinary case rather than the awkward one.
The server has none of it.
Capture.Metacarries:and no constraint.
JobPosting.urlhas none either — the only unique constraints injobs/models.pyare on industry slugs, company names, company identifiers and departmentnames. Two listings for one advert is a state the schema permits and nothing reports.
Not a unique constraint
A constraint would refuse the second capture, and refusing is the wrong behaviour:
than an answer to a question somebody would have asked first.
It should tell, not refuse. "You captured this on 3 September; it is in your listings as
Research Engineer" — with a link — and let the person decide.
What matching on
urlnormalised, not compared raw._same_url()inplugins/builtin/__init__.pyalreadystrips the scheme, a leading
www.and a trailing slash and lowercases the rest; it waswritten for #176 and is the right shape to reuse rather than write a second one.
Worth deciding, and not obvious: a board that mints a fresh address per visit — tracking
parameters, a session id in the path — defeats URL matching entirely, and LinkedIn's own
og:urlfor a job differs from the address you were on. A second match on(company, title)catches those and will also produce false positives for a company runningtwo genuinely different openings with the same title. Probably: match on URL, and warn on
(company, title)more softly.Roughly, the work
capture is made, so the person is told rather than shown a duplicate afterwards.
sending. It must degrade quietly: offline, or an older Postulo, means no answer and the
capture proceeds exactly as today.
store.unsentForstays for what it is good at — the capture you made a minute ago and havenot sent — and stops being the only check there is.
This gets more valuable, not less, once a results page can produce forty captures at once:
the second visit to a board's search page is where duplicates arrive in bulk.
Landed on three sides, told and never refused:
27d514c89—jobs/known.pyanswers the question: a listing at this addresshowever it was spelled, a capture of it still waiting for review, and, more softly, a
listing with this title at this company at another address.
same_urlmoved from thebuiltin plugin to
core/addresses.pyso both can use it; the address is narrowed in SQL byits path and decided in Python. The web form says this address is already in your
listings, since … with a link before anything is fetched, and the same submit again is the
answer; the review screen says it too, with the softer match; and
POST /api/v1/captures/knownanswers for up to a hundred postings at once.259dcd0— once the form is up the popup asks and says Capturedbefore: in your listings since … as …, or the waiting-capture or same-title variant, with
a link into Postulo; on a results page the postings already held carry a captured before
tag. It degrades to silence — not set up, the testing switch, no permission, unreachable,
an older Postulo — and never prompts for permission.
store.unsentForstays for what it isgood at.
As the issue asked: no constraint, no refusal; a second capture is the person's to want.