Commit graph

666 commits

Author SHA1 Message Date
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
johba
05884c7d1e Merge pull request 'fix: fix: bundled dust cleanup — lib/matrix_listener.sh (#264)' (#431) from fix/issue-264 into main 2026-03-20 22:59:03 +01:00
openhands
f78fbc1da6 fix: bundled dust cleanup — lib/matrix_listener.sh (#264)
- Remove dead ROOM_ENCODED and EVENT_ID variables from matrix_listener.sh
  (were suppressed with SC2034 instead of removed)
- Remove dead REPO variable from dev-poll.sh and review-poll.sh
- Update header comment in matrix_listener.sh to list all 5 reply-routing
  cases (supervisor, gardener, dev, review, vault, action)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:40:31 +00:00
johba
e4d5058172 Merge pull request 'fix: feat: agents flush context to scratch file before compaction (#262)' (#430) from fix/issue-262 into main 2026-03-20 22:33:50 +01:00
openhands
26d20af48c fix: address review — scratch file survives crash, cap read size, fix instruction (#262)
- Remove SCRATCH_FILE from action-agent cleanup() trap so it survives crashes
- Change instruction to note contents already injected (avoid wasted tool call)
- Cap scratch file read at 8KB via head -c 8192
- Move predictor scratch instruction after formula (consistent placement)
- Remove redundant FINAL_PHASE re-reads in planner/predictor

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:58:32 +00:00
openhands
6405ac9837 fix: use shared scratch helpers in dev-agent and action-agent to eliminate duplicates (#262)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:47:22 +00:00
openhands
8d9e216e33 ci: retrigger after stale status (#262) 2026-03-20 20:22:56 +00:00
openhands
273e5ee53f supervisor: learned — False Positive: Shared Status File Causes Giant Age (29M+ min) 2026-03-20 20:14:15 +00:00
openhands
7199bbf9b5 fix: feat: agents flush context to scratch file before compaction (#262)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:12:45 +00:00
johba
edfdae9ad8 Merge pull request 'fix: P4 stale worktree sweep doesn't cover sup-retry-* worktrees (#253)' (#428) from fix/issue-253 into main 2026-03-20 20:54:03 +01:00
openhands
ec5c48ddf2 fix: P4 stale worktree sweep doesn't cover sup-retry-* worktrees (#253)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:45:21 +00:00
johba
0c317c0a90 Merge pull request 'fix: P2e and classify_pipeline_failure() use divergent infra heuristics (#251)' (#426) from fix/issue-251 into main 2026-03-20 20:40:59 +01: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
johba
a1ee1242ab Merge pull request 'fix: action-agent.sh fetches comments without bot filtering (#243)' (#424) from fix/issue-243 into main 2026-03-20 20:09:38 +01:00
openhands
5157064bf0 fix: action-agent.sh fetches comments without bot filtering (#243)
Resolve the bot username dynamically from CODEBERG_TOKEN via the /user
API endpoint and filter out bot comments from the prior-context section.
Additional bot accounts can be specified via CODEBERG_BOT_USERNAMES env
var (comma-separated).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:01:56 +00:00
johba
00d11efa82 Merge pull request 'fix: Stale lock path in existing dev-agent health check (line 373) (#242)' (#422) from fix/issue-242 into main 2026-03-20 19:54:02 +01:00
openhands
8fb6638589 fix: Stale lock path in existing dev-agent health check (line 373) (#242)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:44:59 +00:00
johba
d99be4db57 Merge pull request 'fix: lib/matrix_listener.sh: review case reads a separate /tmp/review-thread-map (col 2) instead of the standard THREAD_MAP (col 4) (#238)' (#421) from fix/issue-238 into main 2026-03-20 19:39:02 +01:00
openhands
db66e35556 fix: lib/matrix_listener.sh: review case reads a separate /tmp/review-thread-map (col 2) instead of the standard THREAD_MAP (col 4) (#238)
- matrix_listener.sh: review case now reads PR number from column 4 of
  the standard $THREAD_MAP instead of column 2 of /tmp/review-thread-map
- review-pr.sh: pass PR_NUMBER as context_tag (4th arg) to matrix_send
  so the standard MATRIX_THREAD_MAP has it in column 4; remove separate
  /tmp/review-thread-map write
- review-poll.sh: prune from MATRIX_THREAD_MAP instead of the removed
  /tmp/review-thread-map

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:21:42 +00:00
johba
258cc1d1e3 Merge pull request 'fix: dev-poll.sh has no explicit guard for action-labeled issues (#233)' (#414) from fix/issue-233 into main 2026-03-20 19:14:03 +01:00
johba
4377c0812f Merge pull request 'feat: disinto predictor — daily cron-driven formula (#406)' (#417) from action/issue-406 into main 2026-03-20 19:09:02 +01: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
3ea8c183a4 refactor: extract shared prompt footer and monitor loop into formula-session.sh
Eliminates 7 duplicate code blocks between planner-run.sh and predictor-run.sh
flagged by CI duplicate-detection. Adds build_prompt_footer() and
run_formula_and_monitor() helpers to lib/formula-session.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:41:52 +00:00
openhands
6fa1bf5ee9 feat: disinto predictor — daily cron-driven formula
Add predictor instance for disinto with formula-driven tmux session pattern
(same as planner-run.sh). Focuses on factory-specific signals: CI pipeline
trends, stale issues, agent health, and resource patterns. Files
prediction/unreviewed issues for the planner to triage.

- formulas/run-predictor.toml: 3-step formula (preflight, collect-signals,
  analyze-and-predict) targeting disinto infrastructure signals
- predictor/predictor-run.sh: thin cron wrapper using formula-session.sh
- Cron: 0 6 * * * (daily 06:00 UTC, 1h before planner at 07:00)
- Sources projects/disinto.toml

Closes #406
2026-03-20 17:29:49 +00:00
johba
0cfba943b7 Merge pull request 'fix: fix: disinto planner schedule — daily at 07:00 UTC (#407)' (#415) from action/issue-407 into main 2026-03-20 18:29:03 +01:00
openhands
911101479b fix: disinto planner schedule — daily at 07:00 UTC
- Cron: 0 7 * * * (daily 07:00, 1h after predictor at 06:00)
- Accept project TOML as argument (default: disinto)
- Remove stale "ALL projects" comment

Closes #407

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:21:33 +00:00
openhands
efe48d4adc ci: retrigger pipeline 2026-03-20 17:18:15 +00:00
openhands
3a1df8f233 fix: dev-poll.sh has no explicit guard for action-labeled issues (#233)
Add skip guards for `action`, `prediction/backlog`, and `prediction/unreviewed`
labels in both the orphan scan and backlog scan, matching the existing `formula`
guard pattern. Issues with these labels will no longer be picked up by dev-agent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:15:03 +00:00
johba
6e1fd6afde Merge pull request 'fix: Clarify sense-process resource profile — 'change nothing' is inaccurate for docker-based processes (#229)' (#413) from fix/issue-229 into main 2026-03-20 18:09:03 +01:00
openhands
eb0ee66c8f fix: Clarify sense-process resource profile — 'change nothing' is inaccurate for docker-based processes (#229)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:00:21 +00:00
johba
dd7860ae3f Merge pull request 'fix: Resolve 'formula' terminology conflict between AGENTS.md and EVIDENCE-ARCHITECTURE.md (#228)' (#412) from fix/issue-228 into main 2026-03-20 17:54:41 +01: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
ae3d58f355 Merge pull request 'fix: Add 'Status: Planned Architecture' banner to EVIDENCE-ARCHITECTURE.md (#227)' (#402) from fix/issue-227 into main 2026-03-20 17:44:03 +01: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
8ddfbfe492 fix: address review — reword banner, mark partial items (#227)
- Reword banner to avoid false 'not yet implemented' absolute claim
- Change document-level label from 'Planned Architecture' to 'Partially Implemented'
- Mark Protocol and User experience rows as **Partial** (upstream scripts exist but no evidence output yet)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 15:44:40 +00:00
openhands
9505f0b825 fix: Add 'Status: Planned Architecture' banner to EVIDENCE-ARCHITECTURE.md (#227)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 15:40:38 +00:00
johba
1fb6f0a032 Merge pull request 'fix: fix: .env contains harb-specific defaults that leak into non-harb sessions (#398)' (#399) from fix/issue-398 into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/399
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-20 16:38:30 +01:00
openhands
d05a62bee0 fix: .env contains harb-specific defaults that leak into non-harb sessions (#398)
Remove per-project settings from .env.example and env.sh defaults:
- CODEBERG_REPO no longer defaults to johba/harb
- WOODPECKER_REPO_ID no longer defaults to 2
- Remove deprecated HARB_REPO_ROOT alias
- .env.example now points to projects/*.toml for per-project config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:38:08 +01:00
johba
6f5888c561 Merge pull request 'fix: fix: planner formula — MEMORY.md should be committed in PR, not gitignored (#397)' (#401) from fix/issue-397 into main 2026-03-20 16:34:03 +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
johba
de26c4d073 Merge pull request 'fix: dev/dev-agent.sh:334 — 'in-progress' label still passed as string name to POST /labels (#222)' (#389) from fix/issue-222 into main 2026-03-20 15:55:57 +01:00
openhands
def1ba7814 fix: use numeric IN_PROGRESS_LABEL_ID in DELETE calls (cleanup_labels and cleanup)
Review caught that cleanup_labels() and cleanup() still used the
string name 'in-progress' in DELETE /labels/ URL paths. Switched
both to use ${IN_PROGRESS_LABEL_ID} so label removal actually works
on abort/crash.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:45:03 +00:00
openhands
613c6c12cb fix: dev/dev-agent.sh:334 — 'in-progress' label still passed as string name to POST /labels (#222)
Look up IN_PROGRESS_LABEL_ID via the labels API (with hardcoded
fallback) and pass the numeric ID to POST /issues/{id}/labels,
matching the pattern already used for BACKLOG_LABEL_ID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:25:00 +00:00
johba
b8ab768036 Merge pull request 'fix: DELETE /issues/{id}/labels/backlog uses label name not numeric ID (#214)' (#386) from fix/issue-214 into main 2026-03-20 15:19:02 +01:00
openhands
99a68d3ef5 fix: DELETE /issues/{id}/labels/backlog uses label name not numeric ID (#214)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:09:44 +00:00
johba
3e36709f92 Merge pull request 'fix: fix: planner runs directly from cron — no action issues (#359)' (#384) from fix/issue-359 into main 2026-03-20 15:01:33 +01: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
johba
e47b1967c4 fix: fix: phase handler CI poll uses stale SHA — re-fetch worktree HEAD each cycle (#370) (#380)
Fixes #370

## Changes
Re-fetch CI_CURRENT_SHA from worktree HEAD on each CI poll cycle inside the awaiting_ci handler. Previously the SHA was captured once before the loop, causing stale-SHA polling when Claude pushed new commits mid-wait.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/380
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-20 14:29:57 +01:00
johba
3f93554430 Merge pull request 'fix: fix: gardener runs as cron-driven formula — runtime wrapper (#246)' (#381) from fix/issue-246 into main 2026-03-20 14:29:03 +01:00