feat: add cs-dust2 React case with two model takes + react kind support

New case cs-dust2 (kind:react): a from-scratch React + three.js 5v5 Dust2 FPS.
Two takes registered: Claude Fable 5 / Claude Code / High (with a hand fix for a
64Hz fixed-step firing bug on high-refresh displays) and Claude Opus 4.8 /
Claude Code / Max (dust2-arena, one-shot). React cases commit source only; the
single file is built from source at deploy time. validate-data.ts now accepts a
React project directory as the declared artifact. AGENTS.md rewritten
English-only with React-case, bare-harness (no skills/plugins) and
artifact-anonymity rules.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jesse ZhangandClaude Opus 4.8 committed 2026-07-14 00:08:28 +01:00
1 parent c4cc293748
commit cbfce3b7cc
62 files changed
+13583 -43

No files matched your search

+22
View File
@@ -28,6 +28,10 @@ const isBilingual = (v: unknown): boolean => {
const modelIds = new Set<string>()
const artifactDirs = new Map<string, string>()
const declaredArtifacts = new Set<string>()
// React cases declare a whole project directory (built to a single file at
// deploy time), not one artifact file — track those so the loose-file scan
// below skips their subtree.
const declaredDirs = new Set<string>()
for (const f of readdirSync(modelsDir).filter((f) => f.endsWith('.json'))) {
const id = f.replace(/\.json$/, '')
modelIds.add(id)
@@ -92,6 +96,23 @@ for (const f of readdirSync(modelsDir).filter((f) => f.endsWith('.json'))) {
if (run?.contributor !== undefined && (typeof run.contributor !== 'string' || !run.contributor.trim())) {
errors.push(`models/${f}: ${where}.contributor must be a non-empty GitHub username`)
}
if (caseKind.get(caseId) === 'react') {
// React case: the artifact is a full project directory, not a file.
const dirName = (typeof run?.file === 'string' && run.file) || caseId
if (seenFiles.has(dirName)) {
errors.push(`models/${f}: ${where} resolves to the same project dir "${dirName}" as another variant`)
}
seenFiles.add(dirName)
const relDir = `${artifactDir}/${dirName}`
declaredDirs.add(relDir)
const dirPath = join(outputsDir, artifactDir, dirName)
if (!existsSync(dirPath) || !statSync(dirPath).isDirectory()) {
errors.push(`models/${f}: ${where} declares a React project but directory missing: outputs/${relDir}/`)
} else if (!existsSync(join(dirPath, 'package.json'))) {
errors.push(`models/${f}: ${where}: outputs/${relDir}/ must contain a package.json (a full project)`)
}
return
}
const file = (typeof run?.file === 'string' && run.file) || `${caseId}.${caseKind.get(caseId)}`
if (seenFiles.has(file)) {
errors.push(`models/${f}: ${where} resolves to the same artifact "${file}" as another variant — extra variants must set a distinct "file"`)
@@ -118,6 +139,7 @@ function walkOutputs(dir: string, prefix = '') {
if (entry.name.startsWith('.')) continue
const rel = prefix ? `${prefix}/${entry.name}` : entry.name
if (entry.isDirectory()) {
if (declaredDirs.has(rel)) continue // React project dir — declared wholesale
walkOutputs(join(dir, entry.name), rel)
} else if (!declaredArtifacts.has(rel)) {
errors.push(`outputs/${rel} is not declared by any run in models/*.json`)