Files
cleveragents-core/scripts
drew 7890af4a5e fix(auto-agents): run-6 deep-inspection findings + sidecar/launcher hardening
Several of these were silent failures the worker could not recover from.

- N2: OpenCode's permission resolver is LAST-match-wins (findLast), not
  first-match-wins. A prior reorder put `"*": deny` AFTER the /tmp allows
  in task-implementor.md's edit/write/external_directory blocks, so the
  leaf could not even read its own pre-cloned worktree. Reordered
  `"*": deny` first; added an ordering-pin test.
- N1: task-implementor.md never told the leaf to emit the terminal
  {"outcome","files_touched"} JSON, so a prose-only ending dropped the
  dispatcher into its UNKNOWN bucket. Added the Terminal output contract
  + a CRITICAL rule + a content pin.
- N3: piping the gate wrapper through head/tail is denied (neither is
  allowlisted). Documented "run it bare" in the quality-gates skill and
  the task-implementor bash comment.
- N5: the launcher reap loop respawned the live-writer sidecar (and
  dispatchers) during shutdown. Added a SHUTTING_DOWN guard.
- N6: documented the events.jsonl record schema in-repo (optional-field
  absence is intentional, not an inconsistency).
- Sidecar: _load_offset returned byte 0 on cold start, re-emitting the
  whole log backlog. Now returns EOF; resolution hoisted to __init__ so
  it is deterministic vs. thread startup.
- Auto-fix push: push_branch ran git without GIT_ASKPASS and failed
  rc=128. It now takes a credential-bearing git_env from the caller;
  added apply-phase logging before the push.

N4 assessed and not a bug: data_complete=False was caused by
pr_comments:partial + diff_truncated, not the 404 linked issue.

Full suite: 1559 passed, 3 skipped (+11 new regression tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:23:16 -04:00
..