Trust v2 UI + adversarial LLM-judge primitives - #32
Merged
Conversation
- trust.functions.ts: read v2 columns (score/confidence/verified/dims) from package_trust_scores additively, expose as trust_v2 - marketplace.trust.$slug.tsx: TrustVector component with safety/competence/ freshness/coverage bars, confidence meter, Unverified badge + score gating, and an updated 'how it's computed' explainer referencing scoring.ts
- src/lib/adversarial/judge.ts: pluggable JudgeFn, strict/lenient ensemble grader (judge can raise the safety bar without lowering it), Cohen's kappa and judge-vs-human calibration report. Pure + mock-tested. - tests/adversarial-judge.test.mjs: 10 cases (kappa edge cases, ensemble modes, false-pass/false-fail separation, batch) - docs: mark Trust v2 UI + judge primitives as shipped
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the merged #31. Two independent pieces (separate commits).
1. Trust Score v2 — UI (
src/routes/marketplace.trust.$slug.tsx,trust.functions.ts)Surfaces the v2 scoring vector that #31 added to the data layer:
getSkillTrustnow additively reads the v2 columns frompackage_trust_scores(score / confidence / verified / dimensions) — no change to the existingget_skill_trustRPC.scoring.ts.2. Adversarial LLM-judge primitives (
src/lib/adversarial/judge.ts)The semantic-grading layer from the analysis doc (#6), built test-first:
JudgeFnso any model wires in behind one signature (pure + mockable — no live LLM needed for tests).judgeCalibration) to prove the judge agrees with golden human labels, separating dangerous false-passes from annoying false-fails.Tests
tests/adversarial-judge.test.mjs(10) — all green locally, added totest:ts. (The Trust v2 core + holdout from #31 already have their suites.)Remaining follow-ups (documented, not in scope here)
Wiring a live model behind
JudgeFnin the server pipeline; community red-team pipeline + holdout-gated SkillForge promotion; production A/B; published signed methodology spec.Note
Could not run typecheck/build in this container (
node_modulesnot installed); unit tests run undernode --experimental-strip-typesand pass.https://claude.ai/code/session_01BnYrQNoKNNxPCSmV2suWna
Generated by Claude Code