Commit Graph

36 Commits

Author SHA1 Message Date
kami 3fe3aee5b7 fix(herdr): close Phase 4 item 2 — actually ask the agent for a handoff
Release already validated and uploaded a §6.1 handoff, but nothing ever
told the agent the .orchestra-handoff.json convention existed, so the
file it waited on never got written. rotate() now prompts the agent
once via a new optional herdr.HandoffRequester capability
(CLIAdapter.RequestHandoff) when the file is missing, and defers
Release until it appears, mirroring the .orchestra-report.md/B3 ask
pattern rather than inventing a handoff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1rkJ2hBMybnJctPbcy4tT
2026-07-27 22:10:22 +04:00
kami 62bb17e05d fix(continuity): wire scratch-commit-before-release and rewrite bootstrap prompt (Phase 4 items 3, 5, 6)
Release now re-verifies every handoff Anchor.Dirty file hash (previously
unchecked after the top-level anchor SHA compare), snapshots dirty state
onto a per-task scratch branch before uploading, and rewrites the anchor
to the new commit so successor pickup collapses to a single HEAD compare.
ScratchCommit made idempotent for repeated rotations of the same task.

Bootstrap's prompt now points the agent at the scratch-branch commit
history instead of vague "read the handoff" prose, and does not claim a
GET /v1/artifacts/<ref> endpoint that doesn't exist.

MarkdownChanges had zero callers and zero tests; deleted per AUDIT.md's
explicit deletion option rather than half-wiring an undesigned feature.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1rkJ2hBMybnJctPbcy4tT
2026-07-27 22:06:06 +04:00
kami 7bcad64398 fix(orchestrator): wire TASK.md writing and §6.2 pickup validation (B6, partial)
Fixes AUDIT.md's B6: nothing wrote a TASK.md into a worktree, so
continuity.ValidatePickup had no caller and no file to check.

- continuity.RenderTaskFile/TaskFileHash: render and hash the immutable
  §6.2 TASK.md from a domain.Task.
- GitWorktrees.Create writes and commits TASK.md into every freshly
  created worktree (must be committed, not dirty, for ScratchCommit's
  immutability check and for a stable hash).
- Coordinator.Start now runs continuity.ValidatePickup (anchor SHA,
  dirty-file hashes, TASK.md hash) against the real worktree before
  bootstrapping a successor onto a handoff_ref, and blocks the task
  instead of bootstrapping on a validation failure.

Still open from Phase 4: handoff production (agent writing the real
handoff; Release still refuses per B5), ScratchCommit wiring before
release, and the §6.2 bootstrap-prompt rewrite — see AUDIT.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1rkJ2hBMybnJctPbcy4tT
2026-07-27 21:44:00 +04:00
kami f8a397a14c fix(harness): add automatic TaskCompleted producer (B3, partial)
POST /v1/harness/complete lets a Claude Code Stop hook report task
completion instead of relying on a human hitting the manual endpoint.
The hook only fires on an explicit .orchestra-report.md marker (not
every turn boundary); the server builds the receipt itself from the
real transcript via herdr.ClaudeUsage rather than trusting a
self-reported number. Codex/opencode producers and the turn-decision
endpoint are still unbuilt — see AUDIT.md/progress.md for scope.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1rkJ2hBMybnJctPbcy4tT
2026-07-27 21:24:17 +04:00
kami 63cda5557e fix(herdr): B5 — replace invented pane.kill/release/rotation_signal with real methods
Verified against a live herdr instance (192.168.1.105:9245) that pane.kill,
pane.release, and pane.rotation_signal never existed in the protocol, as
AUDIT.md's B5 suspected. Real method list captured in deploy/herdr-schema.json.

- Kill now calls the real pane.close({pane_id}).
- RotationSignal interface/method/call-site deleted; no real equivalent exists.
- Release now refuses loudly instead of calling a nonexistent method — the
  real pane.release_agent can't return a handoff_ref either way (herdr
  doesn't write handoffs, the agent does), so a real fix needs Phase 4
  handoff production first.

