Commit graph

640 commits

Author SHA1 Message Date
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
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
59b6d76afa fix: extract file_action_issue helper to eliminate duplicate code blocks
CI duplicate-detection flagged shared action-issue filing pattern between
gardener-run.sh and planner-poll.sh. Extract into lib/file-action-issue.sh
and refactor both scripts to use it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 12:49:08 +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
johba
f039507fca Merge pull request 'fix: fix: dev-poll spawns duplicate agents — no tmux session guard (#371)' (#372) from fix/issue-371 into main 2026-03-20 13:19:11 +01:00
openhands
9c51f4dbe2 fix: agent-smoke get_fns — use literal [ \t] for busybox awk compat
Busybox awk in Alpine CI has incomplete POSIX character class support;
[[:space:]] intermittently fails to match, causing function definitions
to be missed from LIB_FUNS. Replace with literal [ \t] patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 12:02:40 +00:00
openhands
c3714380d7 fix: agent-smoke — explicit source for gardener monitor_phase_loop
Add lib/agent-session.sh as explicit extra definition source for the
gardener-agent.sh check in agent-smoke.sh. Alpine busybox awk in CI
intermittently fails to resolve monitor_phase_loop from LIB_FUNS;
listing it as a direct cross-source makes the check robust.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:46:40 +00:00
openhands
1d797c0303 fix: address review — guard before CI counter, cover all spawn points
- Move tmux session guard BEFORE handle_ci_exhaustion in both CI-fix
  paths so poll cycles with an active session don't waste fix attempts
- Add tmux guards to recovery spawn (orphan, no PR) and both
  agent-merge fallback paths (orphan + stuck-PR)
- Use continue instead of exit 0 when guard fires in stuck-PR loop
  so remaining PRs are still checked

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:45:19 +00:00
openhands
4feb1fba97 fix: dev-poll spawns duplicate agents — no tmux session guard (#371)
Add tmux has-session check before spawning dev-agent.sh at all four
spawn points (orphan REQUEST_CHANGES, orphan CI fix, stuck-PR
REQUEST_CHANGES, stuck-PR CI fix). If a tmux session already exists
for the issue, log and skip instead of spawning a duplicate agent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:45:19 +00:00
johba
86070ceef7 fix: feat: gardener formula — steps and recipes (#363) (#366)
Fixes #363

## Changes
Created formulas/run-gardener.toml with 7 steps: preflight (pull latest), agents-update (AGENTS.md watermark check), stale-pr-cleanup (ping/close inactive PRs), dust-bundling (group trivial issues into bundles of 3+), ci-health (detect systemic CI failures), blocked-review (triage blocked issues per #352), and commit-and-pr (single commit with all file changes). No memory, no journal. All git writes collected in the final commit-and-pr step; API calls happen during the run. Steps follow the established formula TOML format with needs dependencies.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/366
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-20 12:11:58 +01:00
johba
06f8e3fcba Merge pull request 'fix: too_large branch still uses string label '"underspecified"' (#213)' (#362) from fix/issue-213 into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/362
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-20 11:19:46 +01:00
openhands
a58aef90d3 fix: too_large branch still uses string label '"underspecified"' (#213)
Look up UNDERSPECIFIED_LABEL_ID via the Gitea labels API (with fallback)
and use the numeric ID in both phase-handler.sh (PHASE:failed/too_large)
and dev-poll.sh (preflight too_large), matching the pattern already used
for BACKLOG_LABEL_ID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:50:20 +00:00
johba
ff32124508 Merge pull request 'fix: feat: planner triages prediction/unreviewed issues alongside gap analysis (#142)' (#358) from fix/issue-142 into main 2026-03-20 10:44:02 +01: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
johba
c76487c811 Merge pull request 'fix: feat: planner as cron-driven formula (no issue tracking) (#232)' (#356) from fix/issue-232 into main 2026-03-20 10:19:02 +01:00
openhands
898f958196 fix: add model=opus to run-planner formula and wire through action-agent
TOML declares model = "opus". planner-poll.sh includes model: opus in
the issue YAML front matter. action-agent.sh extracts it and exports
CLAUDE_MODEL. create_agent_session passes --model to claude if set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:08:17 +00:00
openhands
20dc185a28 chore: retrigger CI (smoke test passed locally)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:02:37 +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
johba
b4dce50f2c Merge pull request 'fix: fix: guard blocks merge injection — Claude closes issue without merging (#344)' (#351) from fix/issue-344 into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/351
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-20 08:53:19 +01:00
openhands
6f30614dda fix: fix: guard blocks merge injection — Claude closes issue without merging (#344)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 07:37:32 +00:00
johba
b78b22d830 fix: fix: dev-poll backlog selection is LIFO — should be FIFO (#349) (#350)
Fixes #349

## Changes
Add &sort=oldest to the backlog API call in dev/dev-poll.sh (line 401) so issues are picked FIFO instead of the Gitea default LIFO order.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/350
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-20 08:33:03 +01:00
johba
acd65e3bed Merge pull request 'fix: ci_required_for_pr should paginate /pulls/{pr}/files (#273)' (#346) from fix/issue-273 into main 2026-03-20 08:09:42 +01:00
openhands
2a3e5eef90 fix: ci_required_for_pr should paginate /pulls/{pr}/files (#273)
Replace single-page curl fetch with codeberg_api_all() which paginates
through all pages of PR files. This ensures large PRs with 50+ files
correctly detect code files on all pages, preventing CI from being
incorrectly bypassed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 06:55:00 +00:00
johba
e0a1c67224 Merge pull request 'fix: feat: StopFailure hook writes phase file on API error / rate limit (#275)' (#340) from fix/issue-275 into main 2026-03-20 07:30:10 +01:00
openhands
f66fcd666c fix: address review — terminal phase guard, explicit marker var, test coverage
- Guard against overwriting terminal phases (PHASE:done, PHASE:merged)
  in on-stop-failure.sh to prevent false failures from same-turn race
- Declare sf_phase_marker explicitly in StopFailure block instead of
  relying on phase_marker from PostToolUse block
- Add authentication_failed test (10c) and terminal phase guard tests
  (10g, 10h)
- Fix fragile nested command substitution in test 10f fail() message

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 01:52:46 +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