Spaces:
Runtime error
Runtime error
File size: 13,360 Bytes
d9eba60 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CodeReviewEnv โ Interactive RL Benchmark</title>
<meta name="description" content="The first RL benchmark for structured knowledge work. Train AI agents on real code review tasks.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<!-- Hero -->
<header class="hero">
<div class="hero-bg"></div>
<div class="container">
<div class="hero-badge">OpenEnv Compliant</div>
<h1>๐ CodeReviewEnv</h1>
<p class="hero-subtitle">The first RL benchmark for <span class="gradient-text">structured knowledge work</span></p>
<p class="hero-desc">Train and evaluate LLM agents on real code review tasks โ severity triage, queue prioritization, and actionable feedback generation โ with deterministic grading and trajectory export for world model research.</p>
<div class="hero-stats">
<div class="stat">
<div class="stat-value">3</div>
<div class="stat-label">Tasks</div>
</div>
<div class="stat">
<div class="stat-value">50</div>
<div class="stat-label">PR Templates</div>
</div>
<div class="stat">
<div class="stat-value">7</div>
<div class="stat-label">Languages</div>
</div>
<div class="stat">
<div class="stat-value">0.69</div>
<div class="stat-label">GPT-4o-mini</div>
</div>
</div>
</div>
</header>
<!-- Task Cards -->
<section class="section">
<div class="container">
<h2 class="section-title">Three Difficulty Levels</h2>
<div class="task-grid">
<div class="task-card" data-task="easy">
<div class="task-difficulty easy">โญ Easy</div>
<h3>Severity Labeling</h3>
<p>Classify each PR's bug severity: critical, high, medium, low, or none.</p>
<div class="task-meta">
<span>5 steps</span>
<span>GPT-4o-mini: <strong>1.00</strong></span>
</div>
<button class="btn btn-primary" onclick="startDemo('easy')">Try It Live โ</button>
</div>
<div class="task-card" data-task="medium">
<div class="task-difficulty medium">โญโญ Medium</div>
<h3>Queue Prioritization</h3>
<p>Sort the review queue by urgency โ security first, junior devs next.</p>
<div class="task-meta">
<span>3 steps</span>
<span>GPT-4o-mini: <strong>0.68</strong></span>
</div>
<button class="btn btn-secondary" onclick="startDemo('medium')">Try It Live โ</button>
</div>
<div class="task-card" data-task="hard">
<div class="task-difficulty hard">โญโญโญ Hard</div>
<h3>Feedback Generation</h3>
<p>Write actionable review comments targeting specific buggy lines.</p>
<div class="task-meta">
<span>18 steps max</span>
<span>GPT-4o-mini: <strong>0.38</strong></span>
</div>
<button class="btn btn-accent" onclick="startDemo('hard')">Try It Live โ</button>
</div>
</div>
</div>
</section>
<!-- Interactive Demo -->
<section class="section demo-section" id="demo">
<div class="container">
<h2 class="section-title">Interactive Demo</h2>
<div class="demo-container" id="demoContainer" style="display:none;">
<div class="demo-header">
<div class="demo-task-badge" id="demoTaskBadge">Easy</div>
<div class="demo-step" id="demoStep">Step 0 / 5</div>
<div class="demo-score">
Score: <span id="demoScore" class="score-value">0.00</span>
</div>
</div>
<!-- PR Card -->
<div class="pr-card" id="prCard">
<div class="pr-header">
<span class="pr-id" id="prId">PR-001</span>
<span class="pr-author" id="prAuthor">junior</span>
</div>
<h3 class="pr-title" id="prTitle">Loading...</h3>
<p class="pr-desc" id="prDesc"></p>
<div class="diff-container" id="diffContainer">
<div class="diff-header">
<span class="diff-filename" id="diffFilename">file.py</span>
<span class="diff-lang" id="diffLang">python</span>
</div>
<pre class="diff-code" id="diffCode"></pre>
</div>
</div>
<!-- Action Panel (Easy) -->
<div class="action-panel" id="actionPanelEasy" style="display:none;">
<h4>Classify Bug Severity</h4>
<div class="severity-buttons">
<button class="sev-btn critical" onclick="submitAction('critical')">๐ด Critical</button>
<button class="sev-btn high" onclick="submitAction('high')">๐ High</button>
<button class="sev-btn medium" onclick="submitAction('medium')">๐ก Medium</button>
<button class="sev-btn low" onclick="submitAction('low')">๐ต Low</button>
<button class="sev-btn none" onclick="submitAction('none')">โช None</button>
</div>
</div>
<!-- Action Panel (Medium) -->
<div class="action-panel" id="actionPanelMedium" style="display:none;">
<h4>Drag to Reorder by Priority</h4>
<div class="queue-list" id="queueList"></div>
<button class="btn btn-primary" onclick="submitPriorityOrder()">Submit Order โ</button>
</div>
<!-- Action Panel (Hard) -->
<div class="action-panel" id="actionPanelHard" style="display:none;">
<h4>Write Review Feedback</h4>
<div class="comment-form">
<input type="text" id="commentFile" placeholder="Target file" class="input-field">
<input type="number" id="commentLine" placeholder="Line #" class="input-field input-small">
<textarea id="commentText" placeholder="Your review comment..." class="input-field textarea-field"></textarea>
<div class="hard-buttons">
<button class="btn btn-primary" onclick="submitComment()">๐ฌ Add Comment</button>
<button class="btn btn-success" onclick="submitDecision('approve')">โ
Approve</button>
<button class="btn btn-danger" onclick="submitDecision('request_changes')">๐ Request Changes</button>
</div>
</div>
</div>
<!-- Reward Flash -->
<div class="reward-flash" id="rewardFlash" style="display:none;">
<span class="reward-value" id="rewardValue">+1.00</span>
<span class="reward-reason" id="rewardReason"></span>
</div>
<!-- Trajectory -->
<div class="trajectory" id="trajectory">
<h4>Episode Trajectory</h4>
<div class="trajectory-steps" id="trajectorySteps"></div>
</div>
</div>
<div class="demo-placeholder" id="demoPlaceholder">
<div class="placeholder-icon">๐ฎ</div>
<p>Select a task above to start an interactive demo</p>
</div>
</div>
</section>
<!-- Research Section -->
<section class="section research-section">
<div class="container">
<h2 class="section-title">Research: Knowledge-Work World Models</h2>
<div class="research-grid">
<div class="research-card">
<div class="research-icon">๐ง </div>
<h3>Semantic MDP</h3>
<p>States are structured text (code diffs, bug categories). Transitions depend on professional judgment, not physics.</p>
</div>
<div class="research-card">
<div class="research-icon">๐</div>
<h3>Trajectory Export</h3>
<p>Every episode exports (s, a, r, s') transitions in JSONL for training Knowledge-Work World Models.</p>
</div>
<div class="research-card">
<div class="research-icon">๐ฌ</div>
<h3>Deterministic Grading</h3>
<p>No LLM-as-judge. Ordinal matching, Kendall Tau correlation, and 5-component weighted scorers.</p>
</div>
<div class="research-card">
<div class="research-icon">๐ก๏ธ</div>
<h3>Anti-Exploit</h3>
<p>Spam penalties, consistency checks, and decaying rewards prevent trivial gaming strategies.</p>
</div>
</div>
</div>
</section>
<!-- Benchmark Table -->
<section class="section">
<div class="container">
<h2 class="section-title">Benchmark Comparison</h2>
<div class="table-wrapper">
<table class="benchmark-table">
<thead>
<tr>
<th>Benchmark</th>
<th>State Space</th>
<th>Transition</th>
<th>World Model?</th>
<th>Domain</th>
</tr>
</thead>
<tbody>
<tr><td>MuJoCo</td><td>โโฟ (joints)</td><td>Physics sim</td><td>โ
Dreamer</td><td>Robotics</td></tr>
<tr><td>Atari</td><td>Pixels</td><td>Game engine</td><td>โ
MuZero</td><td>Games</td></tr>
<tr><td>TextWorld</td><td>Synthetic text</td><td>Game rules</td><td>โ ๏ธ Li et al.</td><td>Text games</td></tr>
<tr><td>SWE-bench</td><td>Code</td><td>N/A</td><td>โ Eval only</td><td>SE</td></tr>
<tr class="highlight-row"><td><strong>CodeReviewEnv</strong></td><td><strong>Structured text</strong></td><td><strong>Professional judgment</strong></td><td><strong>โ
KW-WM</strong></td><td><strong>Knowledge work</strong></td></tr>
</tbody>
</table>
</div>
</div>
</section>
<!-- API Section -->
<section class="section api-section">
<div class="container">
<h2 class="section-title">API Endpoints</h2>
<div class="api-grid">
<div class="api-card">
<code class="api-method post">POST</code>
<code class="api-path">/reset</code>
<p>Start new episode</p>
</div>
<div class="api-card">
<code class="api-method post">POST</code>
<code class="api-path">/step</code>
<p>Take an action</p>
</div>
<div class="api-card">
<code class="api-method get">GET</code>
<code class="api-path">/state</code>
<p>Current state</p>
</div>
<div class="api-card">
<code class="api-method get">GET</code>
<code class="api-path">/health</code>
<p>Health check</p>
</div>
<div class="api-card">
<code class="api-method get">GET</code>
<code class="api-path">/export_trajectory</code>
<p>JSONL trajectory</p>
</div>
<div class="api-card">
<code class="api-method get">GET</code>
<code class="api-path">/docs</code>
<p>OpenAPI docs</p>
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
<p>CodeReviewEnv โ OpenEnv Hackathon 2026 | BSD-3-Clause</p>
</div>
</footer>
<script src="/static/app.js"></script>
</body>
</html>
|