feat(outcome): #543 outcome-learning calibration (measurement-only) - #740
Conversation
Closes the outcome-learning loop by measuring whether gittensory's
deterministic signals actually predict reality — without ever auto-
adjusting a live score (like time-decay, recalibration stays an
owner-reviewed decision).
Two questions a maintainer can act on, over data that already exists:
• Is the slop score predictive? For resolved PRs carrying a persisted
slop band (#726), do higher-slop bands merge less often?
(`discriminates`: merge rate non-increasing as band severity rises,
given >=5 samples/band; null when too little resolved data.)
• Are recommendations panning out? Positive (accepted/merged/improved)
vs negative (rejected/closed) split from the agent
recommendation-outcome ledger, scoped to the repo.
- src/services/outcome-calibration.ts: pure builders
(buildSlopOutcomeCalibration / buildRecommendationOutcomeCalibration /
buildOutcomeCalibrationSignals) + buildRepoOutcomeCalibration env loader.
- GET /v1/repos/:owner/:repo/outcome-calibration (maintainer-gated,
read-only; optional ?windowDays bounds the recommendation window).
No public surface, no score mutation, no reward/payout fields.
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 4 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
What
Closes the outcome-learning loop (#543): measure whether gittensory's deterministic signals actually predict reality. Measurement only — it never auto-adjusts a live score (like time-decay, recalibration stays an owner-reviewed decision, so it can't silently move rankings).
Two questions a maintainer can act on, over data that already exists (no new collection):
discriminatesistrueiff merge rate is non-increasing as band severity rises (given ≥5 samples/band),falseif it inverts,nullif there isn't enough resolved data to judge.agent_recommendation_outcomesledger, scoped to the repo.How
src/services/outcome-calibration.ts— pure builders (buildSlopOutcomeCalibration,buildRecommendationOutcomeCalibration,buildOutcomeCalibrationSignals) + thebuildRepoOutcomeCalibrationenv loader. Recommendation scoping (by outcome repo, falling back to target repo, case-insensitive) lives in the pure function so it's fully unit-testable without the DB.GET /v1/repos/:owner/:repo/outcome-calibration— maintainer-gated (requireRepoMaintainer), read-only; optional?windowDaysbounds the recommendation window. Path added to the session allowlist (isRepoOutcomeCalibrationPath).Privacy / safety
Verification
typecheck✅ ·test:coverage✅ (branches 97.02%, all metrics ≥97) ·ui:openapi:check✅ ·git diff --check✅ ·test:workers✅test/unit/outcome-calibration.test.ts(11 cases: discriminates true/false/null, open/unassessed exclusion, recommendation split, repo scoping incl. target-repo fallback + case-insensitivity, env loader) + integration coverage (401 unauthenticated, 200 windowed/unwindowed shape).