Add provider sla#103
Conversation
|
@OG-wura is attempting to deploy a commit to the emrekayat's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@OG-wura Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Thanks for the PR. I rechecked the merge ref from the maintainer account. The functional checks pass: git diff --check main...pr-103-merge
npm run test --workspace @query402/shared
npm run test --workspace @query402/api -- src/lib/pricing.test.ts src/providers/registry.test.ts src/routes/public.test.ts
npm run test --workspace @query402/agent-client -- src/validate-real.test.ts
npm run typecheck --workspace @query402/api
npm run typecheck --workspace @query402/web
npm run typecheck --workspace @query402/agent-clientResults: shared tests pass (20), API tests pass (38), validate-real tests pass (7), and all typechecks pass. I cannot merge this exact PR yet because the diff is too broad/noisy for #72:
Please remove the lockfile churn and keep the branch focused on provider SLA/catalog/shared/web changes. Once narrowed, the green checks above look promising. |
- Revert package-lock.json to main (no dependency changes, only metadata churn) - Revert apps/agent-client/src/validate-real.ts to main (unrelated to SLA badges) - Remove apps/agent-client/src/validate-real.test.ts (added by this PR, unrelated)
Resolved conflicts in public.ts (merged import of getSortedProviders with DemoScenarioManifest) and public.test.ts (kept all PR-added tests).
|
done |
|
I rechecked from the maintainer account, but Output: The test fixtures in |
Resolved conflict in apps/api/src/routes/public.test.ts: - Kept SLA badge tests and demo scenario manifest from PR branch - Kept paid query fixture tests from main - Fixed missing closing braces in demo scenario manifest describe block
…port - Added slaBadges to 3 test fixture objects in pricing.test.ts to satisfy updated ProviderDefinition type - Added buildTestUsageEvent import in public.test.ts that was missing after merge
The PR branch replaced the x402 price consistency describe block with SLA badge tests. Both should be present.
…ch upstream/main exactly
Resolved conflict in pricing.test.ts: kept both describe blocks (provider SLA badges shape + x402 cross-layer price consistency)
Resolves missing package entries in package-lock.json that caused npm ci to fail. Lockfile now matches package.json.
Close #72
R description:
Summary
Adds lightweight SLA badge fields to provider catalog responses so
reviewers can assess provider safety and reliability at a glance
before paying for a query.
Changes
packages/shared/types.ts— NewLatencyBand,ReliabilityBand,PaymentModetypes;
SlaBadgesinterface with band enums + UI-safe label strings.Added
slaBadges: SlaBadgestoProviderDefinition.schemas.ts— NewlatencyBandSchema,reliabilityBandSchema,paymentModeSchema,slaBadgesSchema. ExtendedproviderSchemato require
slaBadges.apps/api/src/lib/pricing.ts—deriveSlaBadges()helper maps existingmetadata (
latencyEstimateMs→ fast/standard/slow,sourceType→live/fallback/demo). All 7 providers now include
slaBadges.apps/web/pages/ControlDeckPage.tsx— Provider cards render 3 badgesbelow metrics. Missing badges show "Not verified" fallback.
styles.css— Badge styles with color coding per band.Tests
/api/catalogand
/api/providers