fix(executor): record per-repo commit hashes in multi-repo mode
The hash recording step used `git rev-parse --short HEAD` which fails when the project root is not a git repo (multi-repo workspaces). Update the protocol to extract hashes from commit-to-subrepo JSON output and record all sub-repo hashes in the SUMMARY. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -344,7 +344,9 @@ git commit -m "{type}({phase}-{plan}): {concise task description}
|
||||
"
|
||||
```
|
||||
|
||||
**5. Record hash:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — track for SUMMARY.
|
||||
**5. Record hash:**
|
||||
- **Single-repo:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — track for SUMMARY.
|
||||
- **Multi-repo (sub_repos):** Extract hashes from `commit-to-subrepo` JSON output (`repos.{name}.hash`). Record all hashes for SUMMARY (e.g., `backend@abc1234, frontend@def5678`).
|
||||
|
||||
**6. Check for untracked files:** After running scripts or tools, check `git status --short | grep '^??'`. For any new untracked files: commit if intentional, add to `.gitignore` if generated/runtime output. Never leave generated files untracked.
|
||||
</task_commit_protocol>
|
||||
|
||||
Reference in New Issue
Block a user