Also documents Phase 0 findings in AUDIT.md/progress.md, and adds
CLAUDE.md/AGENTS.md with project-specific knowledge (herdr protocol facts,
deployment topology, a currently-stuck live task, the federation fork) for
future sessions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1rkJ2hBMybnJctPbcy4tT
2026-07-27 21:05:53 +04:00
kami 02d93fb63d docs: track AUDIT.md remediation progress
Record what's landed this pass (B1, B2, B4, B8, S1, S5, S6) and what's
still open, so the next session doesn't have to re-derive it from git log.
2026-07-27 19:44:42 +04:00
kami ce6f02f9e6 checkpoint: multi-repo Gitea ingestion, per-project repos, rotation anchor_sha fix
Pre-existing uncommitted work found at session start: rotation now emits
anchor_sha on TaskReleased (previously silently dropped by store.Append
validation), multi-repo Gitea provider support, per-project git worktree
roots, and associated test coverage. Committing as a checkpoint before
starting remediation work tracked in AUDIT.md.
2026-07-27 18:15:02 +04:00
kami 98833ffb1a record completion of remaining orchestration gaps 2026-07-26 20:39:57 +04:00
kami 4364dff9c2 support milestone and thrash rotation signals 2026-07-26 20:36:17 +04:00
kami b4d9621d89 schedule daily standup advisories 2026-07-26 20:35:57 +04:00
kami 17e7aef871 wire configured quota limits into routing 2026-07-26 20:34:38 +04:00
kami 6e4df6d2ff add federated worker registration and heartbeats 2026-07-26 20:32:45 +04:00
kami 26011ed33c coordinate rotation at harness turn boundaries 2026-07-26 20:32:01 +04:00
kami 4093bdb683 add telegram and ntfy event delivery 2026-07-26 20:31:42 +04:00
kami f818003ad5 add conservative quota availability filtering 2026-07-26 20:31:03 +04:00
kami ae4d3a57bc supervise providers and reflect terminal state 2026-07-26 20:30:19 +04:00
kami ad32f29cd5 persist and reconcile runtime sessions 2026-07-26 20:28:41 +04:00
kami afac166989 add bounded artifact upload endpoint 2026-07-26 20:25:40 +04:00
kami 98725c28c5 validate and select configured harness adapters 2026-07-26 20:25:17 +04:00
kami 4e05e4df7b harden versioned event substrate 2026-07-26 20:19:18 +04:00
kami 6bf6445d40 enforce lifecycle evidence contracts 2026-07-26 20:17:03 +04:00
kami b2b24cbe09 docs: add canonical full implementation gap list 2026-07-26 20:13:36 +04:00
kami 5a360c051c feat: rotate sessions on occupancy threshold 2026-07-26 20:07:34 +04:00
kami dc3cebebf8 feat: wire configured harness execution 2026-07-26 20:06:44 +04:00
kami 5d45351613 feat: enforce event authorization and readiness 2026-07-26 19:52:49 +04:00
kami 64abbe900e feat: start provider ingestion and orchestration coordination 2026-07-26 19:49:41 +04:00
kami aa6719ca16 docs: update server implementation gaps 2026-07-26 19:47:08 +04:00
kami 073d5c69b0 docs: record implementation review gaps 2026-07-26 19:42:54 +04:00
kami 8822e028bb Implement projections and operations 2026-07-26 19:14:46 +04:00
kami 9937cd5cd0 Implement authorization and control surfaces 2026-07-26 19:13:09 +04:00
kami 1c889167fa Implement continuity handoffs and pickup validation 2026-07-26 19:10:18 +04:00
kami 96e94bc2d0 Implement herdr integration layer 2026-07-26 19:07:03 +04:00
kami a3b9f63892 Implement router assignment and lease retries 2026-07-26 19:04:32 +04:00
kami 7980839393 implement project and machine registries 2026-07-26 19:01:44 +04:00
kami 0a21e1bc2b Implement provider layer adapters 2026-07-26 18:59:13 +04:00
kami 24ee81d538 complete item 1 task substrate 2026-07-26 18:57:09 +04:00