Telephone numbers: a sync plugin learns which numbers are held on the instance without spending the #142 allowance #333
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#333
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-30, reading postulo-dav against the core at
0a5cad587and following every caller ofphone_numbers.taken_elsewhere.#142 bounded how often one account may learn that a telephone number is already recorded somewhere on the instance: each such answer spends one unit of
POSTULO_NUMBER_RATE(20 an hour by default) throughphone_numbers.collision_noticed. The profile and contact forms, the API'sadd_contactand the candidate-file importer ask through it. The plugin surface does not: what it hands a plugin is the bare question.src/postulo/plugins/api.py:78, 271:phone_number_is_takeniscore.phone_numbers.taken_elsewhereitself. It takes a number and anexclude_pk, no person, and spends nothing. The wiki's Writing a plugin lists it as "Writing one back, leaving the primary flag and the uniqueness rules to Postulo".src/postulo_dav/sync.py:158-162(apply_card): asks it for every card it pulls, and leaves a taken number off the contact without a note.src/postulo/resume/candidate.py:840-866(_somebody_elses) spends the allowance and, once it is spent, refuses every further number in the same words, "because telling them apart is the answer".core/importer.py:277asks the same bare question, but only an operator runsmanage.py import_data.phone_number_is_takentakes the person asking, spends their allowance when the answer is yes, and once it is spent answers every number alike, as_somebody_elsesdoes. Or it leaves the surface, andsave_phone_numberreports a refusal itself, which is what postulo/postulo#328 proposes for the row services ("hearing it spends the #142 allowance as a form does").plugins/api.py), with its line in Writing a plugin (tests/test_wiki_surface.py) and a test intests/test_plugin_surface.py. postulo-dav then follows, with a note in the run's report when a number was left off.Related: #142 and #90 (closed), which set the rule and its limit.
Done when
postulo.plugins.apianswers whether a number is held on the instance without naming who asks.Found while filing the extension and DAV plugin improvements of 2026-09-30.
Core side is finished (the allowance,
taken_by_asking, the deprecation, the surface test and the wiki rows). What keeps this open is the plugin's half, which is in the other repo: postulo/postulo-dav#26 now carries the exact request (passasked_by=<account being synced>, and say in the run report which cards had their number left off). The bare form stays, deprecated, until a release carries the Deprecated line; its removal is scheduled for the release after. Close this when postulo-dav#26 lands.Fixed on main in
894bbcf2b: a plugin's question about held telephone numbers is now charged to the account asking (phone_number_is_taken takes the account, and asking without it is deprecated). Its CHANGELOG entry ends in (#333).