Commit graph

479 commits

Author SHA1 Message Date
openhands
1c8c6a8caf fix: add AKIA and 0x private key redaction, preserve scan diagnostics
- redact_secrets now covers AWS AKIA keys and 0x-prefixed private keys,
  matching all patterns that scan_for_secrets detects
- file-action-issue.sh no longer suppresses stderr from scan_for_secrets,
  so blocked-issue diagnostics reach the caller's log

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 10:00:13 +00:00
openhands
2cc538d4fc fix: register lib/secret-scan.sh in CI smoke test function resolution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 09:55:58 +00:00
openhands
0b453fdab0 fix: fix: action formulas must not contain secrets in issue body (#291)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 09:54:21 +00:00
johba
3793339da5 Merge pull request 'fix: fix: gardener creates investigation issues for already-closed escalations (#289)' (#472) from fix/issue-289 into main 2026-03-21 10:44:03 +01:00
openhands
082a472b9e fix: gardener creates investigation issues for already-closed escalations (#289)
Filter stale escalation entries in gardener-poll.sh before passing them
to the agent session. For each escalation reply line, extract referenced
issue numbers (#NNN) and check their current state via the API. Discard
entries where all referenced issues are already closed, preventing the
gardener from creating investigation issues for resolved problems.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 09:27:31 +00:00
johba
214b925d95 Merge pull request 'fix: feat: planner journal pattern — daily raw files + periodic summarization (#361)' (#470) from fix/issue-361 into main 2026-03-21 10:14:02 +01:00
openhands
83ec300c0e fix: feat: planner journal pattern — daily raw files + periodic summarization (#361)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:57:06 +00:00
johba
a698b8e540 Merge pull request 'fix: No relabeling on DISMISS: closed dismissed predictions retain prediction/unreviewed label (#360)' (#468) from fix/issue-360 into main 2026-03-21 09:49:02 +01:00
johba
ecb03ead8e Merge pull request 'chore: planner run journal 2026-03-21' (#467) from chore/planner-20260321-0833 into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/467
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-21 09:42:24 +01:00
openhands
d0e40ead22 chore: planner run 2026-03-21 2026-03-21 09:42:06 +01:00
openhands
33656048f8 fix: No relabeling on DISMISS: closed dismissed predictions retain prediction/unreviewed label (#360)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:41:30 +00:00
johba
ffabfa3984 Merge pull request 'fix: fix: action-agent runtime isolation, logging, and cleanup (#357)' (#464) from fix/issue-357 into main 2026-03-21 09:34:02 +01:00
openhands
67481fec9e fix: action-agent runtime isolation, logging, and cleanup (#357)
The action-agent now creates an isolated git worktree before each run
and destroys it unconditionally on exit. The formula must push results
before signaling done — unpushed work is lost when the worktree is nuked.

Changes:
- WORKTREE now points to /tmp/action-{issue}-{timestamp} instead of
  PROJECT_REPO_ROOT
- cleanup_worktree() properly removes the worktree + Claude session history
- cleanup() kills child processes, stops docker, then destroys the worktree
- Claude session runs inside the worktree (not FACTORY_ROOT)
- Prompt warns about push-before-done in both Path A and Path B

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:23:31 +00:00
johba
1ba22ca750 Merge pull request 'fix: feat: stream dev-agent Claude output to Matrix thread (extend #293 to dev-agent) (#355)' (#463) from fix/issue-355 into main 2026-03-21 09:18:22 +01:00
openhands
33a92c3fee fix: feat: stream dev-agent Claude output to Matrix thread (extend #293 to dev-agent) (#355)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:11:45 +00:00
johba
db325c4415 Merge pull request 'fix: fix: formula agents run in isolated git worktrees — no session collisions (#460)' (#461) from fix/issue-460 into main 2026-03-21 09:01:28 +01:00
openhands
d19160a658 ci: retrigger — push pipeline #651 flaked (PR pipeline #652 passed same commit)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 07:53:29 +00:00
openhands
a2fe3ecb83 fix: formula agents run in isolated git worktrees — no session collisions (#460)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 07:51:27 +00:00
johba
1ad1fdfaa1 Merge pull request 'fix: fix: matrix_listener.sh drops dev/review injections — PROJECT_NAME is unset (#354)' (#459) from fix/issue-354 into main 2026-03-21 08:44:55 +01:00
openhands
02f483ff71 fix: matrix_listener.sh drops dev/review injections — PROJECT_NAME is unset (#354)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 07:38:39 +00:00
johba
ccc8845642 Merge pull request 'fix: dev-poll.sh contains heavy judgment-in-bash not captured in the Current State table (#250)' (#456) from fix/issue-250 into main 2026-03-21 08:29:02 +01:00
openhands
d63a7402df fix: dev-poll.sh contains heavy judgment-in-bash not captured in the Current State table (#250)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 07:20:12 +00:00
johba
a48596e9ae Merge pull request 'fix: Architecture diagram should acknowledge claude -p as a valid judgment layer alongside tmux (#249)' (#453) from fix/issue-249 into main 2026-03-21 08:14:02 +01:00
openhands
304bbdd775 fix: Architecture diagram should acknowledge claude -p as a valid judgment layer alongside tmux (#249)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 07:05:34 +00:00
johba
3bc6abff74 Merge pull request 'fix: Smoke test has no coverage for inline-sourced lib files beyond the four listed (#180)' (#452) from fix/issue-180 into main 2026-03-21 07:59:53 +01:00
openhands
20c02944c0 fix: address review — add check_script for lib/env.sh, fix comment alignment
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 06:49:34 +00:00
openhands
e69ceddeb3 fix: Smoke test has no coverage for inline-sourced lib files beyond the four listed (#180)
- Add check_script calls for all inline-sourced lib files (agent-session.sh,
  ci-helpers.sh, file-action-issue.sh, formula-session.sh, load-project.sh)
  so their internal function calls are verified
- Add check_script calls for standalone lib scripts (ci-debug.sh,
  matrix_listener.sh, parse-deps.sh) and legacy prediction scripts
- Add documentation comment on LIB_FUNS listing included/excluded lib files
  with rationale for each

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 06:41:48 +00:00
johba
36326a46b1 Merge pull request 'fix: load-project.sh does not re-derive CODEBERG_WEB on TOML-based repo override (#147)' (#451) from fix/issue-147 into main 2026-03-21 07:34:02 +01:00
openhands
60d7920aa1 fix: load-project.sh does not re-derive CODEBERG_WEB on TOML-based repo override (#147)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 06:24:41 +00:00
johba
9ac839a98d Merge pull request 'fix: dev-poll.sh: redundant manual state exclusions alongside ci_passed (#113)' (#450) from fix/issue-113 into main 2026-03-21 07:19:02 +01:00
openhands
d29c6ad1c9 fix: dev-poll.sh: redundant manual state exclusions alongside ci_passed (#113)
Add ci_failed() helper to lib/ci-helpers.sh and replace three compound
`! ci_passed && CI_STATE != "" && != "pending" && != "unknown"` patterns
in dev/dev-poll.sh with the cleaner ci_failed() call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 06:10:39 +00:00
johba
4dc29d2393 Merge pull request 'fix: refactor: replace escalation JSONL with blocked label + diagnostic comment (#352)' (#445) from fix/issue-352 into main 2026-03-21 07:04:02 +01:00
openhands
7b6b56d761 fix: address review — restore +x, guard double comment, update stale docs (#352)
- Restore executable bit on gardener/gardener-poll.sh (cron invokes it directly)
- Add _BLOCKED_POSTED guard to prevent duplicate diagnostic comments when
  both _on_phase_change(PHASE:crashed) and the belt-and-suspenders exit
  handler both call post_blocked_diagnostic()
- Update stale documentation:
  - gardener-run.sh: remove "CI escalation recipes" from issue body
  - AGENTS.md: update directory layout comment for gardener-poll.sh
  - gardener-poll.sh: remove recipe engine description from header

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 05:55:27 +00:00
openhands
e9447051fa supervisor: learned — Race Condition: Review Posted Before PHASE:awaiting_review Transitions 2026-03-21 05:54:34 +00:00
openhands
bda9240268 refactor: extract ensure_blocked_label_id to lib/ci-helpers.sh (#352)
Move ensure_blocked_label_id() from dev/phase-handler.sh into
lib/ci-helpers.sh to eliminate the duplicate blocked-label creation
curl block that existed in both phase-handler.sh and dev-poll.sh.

Both dev-agent.sh and action-agent.sh now source lib/ci-helpers.sh
so the function is available when phase-handler.sh calls it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 05:06:12 +00:00
openhands
cd5f05008b supervisor: learned — Push CI vs PR CI mismatch — agent picks wrong pipeline number 2026-03-21 05:05:02 +00:00
openhands
61c44d31b1 fix: refactor: replace escalation JSONL with blocked label + diagnostic comment (#352)
Replace the unreliable escalation JSONL system (supervisor/escalations-*.jsonl
consumed by gardener) with direct blocked label + diagnostic comment on the
original issue.

When a dev-agent or action-agent session fails (PHASE:failed, idle timeout,
crash, CI exhausted):
- Capture last 50 lines from tmux pane via tmux capture-pane
- Post a structured diagnostic comment on the issue (exit reason, timestamp,
  PR number, tmux output)
- Label the issue "blocked" (instead of restoring "backlog")
- Remove in-progress label

Removed:
- Escalation JSONL write paths in dev-agent.sh, phase-handler.sh, dev-poll.sh,
  action-agent.sh
- is_escalated() helper in dev-poll.sh
- Escalation triage (P2f section) in supervisor-poll.sh
- Escalation processing + recipe engine in gardener-poll.sh
- ci-escalation-recipes step from run-gardener.toml formula
- escalations*.jsonl from .gitignore

Added:
- post_blocked_diagnostic() shared helper in phase-handler.sh
- ensure_blocked_label_id() helper (creates label via API if not exists)
- is_blocked() helper in dev-poll.sh (replaces is_escalated)
- Blocked issues listing in supervisor/preflight.sh

Kept:
- Matrix notifications on failure (unchanged)
- CI fix counter logic (still tracks attempts)
- needs_human injection in supervisor/gardener (not escalation-related)
- Gardener grooming (gardener-agent.sh still invoked)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 04:18:43 +00:00
johba
0109f0b0c3 Merge pull request 'fix: PHASE:needs_human missing from crash-path terminal set in monitor_phase_loop (#342)' (#444) from fix/issue-342 into main 2026-03-21 04:59:02 +01:00
openhands
ab122c9701 fix: PHASE:needs_human missing from crash-path terminal set in monitor_phase_loop (#342)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 03:50:21 +00:00
johba
f511a6c7a7 Merge pull request 'fix: PHASE:crashed unhandled in _on_phase_change / dev-agent callback (#339)' (#443) from fix/issue-339 into main 2026-03-21 04:39:02 +01:00
openhands
a1d47a20f2 fix: eliminate duplicate code blocks flagged by CI dup-detection
Use single-line conditionals for worktree check in PHASE:crashed handler
(phase-handler.sh) to break 5-line window match with idle_timeout case.
Slim dev-agent.sh crashed case to just restore_to_backlog since the
_on_phase_change callback handles full cleanup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 03:27:35 +00:00
openhands
cb1e45c4a8 supervisor: learned — PR CI vs Push CI mismatch causes silent stall in awaiting_review 2026-03-21 03:24:41 +00:00
openhands
7156f21e12 fix: extract restore_to_backlog() to eliminate duplicate label reset pattern
The cleanup_labels + curl POST + CLAIMED=false pattern was duplicated
across dev-agent.sh (idle_timeout and crashed cases) and phase-handler.sh
(PHASE:crashed handler), triggering duplicate-detection CI failure.

Extract restore_to_backlog() shared helper; call it from all three sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 02:14:47 +00:00
openhands
7f9cefa847 fix: PHASE:crashed unhandled in _on_phase_change / dev-agent callback (#339)
Add explicit PHASE:crashed case to _on_phase_change in phase-handler.sh:
logs crash, notifies Matrix, escalates to supervisor, restores backlog
label, preserves worktree if PR exists, cleans up temp files.

Add crashed case to dev-agent.sh post-loop case statement for
belt-and-suspenders cleanup matching the callback behavior.

Replaces the dead crash_recovery_failed case that was never triggered.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 01:31:20 +00:00
johba
e8dc145184 Merge pull request 'fix: Inner CI/review wait loops bypass exit_marker fast-path (#338)' (#442) from fix/issue-338 into main 2026-03-21 02:18:59 +01:00
openhands
e7be534c7d fix: Inner CI/review wait loops bypass exit_marker fast-path (#338)
Add exit_marker file check to the CI wait loop and review wait loop in
phase-handler.sh, matching the pattern already used in monitor_phase_loop
(agent-session.sh). This makes crash detection consistent across all
polling paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 00:55:38 +00:00
johba
6a499db011 Merge pull request 'fix: feat: supervisor as formula-driven agent — cron + Matrix escalation (#245)' (#441) from fix/issue-245 into main 2026-03-21 01:49:02 +01:00
openhands
52f7c4973e fix: address review — phase signal quoting, issue count limits, reply comment
- Fix critical: use double quotes for $PHASE_FILE in formula phase signal
- Fix low: use limit=50 for backlog/in-progress/blocked issue counts
- Fix nit: correct misleading comment about escalation reply timing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 00:39:58 +00:00
openhands
bfdc01202c fix: break duplicate window — add priority order line to supervisor prompt
The duplicate detector skips lines starting with # (treats as comments
even inside quoted strings). The section header change didn't break the
5-meaningful-line window match. Adding a non-comment content line does.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 00:32:54 +00:00
openhands
53169f2514 fix: add supervisor and predictor scripts to agent-smoke CI test
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 00:30:22 +00:00