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:
Srinivas Koduri
2026-03-18 22:45:11 -07:00
parent d0aae7b63c
commit 99b239dbaf

View File

@@ -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>