Skip to content

feat(catalog): add free LeadOcean tools and routing - #1410

Merged
shehjad-dev merged 3 commits into
mainfrom
codex/leadocean-integration
Nov 3, 2026
Merged

shehjad-dev merged 3 commits into
mainfrom
codex/leadocean-integration

Conversation

@shehjad-dev

@shehjad-dev shehjad-dev commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

  • Added 11 LeadOcean tools with BYOK and shared-key support, a credential probe, the supplied logo, and a zero-dollar treg price on every listed endpoint.
  • Added routed adapters for verified work-email finding, phone finding, person and company enrichment, and people and company search. A work address with any status other than verified falls through the waterfall. Personal email has a fixture-verified direct adapter but stays out of routing because the v2 response does not provide a comparable deliverability status. Reverse lookup, counts, and company roster remain direct tools because their result or filter contract does not fit an existing treg.* route.
  • Added a free usage collector and shared-key pace policy. The aggregate capacity reading is informational because search and enrichment have independent windows. The direct /call/ surface continues to relay LeadOcean's body and status unchanged.

Pricing calculation

LeadOcean's public pricing describes account-based access; the API reports record use rather than a per-request USD amount. The treg customer price for each of the 11 tools is $0.00: 0 USD/call × calls = 0 USD, including records returned by search and successful enrichments. BYOK uses the team's own key and remains unmetered by treg. Upstream record use is monitored separately through the free usage route. This pricing deliberately needs no credit-to-USD conversion.

Live upstream evidence

The probes used the configured key without recording it or response PII. GET /v1/account accepted the real key and rejected a bogus key with HTTP 401. Search and enrichment calls returned in roughly 0.25-1.4 seconds in these probes. Immediate usage reads sometimes lagged, so v2 charge observations rely on later isolated account-counter changes; v2 itself does not return a per-call credit field.

Tool Hit Synthetic miss Upstream usage evidence
people.enrich 200 profile/contact shape 404 meta.credits=1 on hit; no counter increase on miss
companies.enrich 200 company shape 404 meta.credits=1 on hit; no counter increase on miss
people.search 200, one row 200, empty meta.credits=1 / 0
companies.search 200, one row 200, empty meta.credits=1 / 0
people.search.count 200 count-only 200 zero count meta.credits=0 on both
companies.count 200 total/facets 200 zero total meta.credits=0 on both
people.email.find.work 200 verified email 404 No per-response meter; later account counter showed one record for a hit and for a known person with data:null; nonexistent profile miss showed no use
people.email.find.personal 200 email array 404 No per-response meter; later counter showed one record for a known person with data:[]; nonexistent profile miss showed no use
people.phone.find 200 phone result 404 No per-response meter; isolated repeat hit increased the account counter by one; a nonexistent profile miss showed no use
people.reverse 200 matched by email and by phone 404 email miss meta.credits=1 on matches; email miss used no record. Phone miss was not separately probed
companies.people 200 one-row roster 404 No per-response meter; isolated roster hit increased search use by one; miss showed no use

No false reports or purchases were submitted.

Routed-call evidence

Live calls went through the local treg server with the shared key, X-Treg-Route-Prefer: leadocean, and X-Treg-Route-Waterfall: 0. Every row below reported charged_micro=0 by treg.

Routed tool Served child Outcome Child-reported usage
treg.people.email.find leadocean.people.email.find.work verified hit; synthetic nonexistent profile miss v2 has no per-call meter; miss returned HTTP 200 from the route with empty email
treg.people.phone.find leadocean.people.phone.find hit v2 has no per-call meter
treg.people.enrich leadocean.people.enrich hit meta.credits=1
treg.companies.enrich leadocean.companies.enrich hit meta.credits=1
treg.people.search leadocean.people.search hit meta.credits=1
treg.companies.search leadocean.companies.search hit meta.credits=1

Checks and review notes

  • Catalog validator: 0 errors; adapter fixture round trips pass.
  • Full suite on refreshed origin/main after sampling change: 7,412 passed, 164 skipped. Catalog, routing, marketplace, collector, and plugin checks: 1,048 passed, one skipped. Frontend: 135 unit tests and 53 end-to-end tests passed.
  • Ruff, import contracts, dashboard build, wheel build/content check, and generated plugin check pass.
  • The new provider made the generated treg skill's provider count stale, so its four mirrors were regenerated. Two dashboard end-to-end tests selected the first row containing Ocean; LeadOcean made that select a different provider. They now select the exact Ocean.io company-enrichment row, preserving the BYOK action and Connections navigation checks. All 53 end-to-end tests and 135 frontend unit tests pass locally. The capacity signature guard explicitly records that an exhaustion error shape has not been observed; we did not force an exhausted account. A separate unrelated lease-timing test failed once under heavy parallel load, passed in isolation, and the four-worker full suite passed.
  • Reviewed the catalog, auth/secrets, capacity, and environment-import architecture fragments. This adds provider declarations and a collector, with no mechanism change requiring fragment edits.

Public code must land before the separate operational configuration PR. Neither PR deploys or merges anything.

Sampled provider routing

TREG_ROUTE_PROVIDER_SAMPLE_PCT is an optional JSON map of provider slug to integer percentage (0-100). If absent, empty, or {}, existing routing is unchanged. The setting gates only shared-key candidates in routed plans; direct calls, a team's own key, and unlisted vendors are unchanged. Each provider receives an independent, stable selection per org, capability, and canonical question, so retries do not redraw. This is an eligibility percentage, not a guarantee of served-call share or a hard direct-call quota. Invalid config fails settings validation.

The companion private PR configures the hosted rollout. Remove that setting to restore the original public-PR routing behavior. The fixture-backed HTTP route test confirms 0% prevents routed selection, direct /call/leadocean.* still works, and 100% serves the LeadOcean child at zero treg charge. The new unit tests cover empty config, stable and independent vendor decisions, own-key priority, and invalid percentages. After the change: 7,412 passed, 164 skipped in the full suite; Ruff, import contracts, catalog validator (0 errors), adapter fixtures, and wheel build passed. Existing live upstream and routed-call evidence above remains the evidence for endpoint behavior; the traffic gate was tested locally and has not been deployed.

@github-actions github-actions Bot added area:dashboard The web dashboard / landing / tutorials area:docs Documentation & design fragments labels Nov 3, 2026
@shehjad-dev
shehjad-dev force-pushed the codex/leadocean-integration branch from 0744b0b to a08de25 Compare November 3, 2026 15:25
@shehjad-dev
shehjad-dev merged commit 9d2d45a into main Nov 3, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dashboard The web dashboard / landing / tutorials area:docs Documentation & design fragments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant