Skip to content

feat(global): add lever-search - #67

Open
lucacome wants to merge 1 commit into
ai-job-search-dev:mainfrom
lucacome:feat/lever
Open

lucacome wants to merge 1 commit into
ai-job-search-dev:mainfrom
lucacome:feat/lever

Conversation

@lucacome

@lucacome lucacome commented Nov 26, 2026 •

Copy link
Copy Markdown

What changed and why

Adds lever-search, a read-only portal for company job boards hosted on Lever. It uses Lever's public Postings API (api.lever.co/v0/postings, api.eu.lever.co for EU boards) to list one company's open roles with client-side title, location and age filtering, or to fetch one posting's full text, pay range, department/team and apply URL. This fills the Lever gap alongside the existing Greenhouse and Ashby ATS portals.

Portal

The five checks

  • The contract. search supports --format json|table|plain; detail supports --format json|plain (the optional table format is omitted). Errors are JSON on stderr with exit 1, 429/5xx are retried with Retry-After/exponential backoff, runtime dependencies are zero, and 75 offline tests cover parsing, paging, hidden-text removal, backoff and the CLI contract. SKILL.md has the required Query syntax: line.
  • A safety pass. No install or lifecycle scripts, no trustedDependencies or workspaces, no bunfig.toml or .npmrc. Requests go only to api.lever.co and api.eu.lever.co; jobs.lever.co appears only as an output URL and is never fetched. cli/src reads no environment variables and no files.
  • Honest scoping. No personal-use note is needed: Lever's API documentation says published postings are publicly viewable and may be scraped by third parties. The portal uses public GET endpoints only, with no API key or metering, so it ships enabled: true. The key-gated application POST endpoint is not used.
  • robots.txt and terms respected. api.lever.co and api.eu.lever.co allow / with Crawl-delay: 1; the CLI pauses 1 s between paged requests, sends an honest lever-cli/1.0 User-Agent, and never fetches jobs.lever.co or /apply. SKILL.md and url-reference.md document this.
  • Search only. Reads postings only. It prints applyUrl but never fills in or submits an application.

Ownership

  • /portals/global/lever-search/ @lucacome is in .github/CODEOWNERS, and lever-search is unique across the repo.

Deviations from the contract

None. detail omits the optional table format; all other contract commands and flags are implemented.

Verification

Run in portals/global/lever-search/cli/:

bun install
bun run typecheck
bun test          # 75 pass, 0 fail; network is blocked in tests

Also run from the repo root:

python3 tools/security_guards.py                    # OK
python3 -m unittest discover -s tests               # 30 pass

Live smoke tests against leverdemo:

  • search -b leverdemo -q "customer" --format table|plain|json
  • detail https://jobs.lever.co/leverdemo/ad208490-4052-4f91-a57e-433f2d1e484b --format plain|json

The EU host is covered by offline fixtures; no live EU board was available for this PR.


Summary by cubic

Adds lever-search, a new read-only portal for company job boards hosted on Lever, alongside the existing Greenhouse and Ashby ATS portals. It reads Lever's public Postings API with no API key and zero runtime dependencies, so it ships enabled.

Portal

  • search lists one company's open roles with client-side title, location, age and workplace filters; detail returns a posting's full text, pay range, department and apply URL.
  • --remote matches remote, hybrid and onsite (accepting both onsite and on-site spellings); a posting with no workplace type matches remote only when its location says Remote.
  • Supports both US and EU hosts (api.eu.lever.co); posting URLs like jobs.lever.co/... are parsed, never fetched.

Compliance

  • Sends an honest User-Agent, waits 1 s between paged requests, and backs off on 429 and 5xx, honoring Retry-After (delta-seconds or HTTP-date) with exponential fallback to match the API's robots.txt.
  • Hidden HTML (<script>, <style>, display:none) is stripped from descriptions, and the CLI only reads postings — it never submits an application.
  • Zero runtime dependencies, no install or lifecycle scripts, and 75 offline tests cover parsing, paging, backoff and hidden-text removal.

Written for commit d9f6281. Summary will update on new commits.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 7 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="portals/global/lever-search/url-reference.md">

<violation number="1" location="portals/global/lever-search/url-reference.md:43">
P3: This row omits the accepted values (`remote|hybrid|onsite`) and the fallback for postings with no workplace type, which matches `remote` only when the location says Remote. Add both so the reference matches `matchesWorkplace` and SKILL.md.</violation>
</file>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="portals/global/lever-search/url-reference.md">

<violation number="1" location="portals/global/lever-search/url-reference.md:43">
P3: The new `--remote` cell is hard to parse: "no type matches `remote` only when the location says Remote" reads as if postings with no type never match. Say that postings with a missing or `unspecified` workplace type match `remote` only when their location contains "Remote", and that a known type never falls back.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant