fix(operations): per-project git sync + completion receipts in brief (S2, S3)

Brief.Git was a single GitSync read from ORCHESTRA_DATA (never a git
checkout), and completions were counted but discarded their report_ref/
receipt. Brief.Git is now keyed by project ID and built from each
project's real repo; GitSync gained Ahead/Behind vs upstream; Brief now
carries Receipts pulled from each TaskCompleted payload.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1rkJ2hBMybnJctPbcy4tT
This commit is contained in:
kami
2026-07-27 23:25:01 +04:00
parent 1f46a34afb
commit 5fb88724bd
5 changed files with 97 additions and 13 deletions
+12 -1
View File
@@ -208,7 +208,18 @@ Fixed so far:
entire log from seq 0. `internal/delivery` previously had zero tests;
added `TestFanoutContinuesAfterSendError`.
Not yet started: Codex/opencode completion producers, S2S3, S7S11. See
- **S2 + S3** — `/v1/brief`'s git state used to come from `ORCHESTRA_DATA`
(the event-log directory, not a git checkout — always reported
`"git unavailable"`), and completions were only counted, never surfaced
with proof. `operations.Brief.Git` is now `map[string]GitSync` keyed by
project ID, built in `main.go` from each `registry.Project.Repo` (falling
back to a single `"default"` entry off `ORCHESTRA_REPO` for deployments
without per-project repos); `GitSync` gained `Ahead`/`Behind` vs upstream.
New `Brief.Receipts []operations.CompletionReceipt` pulls `report_ref`/
`receipt` straight out of each `TaskCompleted` event's existing payload.
Covered by an updated `TestBuildBrief`.
Not yet started: Codex/opencode completion producers, S7S11. See
`AUDIT.md` for the full plan.
**Phase 0 done (2026-07-27):** this box has live TCP reachability to the real