feat(wod): read and judge the parts a score targets #567
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.39) × (1 − Review Confidence (0.31)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 264 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 53% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.334
Real PR Conversation Timeline
1 comments
"Review active on #567"
general
weight: 0.35
github-actions[bot]
Summary
First of three slices of the WOD scores (split validated by the owner: SC-API-264 here, then SC-API-292 #565 for the contract and
POST /activities, then SC-API-293 #566 for one WOD on a single activity). No route changes here.wod.Repository.Targets: the parts a score targets, with the challenge and day of their WOD, in one query, in the caller's transaction,FOR SHARE OF w, pin WOD order (a WOD deletion waits for it, or its parts are gone; a part changed meanwhile is read as it is now). Parts of a deleted challenge or one no longer CrossFit are left out.activity.ScoresRefusal(pure): scores only on acrossfitactivity (422scores_not_allowed); a part not found or of a challenge where the activity does not count (active participant, window) answers alike (422wod_part_unavailable, nothing revealed); the WOD day in the same week of that challenge as the activity's start (422wod_other_week), weeks viascoring.Window.apperrcodes (422); they enter the contract with the route (SC-API-292).Checks
make fmt && make lint && make test✅ ·make test-integration✅TestScoresRefusal: 25 cases (two challenges with different week cuts, March and November DST, exact window bounds, left challenge, unknown part, missing time zone).TestTargets(filters) andTestTargetsHoldWOD(a deletion waits for a score transaction, then answerswod_scored; fails withoutFOR SHARE, checked by mutation).To confirm
wod_part_unavailable(not 404) for an unknown part: it is a reference in the body, not the resource of the URL, and answers like a part of a challenge where the activity does not count.Size
239 lines (tests ~140), above the 200-line limit.
Closes #510
🤖 Generated with Claude Code