Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions specification/bug-classes/hardcoded-worktree-layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"schemaVersion": 1,
"revision": "a3545d34e0673eb25189576e08d4f6c79fb9c436",
"bugClass": {
"id": "hardcoded-worktree-layout",
"title": "Path matching assumes a single worktree layout",
"cause": "Path matching or extraction logic encodes one worktree directory structure, so equivalent worktrees under another supported parent directory are not recognized and their activity cannot be mapped to its owning item.",
"criteria": "A site exhibits this cause when runtime path parsing, matching, or classification recognizes one worktree root layout but fails for another valid layout representing the same repository and worktree identity. Count each independent path-matching or path-extraction route that makes this assumption on its own.",
"patterns": [
{
"kind": "text",
"value": "worktree",
"weight": 5
},
{
"kind": "text",
"value": "attempts/",
"weight": 5
},
{
"kind": "text",
"value": "managed/",
"weight": 5
},
{
"kind": "text",
"value": "RegExp(",
"weight": 3
},
{
"kind": "text",
"value": "\\.replace(",
"weight": 2
},
{
"kind": "call",
"value": "match",
"weight": 4
},
{
"kind": "call",
"value": "matchAll",
"weight": 4
},
{
"kind": "call",
"value": "exec",
"weight": 2
},
{
"kind": "call",
"value": "parse",
"weight": 2
}
],
"contextTerms": ["worktree", "attempts", "managed", "transcript", "item", "path"],
"pathHints": [
{
"contains": "src/",
"weight": 5
},
{
"contains": "src/services/",
"weight": 5
},
{
"contains": "src/utils/",
"weight": 4
},
{
"contains": "src/adapters/",
"weight": 4
},
{
"contains": "src/workflows/",
"weight": 4
},
{
"contains": "src/repositories/",
"weight": 3
},
{
"contains": "src/core/",
"weight": 3
},
{
"contains": "packages/hub/",
"weight": 3
},
{
"contains": "packages/remote/",
"weight": 2
},
{
"contains": "specification/",
"weight": -2
},
{
"contains": "test/",
"weight": -3
},
{
"contains": "server/",
"weight": -2
},
{
"contains": "worker/",
"weight": -2
}
]
}
}
69 changes: 69 additions & 0 deletions specification/loops/hub-quota-managed-attempts/loop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "hub-quota-managed-attempts",
"goal": "dcnuc3 sessions running in managed/ attempt folders map their model usage to tracker items",
"createdAt": "2026-11-30T16:24:13.166Z",
"updatedAt": "2026-11-30T16:42:21.201Z",
"template": "bug-fix",
"templateLineage": ["bug-fix"],
"enforceOrder": true,
"regressionCommits": 1,
"steps": [
{
"id": "spec",
"title": "Identify the failing behavior, expected behavior, and reproduction.",
"status": "complete",
"completedAt": "2026-11-30T16:24:23.082Z",
"evidence": "Per-item model usage must map every computer's sessions to items (c0nxdq). Spoke attempt folders are .../tracker/managed/<64hex>/worktree; Mac ones .../attempts/<64hex>/worktree. Repro: live dcnuc3 /quota-usage 2026-11-30T16:19:51Z, 118 consumers, 0 with an item."
},
{
"id": "coverage",
"title": "Explain why existing standardized tests missed the bug; name the scenario, fixture, lifecycle or assertion gap and reusable test change.",
"status": "complete",
"completedAt": "2026-11-30T16:24:29.603Z",
"evidence": "Gap: test/utils/projects-sessions/tracker-quota-usage.test.ts fixtures used only the attempts/ layout for both the Claude folder name and Codex cwd. The same test now uses the managed/ layout for the Codex cwd and keeps attempts/ for Claude."
},
{
"id": "red",
"title": "Strengthen the existing standardized test; commit it before repair, run it failing with loop record --phase red, and preserve the assertion.",
"status": "complete",
"completedAt": "2026-11-30T16:24:56.919Z",
"evidence": "Same test at the red commit: 1 failed 'expected 55 to be 192' (managed/ Codex usage not mapped). Recorded by loop record."
},
{
"id": "implement",
"title": "Implement the smallest repair without weakening the regression test.",
"status": "complete",
"completedAt": "2026-11-30T16:25:10.184Z",
"evidence": "Fix commit: quotaAttempt() matches attempts/ or managed/ folders; regression test unchanged."
},
{
"id": "green",
"title": "Rerun the same unchanged regression test at a separate fix commit with loop record --phase green; preserve passing proof.",
"status": "complete",
"completedAt": "2026-11-30T16:26:49.260Z",
"evidence": "Unchanged test passed at the fix commit, recorded by loop record --phase green."
},
{
"id": "siblings",
"title": "Run harness loop siblings to record the root cause and evaluate the same pattern across committed source.",
"status": "complete",
"completedAt": "2026-11-30T16:36:42.047Z",
"evidence": "siblings-ffcdad9b-49b9-48af-a1ea-bcd6dc9e9e6f.json"
},
{
"id": "verify",
"title": "Run relevant project checks and affected UI browser flows with fresh inspected screenshots and no unexpected browser errors; preserve diagnostics and keep pending until proof passes.",
"status": "complete",
"completedAt": "2026-11-30T16:42:21.201Z",
"evidence": "tracker-quota tests 2/2 (includes the Bun runtime read); eslint and prettier clean on changed files. Diff to main is one regex and one fixture line. Pre-existing on main, not from this diff: stale unit registry (no quota records) and tsc errors in browserApi.ts and task-process-exit-close.test.ts. No UI change. Full check and shared queue not run."
}
],
"evaluators": [
{
"id": "check",
"title": "Run the project check script.",
"command": "bun run check",
"step": "verify"
}
]
}
Loading
Loading