From f8cda32119e5019cdafa879bcbc06c7d853ac389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Sp=C3=A4th?= Date: Fri, 24 Jul 2026 12:19:35 +0200 Subject: [PATCH] Remove File --- .claude/workflows/steamwar-issue-audit.js | 191 ---------------------- 1 file changed, 191 deletions(-) delete mode 100644 .claude/workflows/steamwar-issue-audit.js diff --git a/.claude/workflows/steamwar-issue-audit.js b/.claude/workflows/steamwar-issue-audit.js deleted file mode 100644 index 912e3ebc..00000000 --- a/.claude/workflows/steamwar-issue-audit.js +++ /dev/null @@ -1,191 +0,0 @@ -export const meta = { - name: 'steamwar-issue-audit', - description: 'Audit all 77 open SteamWar Gitea issues against current origin/main: already implemented?', - whenToUse: 'Re-run to re-audit open issues against the codebase', - phases: [ - { title: 'Investigate', detail: 'one agent per issue: classify + check implementation status' }, - { title: 'Verify', detail: 'adversarial refuters for implemented-claims, classification checks' }, - ], -} - -const SCRATCH = '/private/tmp/claude-501/-Users-chaos-Projects-IdeaProjects-SteamWar/1cb6f902-3cd9-4eaf-b207-85416dd40cd0/scratchpad' -const WT = SCRATCH + '/sw-main' - -const NUMBERS = [450, 449, 448, 447, 443, 442, 441, 440, 439, 438, 428, 419, 409, 407, 388, 380, 336, 334, 328, 323, 317, 313, 310, 307, 304, 302, 301, 299, 298, 294, 291, 290, 289, 287, 285, 284, 279, 276, 261, 253, 250, 247, 246, 240, 227, 223, 213, 208, 202, 200, 195, 192, 168, 161, 158, 150, 143, 141, 140, 138, 137, 132, 131, 129, 125, 123, 122, 110, 109, 107, 83, 77, 70, 60, 48, 32, 29] - -const STATUS = ['implemented', 'partially_implemented', 'not_implemented', 'not_in_this_repo', 'cannot_determine'] -const CATEGORY = ['code', 'config', 'website', 'infrastructure', 'unclear'] - -const RESULT_SCHEMA = { - type: 'object', - additionalProperties: false, - properties: { - title_en: { type: 'string', description: 'concise English translation of the issue title' }, - summary: { type: 'string', description: '1-2 English sentences: what is reported/requested' }, - category: { enum: CATEGORY }, - module: { type: 'string', description: 'main affected module, or external repo/system name' }, - status: { enum: STATUS }, - confidence: { enum: ['high', 'medium', 'low'] }, - evidence: { type: 'string', description: 'commits as `hash date subject`, code as path:line, brief explanations' }, - }, - required: ['title_en', 'summary', 'category', 'module', 'status', 'confidence', 'evidence'], -} - -const VERDICT_SCHEMA = { - type: 'object', - additionalProperties: false, - properties: { - verdict: { enum: ['confirmed', 'refuted', 'uncertain'] }, - corrected_status: { enum: STATUS }, - corrected_category: { enum: CATEGORY }, - reasoning: { type: 'string', description: '<= 80 words' }, - }, - required: ['verdict', 'reasoning'], -} - -const MODULE_MAP = `Modules in this mono-repo: BauSystem (build server: /trace, /simulator, NoClip, /laufbau, Laufsklave, SmartPlace, Pistorder, Panzern, Printer, /tick, Detonator, Rayvisualizer, hotkeys, Kanonentester, testblock, scripts), LegacyBauSystem, FightSystem (arena fights: WarShip/WarGear/MiniWarGear, AutoChecker ("Autoprüfer"/check), replay RECORDING, Techhider, Hullhider, test arena), MissileWars, TNTLeague, TowerRun, LobbySystem, SchematicSystem (schematic checks + SchematicType handling), SpigotCore (core plugin: replay PLAYBACK (RPlayer/REntity), skins, SW-WorldEdit integration), CommonCore (shared: database/SQL, GameMode + SchematicType config parsing), KotlinCore, VelocityCore (proxy: chat, /replay, /check, /dev, server orchestration incl. Bau-/arena-/"Ausfahr"-server starting, whois), Teamserver, Realtime, WebsiteBackend, CLI, CommandFramework, AccessWidener. -NOT in this repo (separate repos/systems on git.steamwar.de): the Website FRONTEND (repo "Website"), the "Paper"/"FastAsyncWorldEdit"/"Velocity" forks, deployed gamemode/arena/check-question configuration YAMLs, TexturePack, server hosting infrastructure ("Buildercloud").` - -const GROUND_RULES = `The worktree is READ-ONLY for you: NEVER modify, create, or delete any file there or anywhere else; use Read/Grep/Glob and git commands like log/show/diff/grep only. Today is 2026-07-14; worktree HEAD is 62e855ec (2026-07-05, current origin/main); full git history is available via git -C "${WT}" ...` - -function investigatePrompt(n) { - return `You are one auditor in a fleet checking open issues of the SteamWar Minecraft server project (git.steamwar.de/SteamWar/SteamWar) against the current codebase, to determine whether each issue is already implemented/fixed. - -YOUR ISSUE: #${n}. First read its JSON: ${SCRATCH}/issues/issue_${n}.json (fields: number, title, body, labels, created_at, user, comment_bodies). Text is mostly German. - -CODEBASE: git worktree of current origin/main at: ${WT} -${GROUND_RULES} -${MODULE_MAP} - -TASK: -1. Understand the issue (labels: System/* hints the module, Typ/Bug = bug, Typ/Idee = feature request, Version/* = MC version). Read comment_bodies — they often contain triage info (root cause in config, website problem, duplicate, or already-fixed notes). -2. Classify category: - - "code": concerns code living in this mono-repo. - - "config": root cause is (likely) configuration data (arena/gamemode YAMLs, check questions "Prüffragen", kits, server configs) rather than repo code. Grep the repo first to confirm the relevant config is NOT versioned here. - - "website": concerns the SteamWar website / web dashboard frontend. (WebsiteBackend IS in this repo — if backend code changes would fix it, prefer "code" with module WebsiteBackend.) - - "infrastructure": hosting/orchestration/build-tooling problems (e.g. Buildercloud versions, host resources) not fixable by code here. - - "unclear". -3. Determine implementation status in the CURRENT code (worktree HEAD): - - Grep the relevant module(s) for the feature/behavior described. - - Check git history since the issue: git -C "${WT}" log --oneline --since="" -- , plus keyword searches: git -C "${WT}" log --all --oneline -i --grep="" (try German AND English keywords, and "#${n}"). - - READ the relevant code and judge: is the described bug fixed / does the requested feature exist now? - - status: "implemented" (fixed / feature exists), "partially_implemented", "not_implemented" (bug plausibly still present / feature absent), "not_in_this_repo" (pure config/website-frontend/infrastructure issue not judgeable from this repo), "cannot_determine" (in-repo but evidence inconclusive, e.g. runtime/timing bug not decidable from source). -Be strict and evidence-based: report "implemented" ONLY with concrete evidence — a commit after the issue creation that addresses exactly the described behavior, or code clearly implementing the request. "The code looks correct" is NOT evidence that a reported bug is fixed; without a fixing change, lean to "not_implemented" or "cannot_determine". -4. evidence: cite commits as \`hash date subject\` and code as path:line (repo-relative), each with a very short explanation; <= 120 words total. - -Return via StructuredOutput. title_en = concise English title translation; summary = 1-2 English sentences; module = main affected module or external repo/system.` -} - -function evidenceVerifyPrompt(n, res) { - return `ADVERSARIAL VERIFICATION (evidence-audit lens). An auditor claims open issue #${n} of SteamWar ("${res.title_en}") has status "${res.status}" — i.e. already ${res.status === 'implemented' ? 'fully' : 'partially'} implemented/fixed in current code. - -Read the issue JSON first: ${SCRATCH}/issues/issue_${n}.json -Codebase worktree: ${WT} -${GROUND_RULES} - -Auditor's claim — category: ${res.category}, module: ${res.module}, confidence: ${res.confidence}. Evidence: -${res.evidence} - -Try to REFUTE the claim. Check every cited commit/file: does it exist, and does it genuinely address the SPECIFIC behavior in the issue (not merely the same code area)? Compare commit dates to the issue's created_at — a change that predates the issue is normally not the fix, since the issue was filed against code already containing it (unless the auditor shows the described behavior cannot occur in current code at all). Check whether the change covers the described case fully or only partially. If the evidence is about a related-but-different feature, refute. -Default to "refuted" or "uncertain" when the evidence does not clearly hold up. If refuting, set corrected_status to what it should be. reasoning <= 80 words.` -} - -function behaviorVerifyPrompt(n, res) { - return `ADVERSARIAL VERIFICATION (behavior re-check lens). An auditor claims open issue #${n} of SteamWar ("${res.title_en}") has status "${res.status}" — i.e. already ${res.status === 'implemented' ? 'fully' : 'partially'} implemented/fixed in current code. - -Read the issue JSON first: ${SCRATCH}/issues/issue_${n}.json -Codebase worktree: ${WT} -${GROUND_RULES} -${MODULE_MAP} - -Do NOT trust the auditor's citations — independently re-derive from the CURRENT code whether the described behavior is fixed / the requested feature exists. Trace the actual code path the issue describes; hunt for counter-evidence: the buggy path still present, TODO/FIXME, partial coverage, feature behind a flag, fix only in a different module than the one the issue is about. (Auditor said module: ${res.module}; their evidence, ONLY for reference at the end: ${res.evidence}) -Default to "refuted" or "uncertain" if you cannot positively confirm from code. If refuting, set corrected_status. reasoning <= 80 words.` -} - -function categoryVerifyPrompt(n, res) { - return `CLASSIFICATION CHECK. An auditor classified open issue #${n} of SteamWar ("${res.title_en}") as category "${res.category}" (root cause outside this mono-repo's plugin code), status "${res.status}", module "${res.module}". Their evidence: ${res.evidence} - -Read the issue JSON first: ${SCRATCH}/issues/issue_${n}.json -Codebase worktree: ${WT} -${GROUND_RULES} -${MODULE_MAP} - -Question: could this issue actually be addressed by code that IS in this mono-repo (making the right category "code")? Grep for the relevant feature/config keys. Also sanity-check the opposite: if it truly is a config/website-frontend/infrastructure matter, confirm the category. verdict "confirmed" = category is right; "refuted" = wrong (set corrected_category, and corrected_status if the status should change too, e.g. an issue marked not_in_this_repo that is actually in-repo code). reasoning <= 80 words.` -} - -async function processIssue(it, attempt) { - const n = it.number - const res = await agent(investigatePrompt(n), { - label: `#${n}${attempt > 1 ? ' (retry)' : ''}`, phase: 'Investigate', schema: RESULT_SCHEMA, effort: 'high', - }) - if (!res) return null - const out = { number: n, ...res, verification: 'n/a', verification_notes: [] } - - const claimsDone = res.status === 'implemented' || res.status === 'partially_implemented' - const nonCode = res.category === 'config' || res.category === 'website' || res.category === 'infrastructure' - - const checks = [] - if (claimsDone) { - checks.push(() => agent(evidenceVerifyPrompt(n, res), { label: `verify #${n} evidence`, phase: 'Verify', schema: VERDICT_SCHEMA, effort: 'high' })) - checks.push(() => agent(behaviorVerifyPrompt(n, res), { label: `verify #${n} behavior`, phase: 'Verify', schema: VERDICT_SCHEMA, effort: 'high' })) - } - if (nonCode) { - checks.push(() => agent(categoryVerifyPrompt(n, res), { label: `verify #${n} category`, phase: 'Verify', schema: VERDICT_SCHEMA, effort: 'high' })) - } - if (!checks.length) return out - - const votes = (await parallel(checks)).filter(Boolean) - const statusVotes = claimsDone ? votes.slice(0, Math.min(2, votes.length)) : [] - const catVote = nonCode ? votes[votes.length - 1] : null - // parallel() preserves order, so with both kinds present: [evidence, behavior, category] - - if (claimsDone && statusVotes.length) { - const refuters = statusVotes.filter(v => v.verdict === 'refuted') - const confirms = statusVotes.filter(v => v.verdict === 'confirmed') - if (refuters.length === statusVotes.length) { - out.status = refuters.find(v => v.corrected_status)?.corrected_status || 'not_implemented' - out.verification = 'refuted' - out.confidence = 'low' - } else if (refuters.length > 0) { - out.verification = 'disputed' - out.confidence = 'low' - } else if (confirms.length === statusVotes.length) { - out.verification = 'confirmed' - } else { - out.verification = 'unverified' - if (out.confidence === 'high') out.confidence = 'medium' - } - out.verification_notes.push(...statusVotes.map(v => `${v.verdict}: ${v.reasoning}`)) - } - - if (catVote) { - if (catVote.verdict === 'refuted') { - if (catVote.corrected_category) out.category = catVote.corrected_category - if (catVote.corrected_status && !claimsDone) out.status = catVote.corrected_status - out.verification_notes.push(`category corrected: ${catVote.reasoning}`) - } else { - out.verification_notes.push(`category ${catVote.verdict}: ${catVote.reasoning}`) - } - } - return out -} - -phase('Investigate') -log(`Auditing ${NUMBERS.length} open issues against origin/main (62e855ec)`) - -let results = await pipeline(NUMBERS.map(n => ({ number: n })), it => processIssue(it, 1)) -results = results.filter(Boolean) - -const have = new Set(results.map(r => r.number)) -const missing = NUMBERS.filter(n => !have.has(n)) -if (missing.length) { - log(`Retrying ${missing.length} failed issue(s): ${missing.join(', ')}`) - const retried = (await parallel(missing.map(n => () => processIssue({ number: n }, 2)))).filter(Boolean) - results.push(...retried) -} - -const stillMissing = NUMBERS.filter(n => !results.some(r => r.number === n)) -if (stillMissing.length) log(`Unresolved after retry: ${stillMissing.join(', ')}`) - -results.sort((a, b) => b.number - a.number) -return { audited: results.length, failed: stillMissing, results } \ No newline at end of file