Skip to content

0003 Label where a job can be done

  • Status: Accepted
  • Date: 2026-12-03, revised 2026-12-04

Context

The main promise of WFHeaven is that "anywhere" means anywhere. Job boards make this hard:

  • A posting tagged "Anywhere in the World" may say "must reside in Europe" in the description.
  • Some postings name a timezone instead of a country, such as "must overlap with US Eastern hours."
  • Contractor roles are often open in more countries than employee roles at the same company.

The board's own location tag isn't reliable enough on its own. The first version of this ADR proposed an AI model to read every posting.

Since then, ADR 0005 built ranking with rules and kept AI out of the daily run. Rules turned out to be enough for most location wording: on the 74 jobs of the first live run, they found two postings tagged worldwide whose descriptions limit them to the US and to Latin America.

Options considered

Option For Against
AI model reads every posting Understands any wording A paid call per posting per day, harder to test, and a model's label is hard to explain
Rules first, AI later only for unclear jobs Free, testable without internet, every label points to the sentence it's based on. AI stays possible for the few jobs rules can't decide. Rules miss unusual wording and places the place table doesn't know
Source fields only Nothing to build Misses restrictions written in the description, which is the problem this ADR exists to solve

Decision

Label locations with rules. AI is only a possible later fallback for jobs the rules label unclear, outside the daily run.

For every posting, the collector combines the source's location field with the description and stores:

  • location_scope: worldwide, restricted, or unclear
  • allowed_locations: the countries and regions, when the scope is restricted
  • timezone_requirement: the sentence that asks for working hours in some timezone, or empty
  • location_evidence: where the label comes from, with the exact sentence or source field in quotes

Safety principle. When a sentence mentions location but the rules can't read it with confidence, the job is unclear, with that sentence as evidence. This covers negations (we cannot hire in), exceptions (anywhere except), preferences (EU candidates preferred), rules that name no place (countries where we have an entity), and sentences that disagree with each other. The rules never guess that a job passes. A wrong unclear costs the reader a look at the posting. A wrong pass sends them a job they can't take.

The rules:

  1. Every sentence of the description is read, not just the first that matches.
  2. Places that are about customers, teams, offices, skills, languages, or timezones are ignored: our customers in Europe, EU-only data regulations, US time zones, work in English.
  3. A restriction written in the description wins over the source field, because the employer wrote it and it's more specific. It may narrow the source's places but never widen them. A source of Germany and a description of based in Europe is a conflict, so the job is unclear. Restrictions are phrases such as must reside in, based in, eligible to work in, must be a citizen of, remote within, and US only, followed by a known country or region. A list before only keeps every place: Hungary, Japan only.
  4. If a restriction names a place the place table doesn't know, the job is unclear. Source fields follow the same rule, and Remote is never a place. Major cities are known, as their own narrower places.
  5. If two restriction sentences name different places, or a restriction meets a work from anywhere sentence, the job is unclear, with both as evidence.
  6. If the source names countries but the description says work from anywhere, the job is unclear, with both as evidence.
  7. If the source gives no location, a work from anywhere sentence makes the job worldwide. Otherwise it stays unclear.
  8. Only restricted jobs keep places. An unclear job never carries places, so later code can't treat unconfirmed ones as true.
  9. A timezone requirement never decides the scope. Timezone notes are taken out of source fields first, so Anywhere (UTC) is worldwide.

The ranker then checks each job against the profile's can_work_from list. A job passes if it's worldwide, or if its allowed places cover every country in the list, directly or through a region: Europe, EU, or EMEA cover Hungary, and APAC or Asia cover Japan and Taiwan. Sub-regions follow the United Nations geoscheme and cover only their own countries: Southeast Asia doesn't cover Japan. A city never covers its whole country. Greater China means mainland China, Hong Kong, and Taiwan, as job postings use it.

  • Jobs restricted to places that don't cover every country are excluded.
  • A timezone requirement never excludes a job. The email shows it as a "Watch out" line.
  • unclear jobs are never picks. Up to three that would otherwise be picks appear in a "Worth checking" section of the email, with their evidence.

Consequences

  • No AI cost, and the daily run stays free and testable without internet.
  • The location_evidence field lets the reader and the maintainer check every label against the posting.
  • The place table (collector/places.py) is data. A place it doesn't know makes a job unclear or can't count toward can_work_from, until someone adds it.
  • Rules miss restrictions worded in ways they don't know. The tests hold real phrasings. Each wrong label found in an email should become a new test.
  • The safety principle makes some jobs unclear that a person could read. On the 74 jobs of the first live run, one posting was: US-based contributors are preferred, though highly qualified professionals from other locations will be considered. That's the intended trade-off.
  • The collector now keeps restricted and unclear jobs in the daily run, so the ranker sees them. Himalayas is still asked only for worldwide jobs, so its country-limited jobs aren't collected.

Open questions

  • Is an AI fallback for unclear jobs worth its cost once real numbers are known? If so, which model, and where does it run outside the daily loop?
  • Should the reader be able to report a wrong label from the email?