Hosts a to l declare READS: places, teaser, stated seniority and employment

Ashby, BambooHR, Deel, Eightfold, Gem, Greenhouse, HiBob, HR Manager, Jibe,
Jobylon and Lever move to feed_url(slug, ask) and page(get, slug, cursor, ask),
declare READS with the robots decision, and drop robots_page. Rows carry
places (Ashby secondaryLocations, Lever allLocations, Greenhouse offices in
place of a Hybrid placeholder), Jobylon keeps its summary as teaser and maps
experience and employment, Eightfold reads creationTs as the posting date and
Ashby reads workplaceType. Fixtures <name>-places.* and jobylon-teaser.html
drive the conformance checks; the eleven names leave UNDECLARED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:11:53 +02:00
1 parent 4c0da58da7
commit f2e652a8da
35 files changed
+1290 -391

No files matched your search

+27 -17
View File
@@ -38,7 +38,15 @@ from typing import Any
from desk.sources import strip_html
from ._shared import Get, Page, Row, is_web_url, only, parse_dt
from ._contract import Ask, Fields, Place, Reads, Row
from ._shared import Get, Page, is_web_url, only, parse_dt
READS = Reads(
scope="board", listing="paged", page_size=10, text="detail", complete="stated",
places="many",
fields=Fields(posted="listed", remote="stated"),
robots="read: robots.txt allows /careers (checked 2026-09-29)",
)
NAME = "eightfold"
LABEL = "Eightfold"
@@ -85,11 +93,7 @@ def careers_url(slug: str) -> str:
return f"https://{parts(slug)[0]}/careers"
def robots_page(slug: str) -> str:
return careers_url(slug)
def page(get: Get, slug: str, cursor: Any) -> Page:
def page(get: Get, slug: str, cursor: Any, ask: Ask) -> Page:
"""One page of `/api/pcsx/search` -> `{"status": 200, "data": {"positions":
[...], "count": n}}`; the next starts at the offset after this page's
positions, and an empty page ends the read."""
@@ -108,25 +112,27 @@ def page(get: Get, slug: str, cursor: Any) -> Page:
start + len(positions) if positions else None)
def _place(locations: Any) -> str:
"""The role's places, "; " apart. Eightfold writes each as "city,region,
country" with no space and repeats the name when a city is its own region
("Mexico City,Mexico City,Mexico"), so the repeats go."""
out: list[str] = []
def _places(locations: Any) -> list[Place]:
"""The role's places. Eightfold writes each as "city,region,country" with
no space and repeats the name when a city is its own region ("Mexico
City,Mexico City,Mexico"), so the repeats go."""
out: list[Place] = []
for loc in locations if isinstance(locations, list) else []:
names: list[str] = []
for name in str(loc).split(","):
name = name.strip()
if name and name not in names:
names.append(name)
if names and ", ".join(names) not in out:
out.append(", ".join(names))
return "; ".join(out)
text = ", ".join(names)
if text and text not in (p["text"] for p in out):
out.append({"text": text, "remote": True if "remote" in text.lower() else None})
return out
def rows(positions: list[dict[str, Any]], slug: str) -> list[Row]:
"""A position has `id` (a number, kept as a string), `displayJobId`,
`name`, `locations`, `postedTs` (epoch seconds), `department`,
`name`, `locations`, `creationTs` (epoch seconds; `postedTs` is
refreshed in bulk), `department`,
`workLocationOption` and `positionUrl`, the path of the role's page on the
tenant's host. The list has no text, and no pay is stated anywhere."""
host = parts(slug)[0]
@@ -138,12 +144,16 @@ def rows(positions: list[dict[str, Any]], slug: str) -> list[Row]:
url = f"https://{host}{path}" if path.startswith("/") and path[1:2] != "/" else ""
if not title or not source_id or not is_web_url(url):
continue
places = _places(p.get("locations") or p.get("standardizedLocations"))
out.append({
"source_id": source_id,
"title": title,
"location": _place(p.get("locations") or p.get("standardizedLocations")),
"places": places,
"location": "; ".join(pl["text"] for pl in places),
"url": url,
"posted": parse_dt(p.get("postedTs")),
# `postedTs` is refreshed in bulk (a whole page says today);
# `creationTs` is the posting date.
"posted": parse_dt(p.get("creationTs") or p.get("postedTs")),
"department": str(p.get("department") or "").strip(),
"description": "",
"remote": _REMOTE.get(str(p.get("workLocationOption") or "").strip().lower()),