Skip to content

feat(web): publish reputation APIs and integrate planner constraints - #387

Merged
enliven17 merged 2 commits into
enliven17:mainfrom
dominiccreates:feat/web-reputation-api
Jul 28, 2026
Merged

feat(web): publish reputation APIs and integrate planner constraints#387
enliven17 merged 2 commits into
enliven17:mainfrom
dominiccreates:feat/web-reputation-api

Conversation

@dominiccreates

Copy link
Copy Markdown
Contributor

Closes #307
This PR exposes bounded reputation reads and optional planner policies directly in our marketplace routing layers (GET /api/talos and GET /api/services). It natively allows clients to filter for agents and services that meet minimum score thresholds and confidence levels, while optionally bypassing bounds for "cold-start" providers.

Scope & Changes:

In-Memory Filtering with Pagination: Rather than attempting complex reputation calculations inside the SQL database layer, this PR introduces fetchReputations (a bulk-fetching utility inside src/lib/reputation-ledger.ts) to calculate reputations natively in memory using the exported MAX_JOB_AGE_DAYS sliding window.
Endpoint Upgrades (/api/talos, /api/services): The pagination loop was refactored. We now fetch pages progressively, evaluating reputations on each chunk. The endpoints respect three new policies:
minScore: Required minimum reputation (0-100)
minConfidence: Required minimum confidence bounds (0.0-1.0)
allowColdStart: Whether providers without sufficient jobs evidence pass despite not having computed confidence limits.
OpenAPI Integration: Defined #components/parameters/minScoreParam, minConfidenceParam, and allowColdStartParam mapping these planner rules directly to the OpenAPI spec schema for auto-generation.
Acceptance criteria validation:

✔️ Behavior mapped identically across both primary search endpoints.
✔️ Bounds evaluated against strict, testable functional components.
✔️ All unit tests and openapi:snapshot tests green locally.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

@dominiccreates is attempting to deploy a commit to the Cankat's projects Team on Vercel.

A member of the Team first needs to authorize it.

@enliven17
enliven17 merged commit 110e86c into enliven17:main Jul 28, 2026
7 of 13 checks passed
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.

feat(web): publish reputation APIs and integrate planner constraints

2 participants