[codex] Add benchmark competition capabilities - #563
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
WalkthroughAdds a ChangesBenchmark Competition Type and Capability Migration
Sequence Diagram(s)sequenceDiagram
participant Client
participant APIRoute as Score/Video Submit API
participant ServerFn as checkSubmissionWindow
participant DB
Client->>APIRoute: POST submission (benchmark competitionType)
APIRoute->>ServerFn: checkSubmissionWindow(competition, ...)
ServerFn->>ServerFn: competitionCan(competitionType, "perpetual")?
Note over ServerFn: perpetual = true → short-circuit
ServerFn-->>APIRoute: { isOpen: true } / { allowed: true }
APIRoute-->>Client: HTTP 200 success (no DB window query)
Client->>APIRoute: POST submission (online competitionType)
APIRoute->>ServerFn: checkSubmissionWindow(competition, ...)
ServerFn->>ServerFn: competitionCan(competitionType, "perpetual")? → false
ServerFn->>DB: query submission window rows
DB-->>ServerFn: window row (or empty)
ServerFn-->>APIRoute: { isOpen: true/false, reason? }
APIRoute-->>Client: HTTP 200 with open/closed status
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Implements the M0a registry slice for the benchmark leaderboard stack.
competitionType: "benchmark"in the existing capability registry.perpetualcapability.videoSubmissions+perpetual, but notsubmissionWindowsoroptInResultPublishing.onlinechecks to thevideoSubmissionscapability.scoringAlgorithm === "online"axis.No HillerFit-branded pages, routes, marketing surfaces, logos, theme treatments, product navigation, PDF extraction, or seed work are included in this slice.
Verification
lat search "benchmark leaderboard HillerFit branded pages training guide pdf capability registry M0a"lat expand "should be explicit in stating we are not building any hillerfit branded pages, we will just build out the benchmark against the training pdf"PATH="/Users/zacjones/.nvm/versions/node/v24.15.0/bin:$PATH" corepack pnpm --dir apps/wodsmith-start test test/lib/competitions/capabilities.test.ts test/routes/api/compete/scores/window-status.test.ts test/server-fns/video-submission-fns.test.ts test/routes/api/compete/submission-gates.test.ts test/server-fns/athlete-score-fns.test.ts test/routes/compete/video-submission-route-gates.test.tsPATH="/Users/zacjones/.nvm/versions/node/v24.15.0/bin:$PATH" corepack pnpm --dir apps/wodsmith-start type-checkPATH="/Users/zacjones/.nvm/versions/node/v24.15.0/bin:$PATH" corepack pnpm --dir apps/wodsmith-start lint(passes with pre-existing warnings)PATH="/Users/zacjones/.nvm/versions/node/v24.15.0/bin:$PATH" lat check(known unrelated crew refs only)git diff --checkpnpm lintandpnpm type-checkKnown existing LAT issue, unrelated to this slice:
lat checkstill fails on pre-existingcrewrefs inlat.md/crew.mdandapps/crew/test/routes/event-import-tabs.test.tsx.Summary by CodeRabbit
New Features
Improvements