fix: have executor self-report worktree metadata (#1349)
This commit is contained in:
@@ -103,6 +103,24 @@ PLAN_START_EPOCH=$(date +%s)
|
||||
```
|
||||
</step>
|
||||
|
||||
<worktree_metadata_capture>
|
||||
If running inside a git worktree, capture authoritative worktree identity before
|
||||
any task commit changes HEAD. The execute-phase orchestrator consumes this from
|
||||
your final `<worktree_metadata>` return block to build the wave cleanup manifest
|
||||
without relying on runtime harness metadata (#1297).
|
||||
|
||||
```bash
|
||||
GSD_WORKTREE_PATH=""
|
||||
GSD_WORKTREE_BRANCH=""
|
||||
GSD_WORKTREE_EXPECTED_BASE=""
|
||||
if [ -f .git ]; then
|
||||
GSD_WORKTREE_PATH=$(git rev-parse --show-toplevel)
|
||||
GSD_WORKTREE_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
GSD_WORKTREE_EXPECTED_BASE=$(git rev-parse HEAD)
|
||||
fi
|
||||
```
|
||||
</worktree_metadata_capture>
|
||||
|
||||
<step name="determine_execution_pattern">
|
||||
```bash
|
||||
grep -n "type=\"checkpoint" [plan-path]
|
||||
@@ -761,6 +779,10 @@ into the user's project history.
|
||||
**Tasks:** {completed}/{total}
|
||||
**SUMMARY:** {path to SUMMARY.md}
|
||||
|
||||
<worktree_metadata>
|
||||
{"agent_id":"{phase}-{plan}","worktree_path":"${GSD_WORKTREE_PATH:-}","branch":"${GSD_WORKTREE_BRANCH:-}","expected_base":"${GSD_WORKTREE_EXPECTED_BASE:-}"}
|
||||
</worktree_metadata>
|
||||
|
||||
**Commits:**
|
||||
- {hash}: {message}
|
||||
- {hash}: {message}
|
||||
|
||||
Reference in New Issue
Block a user