Commit graph

43 commits

Author SHA1 Message Date
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
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
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
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
openhands
d8244742f1 fix: feat: supervisor as formula-driven agent — cron + Matrix escalation (#245)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 00:22:37 +00:00
openhands
42620a1341 fix: No combined wall-clock + idle cap for action-agent sessions (#334)
Add ACTION_MAX_LIFETIME env var (default 8h) that caps total session
wall-clock time independently of ACTION_IDLE_TIMEOUT.  A background
watchdog sleeps for the remaining lifetime and, when triggered, kills
the tmux session, posts a summary comment on the issue, writes
PHASE:failed with a max_lifetime reason, and escalates to the
supervisor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:51:46 +00:00
openhands
e3895ad3ac fix: feat: SessionStart compact hook re-injects phase protocol after context compaction (#274)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:27:32 +00:00
openhands
a3ca4b55b8 fix: Shared monitor_phase_loop idle_prompt behaviour undocumented for future agents (#265)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 22:07:00 +00:00
openhands
3cd047a7e0 fix: P2e and classify_pipeline_failure() use divergent infra heuristics (#251)
Extract shared is_infra_step() in lib/ci-helpers.sh capturing the union of
infra-detection heuristics from both P2e and classify_pipeline_failure():
- Clone/git step exit 128 (connection failure)
- Any step exit 137 (OOM/signal 9)
- Log-pattern matching (timeouts, connection failures)

Update classify_pipeline_failure() to use is_infra_step() with log fetching
and "any infra step" aggregation (matching P2e semantics). Simplify P2e to
delegate to classify_pipeline_failure(). Update P2f caller for new output
format ("infra <reason>").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:19:29 +00:00
openhands
0aa6528709 fix: address review — WOODPECKER_SERVER var, update AGENTS.md for new predictor
- Fix bug: replace WOODPECKER_URL with WOODPECKER_SERVER throughout
  run-predictor.toml (CI trends were silently skipped)
- Update AGENTS.md: new Predictor section reflecting predictor/ directory,
  formula-based architecture, daily 06:00 cron, supersedes legacy
  prediction-agent.sh
- Update directory layout, formula-session.sh sourced-by list, label table,
  and planner future-direction anchor
- Remove redundant Completion section from formula (PROMPT_FOOTER handles it)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:00:21 +00:00
openhands
eedb3c7045 fix: Resolve 'formula' terminology conflict between AGENTS.md and EVIDENCE-ARCHITECTURE.md (#228)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:50:58 +00:00
johba
a15623b747 fix: fix: action-agent shares phase handler with dev-agent — review lifecycle + cleanup (#388) (#403)
Fixes #388

## Changes
Action-agent now sources dev/phase-handler.sh and enters monitor_phase_loop after prompt injection. Two paths: (A) git output triggers the same PR/CI/review lifecycle as dev-agent, (B) no-git output writes PHASE:done for cleanup. Adds docker compose down on terminal phases, escalation to supervisor on idle timeout, and proper temp file cleanup.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/403
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-20 17:39:44 +01:00
openhands
522c035f80 fix: planner formula — MEMORY.md should be committed in PR, not gitignored (#397)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 15:25:28 +00:00
openhands
5bac4a8409 fix: extract lib/formula-session.sh to eliminate duplicate code blocks
Shared helpers for formula-driven cron agents: lock, memory guard,
formula loading, context building, session startup, crash recovery.

- planner-run.sh uses shared helpers instead of inline code
- gardener-agent.sh delegates crash recovery to formula_phase_callback
- agent-smoke.sh updated for renamed planner script + new lib file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:53:33 +00:00
openhands
6d9d027d5e fix: planner runs directly from cron — no action issues (#359)
- Rename planner-poll.sh → planner-run.sh: direct cron executor that
  creates a tmux session with Claude (opus), injects the formula as
  context, monitors phase file, handles crash recovery and cleanup.
  No action issues, no action-poll dependency.

- Source disinto project config explicitly (projects/disinto.toml)
  instead of defaulting to harb via env.sh.

- Update formulas/run-planner.toml (v2): remove agents-update step
  (now handled by gardener per #246), add journal-and-memory step
  (daily journal entries committed to git + local MEMORY.md update),
  add commit-and-pr step (one commit, one PR per run).

- Create planner/journal/ directory for daily raw logs.

- Update crontab: weekly Sunday 6AM call to planner-run.sh.

- Update AGENTS.md to reflect new architecture.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:40:09 +00:00
openhands
cc6a958245 fix: address review — guard grooming in gardener-poll.sh, doc fixes
- Add --recipes-only flag to gardener-poll.sh to skip grooming call when
  invoked by the formula's ci-escalation-recipes step (prevents double-run)
- Update formula step to pass --recipes-only
- Add lib/file-action-issue.sh to AGENTS.md shared helpers table
- Clarify TOML arg scope in gardener trigger description
- Fix log prefixes in gardener-run.sh (poll: → run:)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:02:33 +00:00
openhands
eb90a42095 fix: gardener runs as cron-driven formula — runtime wrapper (#246)
Add gardener-run.sh as a thin cron wrapper that files an action issue
referencing formulas/run-gardener.toml, following the same pattern as
planner-poll.sh. The action-agent picks up the issue and executes the
gardener formula steps in an interactive Claude session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 12:44:02 +00:00
openhands
dd61f6438e fix: address review — disambiguate label placeholders, relabel before close
- Rename <backlog_label_id> in WATCH path to <prediction_backlog_label_id>
  to avoid collision with the plain backlog label in strategic-planning
- Add prediction/actioned relabeling before close for PROMOTE and DISMISS
  paths so closed predictions are distinguishable from unprocessed ones
- Make step 4 comment format consistent with step 5: "Actioned as #NNN —
  <reasoning>" everywhere
- Add step 3b for explicit label ID resolution with create-if-missing for
  the new prediction/actioned label
- Document prediction/* and action labels in AGENTS.md label table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:36:37 +00:00
openhands
6f75ab0a04 fix: feat: planner triages prediction/unreviewed issues alongside gap analysis (#142)
Expand the triage-predictions step in run-planner.toml with four explicit
triage actions (PROMOTE_ACTION, PROMOTE_BACKLOG, WATCH, DISMISS), each
with API execution details and mandatory reasoning comments. Promoted
predictions now close the original with "Actioned as #NNN" and compete
with vision gaps for the per-cycle 5-issue limit in strategic-planning.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:28:24 +00:00
openhands
6c7557e87b fix: feat: planner as cron-driven formula (no issue tracking) (#232)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:00:56 +00:00
openhands
eaf2841494 fix: feat: StopFailure hook writes phase file on API error / rate limit (#275)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 01:43:00 +00:00
openhands
6ad4161f76 fix: bundled dust cleanup — AGENTS.md (#328)
- Add phase-handler.sh to dev/ directory listing (#216)
- Update agent count from six to eight, add action+predictor (#324)
- Add action-agent.sh to lib/agent-session.sh Sourced by column (#326)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:35:05 +00:00
openhands
424a53c9f7 fix: feat: stream action-agent Claude output to Matrix thread (#293)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 23:43:29 +00:00
openhands
ad62402982 fix: update Planner future-direction note to reflect live Predictor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 23:30:30 +00:00
openhands
6045cfa7d2 fix: prediction-agent / predictor not documented in AGENTS.md agent list (#307)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 23:15:34 +00:00
openhands
48dbab215d fix: feat: planner triages prediction/unreviewed issues before gap analysis (#304)
Add Phase 1.5 to planner-agent.sh between AGENTS.md update (Phase 1) and
gap analysis (Phase 2). The new phase fetches all prediction/unreviewed
issues, asks Claude (Sonnet, one-shot) to triage each as ACCEPT_ACTION,
ACCEPT_BACKLOG, or DISMISS, then:
- Creates action issues (with formula YAML front matter) or backlog issues
- Relabels accepted predictions: prediction/unreviewed → prediction/backlog
- Closes dismissed predictions with a reason comment
- Passes accepted predictions as context into Phase 2 gap analysis

Creates prediction/backlog label on first run if missing. Validates emitted
formula names against on-disk formulas/*.toml catalog.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:44:39 +00:00
openhands
ac04dc29a6 fix: feat: PostToolUse hook detects phase file writes in real-time (eliminates polling latency) (#278)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 17:55:06 +00:00
johba
d5c2c213a3 fix: bug: gardener hangs forever when Claude finishes without writing phase file (#261) (#263)
Fixes #261

## Changes
Fixed gardener hanging forever when Claude skips phase protocol. Three changes: (1) gardener-agent.sh: replaced 999999s timeout with 7200s (2h, matching dev-agent); (2) lib/agent-session.sh: added idle-prompt detection to monitor_phase_loop — if Claude returns to the ❯ prompt for 3 consecutive polls with no phase file written, exits immediately with _MONITOR_LOOP_EXIT=idle_prompt (only fires when phase file is empty, so awaiting_ci/review waits are unaffected); (3) gardener prompt: removed 'no time limit' wording, replaced with explicit phase-write requirement.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/263
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-19 13:47:10 +01:00
openhands
97ffdca95c fix: address review feedback on escalation triage (#185)
- supervisor-poll.sh: check PR state before retrigger; discard stale escalations
  for closed/merged PRs instead of pushing to their branches
- supervisor-poll.sh: bump escalation ts to now on failed retrigger push, so
  the 30-min cooldown resets and alert flooding is avoided on persistent failures
- ci-helpers.sh: require at least one confirmed infra step before returning
  "infra"; prevents false-positive when all step names are empty strings
- ci-helpers.sh: clarify header comment to distinguish per-function requirements
- AGENTS.md: document classify_pipeline_failure() in ci-helpers.sh table row

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 09:03:03 +00:00
openhands
4e56d14e6a fix: feat: action-agent — tmux + Claude + formula for operational tasks (#139)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 07:25:25 +00:00
openhands
6c458b43fb chore: planner update AGENTS.md tree 2026-03-19 07:05:40 +00:00
openhands
cac012219a fix: remove phase-handler.sh from agent-session.sh Sourced-by column
phase-handler.sh does not source agent-session.sh directly — dev-agent.sh
sources agent-session.sh first, then sources phase-handler.sh. Correct
the Sourced-by entry to: dev-agent.sh, gardener-agent.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:28:57 +00:00
openhands
62acdab6ea fix: fix: bundled dust cleanup — AGENTS.md (#211)
- #167: replace manually-maintained shellcheck file list with glob (git ls-files '*.sh' | xargs shellcheck)
- #188: add missing functions to lib/agent-session.sh table entry (monitor_phase_loop, create_agent_session, read_phase, inject_formula) and update Sourced-by column
- #166: agent-session.sh entry already present; Sourced-by updated to include dev-agent.sh and phase-handler.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:15:43 +00:00
openhands
f73d5f471e fix: feat: dev-agent merges its own PRs via non-admin Codeberg account (#172)
- phase-handler.sh: remove do_merge(); on APPROVAL inject exact API
  commands for agent to merge+close directly; PHASE:done now only
  does local cleanup (tmux, worktree, labels) — merge already done
- dev-agent.sh: update PHASE_PROTOCOL_INSTRUCTIONS — Approved means
  merge via API, close issue, then write PHASE:done
- dev-poll.sh: remove try_merge_or_rebase(); for approved+CI-green
  orphaned PRs, spawn dev-agent (recovery mode) to merge instead
- .env.example: document new token roles (CODEBERG_TOKEN = bot for
  push/PR/merge; REVIEW_BOT_TOKEN = human account for approvals)
- AGENTS.md: update token descriptions to match new roles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:59:36 +00:00
johba
d27f6bcb99 fix: refactor: slim dev-agent.sh to use lib/agent-session.sh (#160) (#173)
Fixes #160

## Changes
Extracted phase callback functions (post_refusal_comment, do_merge, _on_phase_change) from dev/dev-agent.sh into new dev/phase-handler.sh. dev-agent.sh now sources both lib/agent-session.sh and dev/phase-handler.sh. Replaced inline dependency extraction with lib/parse-deps.sh. dev-agent.sh reduced from 1516 to 684 lines (55% reduction). AGENTS.md shellcheck command updated to include the new files.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/173
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-18 16:52:14 +01:00
johba
6d5cc4458f fix: feat: gardener-agent.sh — tmux + Claude interactive gardener using agent-session.sh (#159) (#163)
Fixes #159

## Changes
Add gardener-agent.sh (tmux+Claude) and lib/agent-session.sh (shared helpers). gardener-poll.sh slimmed to cron wrapper; grooming delegated to new agent; recipe engine for CI escalations unchanged.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/163
Reviewed-by: review_bot <review_bot@noreply.codeberg.org>
2026-03-18 16:21:07 +01:00
openhands
f18537dd2a fix: address review feedback — AGENTS.md factual accuracy
- Planner: both phases use claude -p (one-shot), not interactive
- Vault: document auto-approve/auto-reject paths, not just human escalation
- CHECK_INFRA_RETRY: env var only, not a TOML toggle — separated from TOML keys
- underspecified label: also set by dev-agent.sh mid-run, not just dev-poll
- ci-helpers.sh: add missing review-poll.sh to sourced-by list
- parse-deps.sh: note it is executed via bash, not sourced
- vault: add PROMPT.md to key files list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 03:51:26 +00:00
openhands
66de31ce63 fix: AGENTS.md absent from entire repository (#57)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 03:41:46 +00:00
openhands
8e600787c1 fix: ci_passed() still lives in dev/dev-poll.sh, not lib/ (#70)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 02:05:54 +00:00
review_bot
ee881086d3 feat: add disinto.ai landing page to repo (#91)
## Summary
- Move the static landing page from the standalone `disinto-site` directory into `site/` so it lives in the repo
- Includes `index.html`, optimized images (`al76.jpg`, `al76.webp`), and the original magazine cover (`amazing-stories-1942.jpg`)
- Skipped the large `al76.png` (3MB) since the HTML only references the `.jpg` and `.webp` versions

## Test plan
- [ ] Verify `site/index.html` renders correctly when served
- [ ] Confirm images load properly with relative paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/91
Co-authored-by: review_bot <review_bot@noreply.codeberg.org>
Co-committed-by: review_bot <review_bot@noreply.codeberg.org>
2026-03-17 23:11:40 +01:00
openhands
2b534bb7ec fix: address review findings from issue #79 phase protocol
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 19:27:11 +00:00
openhands
275b92e8b5 fix: address review findings from issue #79 phase protocol
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 19:21:01 +00:00
openhands
d87b7db8f3 fix: feat: define phase-signaling protocol for persistent Claude sessions (#79)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 18:53:15 +00:00