Fold the remote area plan into the decisions and delete it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e2631ffe3
commit
bf6ef72b15
2 files changed
+8
-96
No files matched your search
@@ -118,6 +118,14 @@ What was decided for roledesk and the one reason for each. The longer reasoning
|
||||
|
||||
**A role has a list of places, resolved against a gazetteer.** Readers kept one place of several, joined them, or the host posted a copy per place. A reader now returns every place and never multiplies a row. `places` (city, region, country, continent, with `place_includes` for Øresund across two countries) and `place_aliases` are seeded from the dictionaries that were in code; `role_places` links each place of a role, and an unknown text is listed by `unresolved_places` until an alias links it. The Place filter and the gates join over the tree, which halved their time and dropped the `EU` fallback. Copies of one posting per place, same host, company and title and texts at least 30% alike, fold into one role that keeps each copy's place and link; the rule applies to every host, since the 5,024 such roles came mostly from hosts that do not declare copies.
|
||||
|
||||
**A remote role has a remote area: the places a remote hire may live in** (migration 27, `role_remote`, `app/prep/area.py`). On 2026-09-30 the Place field listed "USA (Remote)", "Remote US" and "United States (Remote)" as three towns, and no filter said which of 3,177 remote roles someone in Denmark could take. Those lines came from a few whole-read Greenhouse and Ashby boards (Grafana Labs, Cloudflare, Monzo, Talkdesk), not from an ingest filter. Danish employers barely post remote roles (11 of 1,395 open Danish roles). The remote roles open to Denmark are the roughly 300 scoped to Europe or EMEA and the 210 scoped to anywhere. The area is the first of these that names a place: the model's `remote_where`, the parts of the place texts that say remote ("Germany (Remote)", "Home Based - EMEA"; "Worldwide" or "Global" in such a part is Anywhere), and the role's resolved places lifted to their countries. "Remote" alone names none, so such a role is remote with no stated area. Anywhere is a standalone place with no aliases and nothing under it, so the Place filter and `under` never reach every role through it, and it never counts as a place for a country gate's empty check. Remote lines are no longer suggested as towns.
|
||||
|
||||
**A remote chip matches by overlap, and Anywhere is in every one.** `remote:country:DK` ("Remote · Denmark") finds a remote role whose area is Denmark or in it, a place Denmark lies in (Europe, Øresund), or Anywhere: the roles a person living in Denmark can take. `remote:country:EU` finds every European remote role, "Germany (Remote)" included. The owner wanted Remote · Denmark to hold the Europe-wide and worldwide roles rather than have a separate "Remote · anywhere" chip, so `remote:anywhere` is a valid token that is never suggested. A remote role with no stated area matches no `remote:<place>` chip. On the live data of 2026-09-30, Remote · Denmark found 499 roles, Sweden 531, Germany 760 and Europe 1,395, and 122 remote roles had no stated area.
|
||||
|
||||
**An agent's scope is the first line of the Where block, and plain Remote is every remote role within it.** "Only roles in: Europe / these countries / everywhere" reads and writes the agent's `require` gate on country, which was the implicit scope before, and which a company set to All countries is already read within. The token `remote:any` ("Remote", suggested first for "remote") and the agent's `remote: [remote]` any gate both mean every remote role in that scope: a `require` gate on country reads a remote role that has an area through the area alone, so "Home Based - Worldwide", "Germany (Remote)" and "Remote - Europe" meet Europe, and "Remote US" does not. `any` and `prefer` gates on country keep the place reading. The Where block's Remote line is a choice of no, anywhere within the scope (the plain gate, so the live agent loads and saves unchanged), or only when open to someone in a list of countries and regions (`remote_from`, which matches as the chips do). The remote suggestions are kept to the asking agent's scope, so an agent kept to Europe is not offered Remote · United States. This supersedes the "remote within Europe or anywhere" select of the Where block below.
|
||||
|
||||
**For remote, the model wins, as it does for seniority.** `remote` is `remote_model`, else the host's word, else the place line (prep `VERSION` 3). Black Forest Labs' Freiburg roles are `OnSite` on Ashby while the text offers remote work with an office week a month, and "the board wins" kept them onsite. The prompt says remote when the hire works from home most of the time, even with a regular office week, and hybrid when there are set office days each week. Extract also answers `remote_where`, the names of where a remote hire may live, and a role waits while `remote_where_model` is NULL, so the roles read before are read once more within the agents' existing limits. Migration 27 moved a board role's stored `remote` into `remote_host` where that was empty, since composing `remote` outright would have wiped 1,280 values that an older reader had mapped. "Remote sensing", "remote control" and "remote monitoring" in a title are not remote.
|
||||
|
||||
**A company has aliases.** `company_aliases` maps a folded name (marks stripped, ø to o, legal form dropped) to a company, so "Orsted" and "Ørsted" are one company without changing `company_key`. `merge_companies` moves roles, subscriptions and ratings. Empty enrichment columns (sector, stage, size band, founded, last funding, source and date) wait for the startupmap.one and The Hub readers.
|
||||
|
||||
**A list teaser is kept.** A short description in a listing (Phenom, Oracle, Jobylon, Jobindex, Adzuna) is `roles.teaser`, shown and embedded until the full text arrives, when the vector is dropped and the text replaces it.
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
# Plan: where a remote role may be worked from
|
||||
|
||||
Written 2026-09-30 against main at `4cf8143` (schema v26). Built in two work packages, then folded into `decisions.md` and deleted.
|
||||
|
||||
## What the data says
|
||||
|
||||
Open roles without copies: 20,578. `remote` is `remote` on 3,177, `hybrid` on 3,844, `onsite` on 1,862 and empty on 11,695. `extract` has read 554 of them.
|
||||
|
||||
**The Place field lists remote lines as towns.** Typing "remote" suggests "USA (Remote)" 75, "Germany (Remote)" 61, "Remote US" 60, "United States (Remote)" 56, "Remote (UK)" 38, "US (Remote)" 37 and about 60 more, because `places._towns` takes the first comma part of each place as a town and only drops a leading "Remote -". Each spelling is its own chip, and none of them is a country filter.
|
||||
|
||||
**The countries in that list come from a few boards, not from an ingest filter.** "Spain/Sweden/United States/Germany (Remote)" are Grafana Labs, "Remote India" and "Remote US" Cloudflare and Mozilla, "Remote (UK)" Monzo, "USA (Remote)" Talkdesk, "All France (remote)" Pennylane, the German Länder "(Remote)" 1KOMMA5°. Greenhouse, Ashby and Lever (13,920 open roles) cannot filter and are read whole, so their remote roles of every country come in. The hosts that filter read DK, SE, DE and a remote series, and the remote series returns remote roles of every country too. The list is therefore what the followed companies write, and they are mostly US and UK firms.
|
||||
|
||||
**Where a remote hire may live**, read from the place texts of the 3,177 remote roles:
|
||||
|
||||
| Scope | Roles |
|
||||
|---|---|
|
||||
| outside Europe only (US, CA, IN, ...) | 1,620 |
|
||||
| European countries other than Denmark | 705 |
|
||||
| Europe, EMEA or a list naming Denmark | 297 |
|
||||
| anywhere ("Worldwide", "Global") | 210 |
|
||||
| Europe and elsewhere | 103 |
|
||||
| not stated ("Remote" alone, or a host flag with no place) | 234 |
|
||||
| Denmark only | 8 |
|
||||
|
||||
**Denmark has almost no remote roles of its own.** Of 1,395 open Danish roles 11 are remote and 101 hybrid. The text of 43 says "remote", mostly as hybrid, as `#LI-Remote` or as "remote development environments"; 3 say remote within Denmark (Trackunit twice, "remotely from anywhere in Denmark", and Databricks). The remote roles a person in Copenhagen can take are the roughly 300 scoped to Europe or EMEA and the 210 scoped to anywhere, and no filter names them today.
|
||||
|
||||
**The location line and the text disagree often enough to matter.** Of the 333 remote roles with no country, 139 texts say remote-first or anywhere and 7 say US only. Canonical writes "Home Based - Worldwide" and then "based remotely in the EMEA region" in the text, and Mozilla writes "Remote" and then "must reside in the country location". Black Forest Labs' Freiburg roles are `OnSite` on Ashby while the text offers remote work with an office week a month, and "the board wins" keeps them onsite.
|
||||
|
||||
**One false positive.** A Jobindex role titled "... Remote Sensing ..." reads as remote, because a search role's title is read for the word.
|
||||
|
||||
## Decisions taken for this plan
|
||||
|
||||
1. **A remote role has a remote area: the places a remote hire may live in.** It is a set of gazetteer places, plus one new place, Anywhere, for "worldwide". A role with no area is "remote, area not stated".
|
||||
2. **The area comes from the first of these that gives one:**
|
||||
- the model's `remote_where`, read from the text
|
||||
- the role's place texts marked remote ("Germany (Remote)", "Remote - US", "Home Based - EMEA"; "Worldwide", "Global" and "Anywhere" in a remote text are Anywhere)
|
||||
- the role's resolved places, when the role is remote and no text is marked (Databricks "Denmark" with the host's remote flag is remote in Denmark)
|
||||
- else none
|
||||
|
||||
A text that is only "Remote" marks nothing and gives no area.
|
||||
3. **"Remote · Denmark" means remote roles a person living in Denmark can take.** Its area overlaps Denmark: Denmark or a place in it, a place Denmark lies in (Europe, Øresund), or Anywhere. "Remote · Europe" is every remote role whose area is in Europe or is Europe or Anywhere, so it includes "Germany (Remote)". "Remote · anywhere" is only Anywhere. This is one rule, overlap, and covers both cases the owner named: remote Denmark, and all European remote roles.
|
||||
4. **A role whose area is not stated matches no remote chip in the feed.** In an agent's gate it is empty, which by the gate rule neither passes nor fails, so it ranks, `extract` reads it and the rescore gates it.
|
||||
5. **For remote, the model wins, as it does for seniority.** `remote_model` is new, and `remote` is the model's value, else the host's word, else the place line. The prompt says remote when the hire works from home most of the time, even with a regular office week, and hybrid when there are set office days each week. Black Forest Labs then reads as remote.
|
||||
6. **Extract reads the area once more for the roles it has read.** A role waits while `remote_where_model` is NULL (never asked). `[]` means asked and not stated. The existing per-agent bounds apply, so no new cost bound is needed.
|
||||
7. **An agent's scope is explicit** (owner, 2026-09-30). The `require` gate on `country`, Europe for the owner's agent, is the first line of the Where block: "Only roles in: Europe / these countries / everywhere". A company set to All countries is read within it, as `reach` already does. A remote role is in scope when its area overlaps the scope or is Anywhere, so the scope gate reads a remote role through its area, and "Home Based - Worldwide" stays in Europe's scope.
|
||||
8. **Plain Remote is every remote role within the scope.** The token `remote:any` (label "Remote") and the agent's existing `remote: [remote]` any gate both mean it. "Remote · Denmark" narrows it to the roles open to someone living in Denmark, which includes Europe-wide and Anywhere roles. There is no "Remote · anywhere" suggestion. Anywhere is part of every remote chip, and the badge still says "remote · anywhere".
|
||||
9. **Agents get a gate field `remote_from`, whose values are place tokens.** It matches as the chip does and is the Where block's "only when open to someone in" line. The `remote: [remote]` gate stays the plain "remote within the scope" line, so the live agent loads and saves unchanged.
|
||||
|
||||
## Contract between the packages
|
||||
|
||||
- **Token.** `remote:<place token>`, e.g. `remote:country:DK`, `remote:country:EU`, `remote:region:oresund`, and `remote:anywhere`. `places.parse`, `known`, `label` and `/api/places/labels` read it. The label is "Remote · Denmark", "Remote · Europe" or "Remote · anywhere". `GET /api/roles?place=` and `/facets` accept it beside the other place tokens, ORed with them as now.
|
||||
- **Suggestions.** `/api/suggest/places` also returns `kind: "remote"` suggestions, with `count` the open roles the token would find. They are offered when `q` starts "remote", "anywhere" or "worldwide", or starts the name of a country, region or town that has remote roles, and they come after the countries. Remote lines ("USA (Remote)", "Remote US", "Remote Germany") are no longer suggested as towns.
|
||||
- **Rows.** `Role` and `RoleRow` get `remote_where: str`, the area as a label: "anywhere", "Europe", "Denmark", "United States, Canada". It is '' when the role is not remote or its area is not stated.
|
||||
- **Gates.** `GateField` gains `remote_from`, whose values are tokens as above without the `remote:` prefix (`country:DK`, `country:EU`, `anywhere`). `reach` treats a `remote_from` gate as remote.
|
||||
|
||||
## WP-A, backend (Opus)
|
||||
|
||||
Owns `app/places.py`, `app/models.py`, `app/prep/`, `app/storage/`, `app/jobs/`, `app/web/api.py`, `app/cli.py`, `plugins/` and `tests/` except `tests/js/`.
|
||||
|
||||
- **Migration 27.**
|
||||
- `roles.remote_model TEXT NOT NULL DEFAULT ''` and `roles.remote_where_model TEXT` (JSON list of names, NULL means never asked).
|
||||
- Table `role_remote(uid, place_id)` with an index on `place_id`.
|
||||
- Anywhere is a standalone place (kind `continent`, key `world`), outside the tree, so that `under` and the Place filter never reach every role. Its aliases are the remote-only words. "global" and "international" alias it only inside a text marked remote, so "Global HQ, Berlin" stays Berlin.
|
||||
- **`app/prep`.**
|
||||
- The remote area of each remote role, by decision 2, written to `role_remote`.
|
||||
- `remote` composed as in decision 5.
|
||||
- `VERSION` 3, so every open role is mapped again.
|
||||
- After `set_extracted`, the roles extract wrote get their `remote` and area again before the rescore, by marking them due and running prep on them, or by a shared function.
|
||||
- **`app/places.py`.**
|
||||
- The remote token.
|
||||
- Overlap: the named places, their ancestors and what lies under them, plus Anywhere.
|
||||
- `_towns` skips a part that holds a remote word.
|
||||
- `suggest` takes the remote areas' counts as a second input.
|
||||
- **`app/storage/store.py`.**
|
||||
- `_places_sql` handles the remote token as `uid IN (SELECT uid FROM role_remote WHERE place_id IN ...)` and `remote = 'remote'`.
|
||||
- `_gate_sql` handles `remote_from`. It is empty for `remote = ''`, and for `remote = 'remote'` with no area.
|
||||
- `open_remote_areas()` feeds the suggestions.
|
||||
- `remote_where` on rows.
|
||||
- `set_extracted` writes `remote_model` and `remote_where_model` outright.
|
||||
- **`app/jobs/extract.py`.** It adds the `remote_where` field and the remote wording of decision 5, and makes a role wait while `remote_where_model IS NULL`.
|
||||
- **Title rule.** "remote sensing" (and "remote control", "remote monitoring") in a title is not remote.
|
||||
- **Tests.** Tests for each rule use the examples above: Grafana's "Sweden (Remote)", Canonical's "Home Based - EMEA; Home Based - Worldwide", Databricks' "Denmark" with the host flag, Airtame's "København, Denmark; Remote" (area Denmark), "Remote" alone (not stated), "Global HQ, Berlin", Black Forest Labs' onsite host word with remote text.
|
||||
- **Live measurement.** On a copy of the live database, run prep, then give the counts of `remote:country:DK`, `remote:country:EU`, `remote:anywhere` and the not-stated remote roles.
|
||||
|
||||
## WP-B, pages (Sonnet)
|
||||
|
||||
Owns `app/static/`, `app/templates/`, `app/web/pages.py` and `tests/js/`.
|
||||
|
||||
- **Place chips.** A `remote` suggestion gets the hint "remote · N" and the chip label from the suggestion, and a remote chip reads from the address through `/api/places/labels`.
|
||||
- **Row and reader.** The remote badge reads "remote · Europe", "remote · anywhere" or "remote · Denmark" from `remote_where`, and "remote" alone when it is empty.
|
||||
- **Agents' Where block.** "Remote within Europe / anywhere" becomes "Remote, open to someone in:", a chip input on the same suggestions restricted to countries, regions and Anywhere, written as one `any` gate `remote_from`. An agent whose gates hold the old `remote: [remote]` any gate loads as remote from Anywhere and saves as `remote_from: [anywhere]`. The existing "within Europe" require gate is left as the block reads it now. The card sentence says "or remote from Denmark, Sweden or Germany".
|
||||
- **Browser check.** Use the Chromium recipe on a scratch server, never on port 8790.
|
||||
|
||||
## After the merge
|
||||
|
||||
The planner merges both packages, runs prep on live (or lets the next pull run it) and reports the counts to the owner. Then the planner asks which "remote from" set the owner wants on their agent: Denmark only, Denmark, Sweden and Germany, or Europe. Last, this plan is folded into `decisions.md` and deleted.
|
||||
Reference in new issue
Block a user