Skip to content

Commit ce08fda

Browse files
author
ddx-land-coordinator
committed
chore: add execution evidence [20260521T120859-]
1 parent c9dc8a4 commit ce08fda

5 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"status": "pass",
3+
"message": "no non-test Go files changed"
4+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"attempt_id": "20260521T120859-4791f6cc",
3+
"bead_id": "ddx-0b743e7e",
4+
"base_rev": "a3927de49b2af05298060dc8cf5e60e7a14dea2c",
5+
"created_at": "2026-05-21T12:09:06.730912619Z",
6+
"requested": {
7+
"prompt": "synthesized"
8+
},
9+
"bead": {
10+
"id": "ddx-0b743e7e",
11+
"title": "Fix lock scoping: release .git/index.lock and .ddx/.git-tracker.lock before harness subprocess",
12+
"description": "PROBLEM: execute-bead workers hold git locks across the entire LLM subprocess invocation, blocking concurrent tracker operations.\n\nFIX: Refactor to acquire locks only for the duration of git mutations, not across subprocess waits. Specifically:\n- Scope .git/index.lock acquisition to actual git commands\n- Scope .ddx/.git-tracker.lock acquisition to tracker file writes\n- Never hold locks while waiting on claude/codex/gemini subprocess\n\nCROSS-REF: Parent ddx-57c40485; original Fizeau incident AR-2026-05-17-repo.\n\nFILES TO MODIFY:\n- cli/internal/agent/tracker_lock.go\n- cli/internal/agent/execute_bead_land.go (landing)\n- cli/internal/gitlock/gitlock.go (if needed)\n- Test: git_index_lock_test.go",
13+
"acceptance": "1. Integration test verifies .git/index.lock is released before harness subprocess starts; lock mtime is older than process invocation timeline.\n2. Same property verified for .ddx/.git-tracker.lock.\n3. Execute 'cd cli \u0026\u0026 go test -v ./internal/agent -run TestLockScoping' green.\n4. Execute 'cd cli \u0026\u0026 go test ./...' all passing.\n5. Lefthook run pre-commit passes.",
14+
"labels": [
15+
"area:execute-bead",
16+
"area:workers",
17+
"kind:bug",
18+
"phase:2",
19+
"priority:reliability"
20+
]
21+
},
22+
"paths": {
23+
"dir": ".ddx/executions/20260521T120859-4791f6cc",
24+
"prompt": ".ddx/executions/20260521T120859-4791f6cc/prompt.md",
25+
"manifest": ".ddx/executions/20260521T120859-4791f6cc/manifest.json",
26+
"result": ".ddx/executions/20260521T120859-4791f6cc/result.json",
27+
"checks": ".ddx/executions/20260521T120859-4791f6cc/checks.json",
28+
"usage": ".ddx/executions/20260521T120859-4791f6cc/usage.json",
29+
"worktree": "home/erik/.cache/ddx/exec-wt/.execute-bead-wt-ddx-0b743e7e-20260521T120859-4791f6cc"
30+
},
31+
"prompt_sha": "9707761aa14bcc53ef71acf869a21f62e5846ad0a0b45751973c72886721321c"
32+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<execute-bead>
2+
<instructions>
3+
You are executing one bead in an isolated DDx execution worktree. The bead&#39;s &lt;description&gt; and &lt;acceptance&gt; are the contract: every AC must be provably satisfied by a specific code, test, or file after your commit.&#xA;&#xA;## Step 0: size check&#xA;&#xA;Too big if any holds:&#xA;&#xA;- More than ~6 ACs spanning unrelated subsystems.&#xA;- AC mixes design, implementation, integration tests, and docs.&#xA;- Description names multiple feature-sized pieces.&#xA;- More than ~500 lines across ~5+ files in unrelated packages.&#xA;- If the bead description exceeds 8000 bytes, use a split-first pass.&#xA;- Auto-decomposition is capped at depth 2: root beads may split once, children once more; reject third-level splits with an explanation.&#xA;&#xA;If too big, decompose:&#xA;&#xA;1. `ddx bead create` for each child (copy parent&#39;s labels and spec-id).&#xA;2. `ddx bead dep add &lt;child-id&gt; &lt;parent-id&gt;` to record edges.&#xA;3. `ddx bead update &lt;parent-id&gt; --notes &#39;decomposed into &lt;child-ids&gt;&#39;`.&#xA;4. Write `no_changes_rationale.txt` under the bead metadata `bundle` path with child IDs, then stop.&#xA;&#xA;Decomposition alone is success. Do not mix it with implementation.&#xA;&#xA;## How to work&#xA;&#xA;- Read first. If the bead names files, specs, or prior beads, read them before editing — do not guess.&#xA;- Cross-reference each AC to concrete evidence (test, file, function) before committing. If you cannot point at it, it is not done.&#xA;- Run the project&#39;s test and lint commands before committing. **Do not commit red code** — fix failures first.&#xA;- Run git/index mutations sequentially; do not use parallel tool calls for `git add`, `git commit`, or other staging/commit commands.&#xA;- Stage with `git add &lt;specific-paths&gt;`; never `git add -A` (the worktree may have unrelated WIP).&#xA;- If `lefthook run pre-commit` depends on staged files, rerun it after staging the exact commit set. A `no-staged-files` run is not acceptance evidence.&#xA;- Commit exactly once when green; conventional-commit subject ending with `[&lt;bead-id&gt;]`. Stop after the commit.&#xA;- Do not modify files outside the bead&#39;s scope.&#xA;- Current-bead lifecycle is orchestrator-owned. Do not run `ddx bead update &lt;bead-id&gt; --claim`, `ddx bead update &lt;bead-id&gt; --status &lt;status&gt;`, `ddx bead update &lt;bead-id&gt; --unclaim`, or `ddx bead close &lt;bead-id&gt;`. Step 0 still allows `ddx bead create`, `ddx bead dep add`, and `ddx bead update &lt;parent-id&gt; --notes &#39;decomposed into &lt;child-ids&gt;&#39;`.&#xA;- If you cannot finish, write `no_changes_rationale.txt` under the bead metadata `bundle` path before exiting. No commit or rationale ⇒ DDx records `no_evidence_produced`.&#xA;&#xA;## no_changes contract&#xA;&#xA;The `no_changes_rationale.txt` file under the bead metadata `bundle` path must contain one of:&#xA;&#xA;- `verification_command: &lt;cmd&gt;` — repo cwd; exit 0 closes, nonzero rejects.&#xA;- `status: open` + `reason: &lt;retryable&gt;` — open, smart retry.&#xA;- `status: proposed` + `reason: &lt;operator needed&gt;` — operator lane.&#xA;- `status: blocked` + `reason: &lt;external blocker&gt;` — blocked lane.&#xA;&#xA;No pseudo-statuses. Bare rationales and `status: needs_investigation` are rejected.&#xA;&#xA;For orchestrator decomposition, add `orchestrator_action: decompose` alongside `status: open`.&#xA;&#xA;## Reports&#xA;&#xA;Reports go under the bead metadata `bundle` path in `.ddx/executions/`. **Never write reports to `/tmp` or outside the repo**. Use a named in-repo path when given; otherwise write `&lt;short-name&gt;.md` there. Commit it with the code.&#xA;&#xA;## Mode and overrides&#xA;&#xA;DDX_MODE=bead_execution: edit code/docs for bead AC. Only broad queue-steward default is overridden; tracker, merge-policy, verification, safety stay active. Bead description/AC override CLAUDE.md, AGENTS.md, and defaults.&#xA;&#xA;## Review gate&#xA;&#xA;- The review is a gate, not an escape hatch — meet every AC in this pass.&#xA;- Address every BLOCKING `&lt;review-findings&gt;` item; do not declare `no_changes` with blocking findings open.&#xA;&#xA;## Constraints&#xA;&#xA;- Work only inside this execution worktree.&#xA;- Keep `.ddx/executions/` intact — DDx uses it as execution evidence.&#xA;- **Never run `ddx init`** — the workspace is initialized.&#xA;- Do not modify files outside the bead&#39;s named scope.&#xA;- Do not rewrite CLAUDE.md, AGENTS.md, or other instruction files unless the bead asks.&#xA;&#xA;## When the work is done&#xA;&#xA;After the commit succeeds and every AC is verified, stop. Return control to the orchestrator.
4+
</instructions>
5+
<bead id="ddx-0b743e7e">
6+
<title>Fix lock scoping: release .git/index.lock and .ddx/.git-tracker.lock before harness subprocess</title>
7+
<description>
8+
PROBLEM: execute-bead workers hold git locks across the entire LLM subprocess invocation, blocking concurrent tracker operations.&#xA;&#xA;FIX: Refactor to acquire locks only for the duration of git mutations, not across subprocess waits. Specifically:&#xA;- Scope .git/index.lock acquisition to actual git commands&#xA;- Scope .ddx/.git-tracker.lock acquisition to tracker file writes&#xA;- Never hold locks while waiting on claude/codex/gemini subprocess&#xA;&#xA;CROSS-REF: Parent ddx-57c40485; original Fizeau incident AR-2026-05-17-repo.&#xA;&#xA;FILES TO MODIFY:&#xA;- cli/internal/agent/tracker_lock.go&#xA;- cli/internal/agent/execute_bead_land.go (landing)&#xA;- cli/internal/gitlock/gitlock.go (if needed)&#xA;- Test: git_index_lock_test.go
9+
</description>
10+
<acceptance>
11+
1. Integration test verifies .git/index.lock is released before harness subprocess starts; lock mtime is older than process invocation timeline.&#xA;2. Same property verified for .ddx/.git-tracker.lock.&#xA;3. Execute &#39;cd cli &amp;&amp; go test -v ./internal/agent -run TestLockScoping&#39; green.&#xA;4. Execute &#39;cd cli &amp;&amp; go test ./...&#39; all passing.&#xA;5. Lefthook run pre-commit passes.
12+
</acceptance>
13+
<labels>area:execute-bead, area:workers, kind:bug, phase:2, priority:reliability</labels>
14+
<metadata base-rev="a3927de49b2af05298060dc8cf5e60e7a14dea2c" bundle=".ddx/executions/20260521T120859-4791f6cc"/>
15+
</bead>
16+
<governing>
17+
<note>No governing references were pre-resolved. The bead description above is the primary contract. If it names files, specs, or prior beads, read them first. Ground decisions in repository state; do not guess.</note>
18+
</governing>
19+
</execute-bead>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"bead_id": "ddx-0b743e7e",
3+
"attempt_id": "20260521T120859-4791f6cc",
4+
"base_rev": "a3927de49b2af05298060dc8cf5e60e7a14dea2c",
5+
"result_rev": "c9dc8a47a27548a040358ccd6e7faa03a42612bb",
6+
"implementation_rev": "c9dc8a47a27548a040358ccd6e7faa03a42612bb",
7+
"landed_rev": "c9dc8a47a27548a040358ccd6e7faa03a42612bb",
8+
"landed_branch": "main",
9+
"outcome": "merged",
10+
"status": "success",
11+
"detail": "success",
12+
"orchestrator_status": "success",
13+
"candidate_ref": "refs/ddx/iterations/20260521T120859-4791f6cc/0",
14+
"cycle_trace": [
15+
{
16+
"cycle_index": 0,
17+
"attempt_id": "20260521T120859-4791f6cc",
18+
"result_rev": "c9dc8a47a27548a040358ccd6e7faa03a42612bb",
19+
"implementer_route": {
20+
"harness": "claude",
21+
"model": "haiku"
22+
},
23+
"review_result": {},
24+
"final_decision": "success"
25+
}
26+
],
27+
"harness": "claude",
28+
"model": "haiku",
29+
"session_id": "eb-98dd521d",
30+
"duration_ms": 1800672,
31+
"tokens": 128,
32+
"cost_usd": 1.90061675,
33+
"exit_code": 0,
34+
"project_root": "/home/erik/Projects/ddx",
35+
"execution_dir": ".ddx/executions/20260521T120859-4791f6cc",
36+
"prompt_file": ".ddx/executions/20260521T120859-4791f6cc/prompt.md",
37+
"manifest_file": ".ddx/executions/20260521T120859-4791f6cc/manifest.json",
38+
"result_file": ".ddx/executions/20260521T120859-4791f6cc/result.json",
39+
"usage_file": ".ddx/executions/20260521T120859-4791f6cc/usage.json",
40+
"rate_limit_budget": 300000000000,
41+
"started_at": "2026-05-21T12:09:06.76673834Z",
42+
"finished_at": "2026-05-21T12:39:07.438968635Z"
43+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"attempt_id": "20260521T120859-4791f6cc",
3+
"harness": "claude",
4+
"model": "haiku",
5+
"tokens": 128,
6+
"input_tokens": 10,
7+
"cached_tokens": 95698,
8+
"cache_hit_rate": 0.9998955155263928,
9+
"output_tokens": 118,
10+
"cost_usd": 1.90061675
11+
}

0 commit comments

Comments
 (0)