Commit graph

723 commits

Author SHA1 Message Date
openhands
ab8f88303c fix: fix: check_active guard should log to stderr when skipping — silent agent dropout on missing state file (#663)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 08:00:29 +00:00
johba
4f47f90c12 Merge pull request 'fix: fix: Woodpecker CI not wired during disinto init — OAuth2 app never created, no CI runs (#661)' (#672) from fix/issue-661 into main 2026-03-25 08:54:07 +01:00
openhands
a9c4394f39 chore: re-trigger CI 2026-03-25 07:48:24 +00:00
openhands
c02a0b29d2 fix: fix: Woodpecker CI not wired during disinto init — OAuth2 app never created, no CI runs (#661)
Split setup_woodpecker() into create_woodpecker_oauth() (pre-compose) and
activate_woodpecker_repo() (post-compose) so OAuth2 creds are in .env before
Woodpecker starts, and repo activation happens after the stack is up.

- Add ports: ["8000:8000"] to Woodpecker service in generate_compose()
- Fix .env var names: WP_FORGEJO_CLIENT/SECRET to match compose references
- Reorder disinto_init(): OAuth2 creation before compose up, repo activation after
- activate_woodpecker_repo() polls Woodpecker readiness with retry loop

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 07:43:59 +00:00
johba
8dd9024204 Merge pull request 'chore: planner run — prerequisite tree update' (#669) from chore/planner-20260325-0722 into main 2026-03-25 08:34:09 +01:00
johba
7af70e9099 Merge pull request 'fix: fix: agents container cannot reach Forgejo — lib/env.sh overrides compose FORGE_URL with .env localhost (#660)' (#662) from fix/issue-660 into main 2026-03-25 08:33:41 +01:00
openhands
b7976fcce4 chore: planner run 2026-03-25
- Triaged 6 predictions: 2 promoted (#663, #664), 1 watched, 3 dismissed
- Updated prerequisite tree: #568 DONE, #466 ESCALATED, added operational reliability objective
- Filed 3 issues: #663 (guard logging), #664 (stale phase cleanup), #668 (init smoke test)
- Prioritized top 5 constraints: #466, #661, #663, #664, #668
2026-03-25 07:22:42 +00:00
openhands
709217af33 fix: agents container cannot reach Forgejo — lib/env.sh overrides compose FORGE_URL with .env localhost (#660)
Skip sourcing .env/.env.enc when DISINTO_CONTAINER=1 since compose
already injects the correct env vars via env_file + environment
overrides.  Re-sourcing .env was clobbering compose-level values
like FORGE_URL=http://forgejo:3000 with the localhost default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 07:10:55 +00:00
johba
47fd876813 Merge pull request 'chore: gardener housekeeping' (#654) from chore/gardener-20260325-0606 into main 2026-03-25 08:04:07 +01:00
johba
b41929df19 Merge pull request 'fix: fix: setup_forge silently fails to create users and tokens — .env has no FORGE_TOKEN after init (#658)' (#659) from fix/issue-658 into main 2026-03-25 07:59:51 +01:00
openhands
b361eba2bb fix: setup_forge silently fails to create users and tokens — .env has no FORGE_TOKEN after init (#658)
Add database readiness check (retry loop on `forgejo admin user list`) after
API becomes reachable to avoid the race where HTTP is up but SQLite isn't
accepting writes yet.

Remove `2>/dev/null || true` from user creation commands so failures are
logged with the actual error message. Verify each user exists via API after
creation. Fail init with a clear error if admin token, bot user creation,
or bot token creation fails — instead of silently writing an incomplete .env.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 06:51:47 +00:00
johba
55bed9dc6f Merge pull request 'fix: fix: dev-agent worktree pushes to origin (Codeberg) instead of forgejo (local) — PR creation fails (#653)' (#657) from fix/issue-653 into main 2026-03-25 07:38:40 +01:00
openhands
ac5448323b fix: dev-agent worktree pushes to origin (Codeberg) instead of forgejo (local) — PR creation fails (#653)
Detect which git remote matches FORGE_URL by comparing the host portion
of FORGE_URL against remote push URLs.  Store the result in FORGE_REMOTE
(defaults to "origin" when no match — preserving existing behavior for
Codeberg-direct setups).

Replace every hardcoded "origin" in fetch, push, worktree-add, and
prompt-injection commands across:
- dev/dev-agent.sh (worktree setup, phase protocol prompt)
- dev/phase-handler.sh (CI retrigger, review feedback, rebase instructions)
- review/review-poll.sh (review feedback injection)
- action/action-agent.sh (worktree setup, push instructions)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 06:17:34 +00:00
openhands
40093e92e2 chore: gardener housekeeping 2026-03-25 2026-03-25 06:06:48 +00:00
johba
0e5090bd51 Merge pull request 'fix: bind-mount host Claude credentials instead of empty Docker volume' (#651) from fix/claude-auth-bind-mount into main 2026-03-25 06:49:02 +01:00
johba
632508e18e fix: bind-mount host Claude credentials instead of empty Docker volume
Replace the claude-auth named Docker volume with bind mounts to the host
user's ~/.claude/ and ~/.claude.json. The named volume creates an empty
directory, so the agents container cannot authenticate with Claude CLI.

Bind-mounting from ${HOME} ensures the container picks up existing
credentials without manual intervention.

Closes codeberg.org/johba/disinto/issues/633

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 05:42:50 +00:00
johba
c63c6a4e6e Merge pull request 'fix: Add Dendrite to docker-compose stack (#619)' (#650) from fix/issue-619 into main 2026-03-25 01:39:03 +01:00
openhands
a0cdf87a21 fix: move setup_matrix after compose up, use Python for .env writes
- Critical: setup_matrix now runs after docker compose up -d so Dendrite
  is actually running when provisioning is attempted
- Minor: replace sed with Python for .env credential writes to avoid
  delimiter collisions with opaque Matrix access tokens
- Info: update matrix_listener.sh header to mention container mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:35:20 +00:00
openhands
b86edd7e5d fix: Add Dendrite to docker-compose stack (#619)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:28:04 +00:00
johba
df640af7c1 Merge pull request 'chore: gardener housekeeping' (#649) from chore/gardener-20260325-0007 into main 2026-03-25 01:14:46 +01:00
openhands
b8dc01b06f chore: gardener housekeeping 2026-03-25 2026-03-25 00:07:52 +00:00
johba
6afc7f183f Merge pull request 'fix: fix: disinto init fails on minimal Debian — crontab command not found (#638)' (#648) from fix/issue-638 into main 2026-03-24 23:44:02 +01:00
openhands
bc2df1a2c7 fix: disinto init fails on minimal Debian — crontab command not found (#638)
In compose mode, skip host cron installation entirely since the agents
container runs cron internally via entrypoint.sh. In bare mode, check
for crontab before attempting to install entries and produce a clear
error with install instructions if missing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:40:35 +00:00
johba
ac2a41a097 Merge pull request 'fix: fix: agents Dockerfile fails to build — cli.anthropic.com DNS does not resolve (#637)' (#647) from fix/issue-637 into main 2026-03-24 23:34:02 +01:00
openhands
7844b29a37 fix: agents Dockerfile fails to build — cli.anthropic.com DNS does not resolve (#637)
- Remove curl|sh Claude CLI download from Dockerfile (no internet needed)
- Mount host Claude CLI binary into container via docker-compose volume
- generate_compose() resolves host claude path at init time
- entrypoint.sh fails fast with clear error if claude CLI is missing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:26:26 +00:00
johba
d7d2d1e12f Merge pull request 'fix: fix: setup_forge runs forgejo admin commands as root — Forgejo refuses to execute (#636)' (#646) from fix/issue-636 into main 2026-03-24 23:19:02 +01:00
openhands
f30c56769a fix: setup_forge runs forgejo admin commands as root — Forgejo refuses to execute (#636)
Add -u git to docker exec and docker compose exec calls in _forgejo_exec()
so Forgejo admin commands run as the git user instead of root.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:15:00 +00:00
johba
3cf40b1f4c Merge pull request 'fix: fix: Docker-in-LXD — su-exec spins at 100% CPU due to AppArmor blocking setuid (#635)' (#645) from fix/issue-635 into main 2026-03-24 23:09:02 +01:00
openhands
0b54f5e9e9 fix: Docker-in-LXD — su-exec spins at 100% CPU due to AppArmor blocking setuid (#635)
Add security_opt: [apparmor=unconfined] to all three compose services
(forgejo, woodpecker, agents) in generate_compose(). This prevents
su-exec from entering an infinite CPU loop when Docker runs inside an
LXD container whose default AppArmor profile blocks setuid/execve.
Harmless on bare-metal Docker hosts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:05:14 +00:00
johba
1c3f845115 Merge pull request 'fix: fix: Forgejo compose template missing INSTALL_LOCK — API returns 404 until manual install (#634)' (#641) from fix/issue-634 into main 2026-03-24 22:59:02 +01:00
openhands
5a9ceee1ad fix: Forgejo compose template missing INSTALL_LOCK — API returns 404 until manual install (#634)
Add FORGEJO__security__INSTALL_LOCK: "true" to the forgejo service
environment in generate_compose(). Without this, Forgejo starts in
install-wizard mode and the API returns 404 for all endpoints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:55:02 +00:00
johba
4a10dfeae8 Merge pull request 'fix: fix: docker-compose uses forgejo/forgejo:latest which does not exist on any registry (#633)' (#639) from fix/issue-633 into main 2026-03-24 22:49:02 +01:00
openhands
d3896043d6 fix: docker-compose uses forgejo/forgejo:latest which does not exist on any registry (#633)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:45:17 +00:00
johba
5107e2e9df Merge pull request 'fix: Project knowledge graph for structural defect detection (#629)' (#632) from fix/issue-629 into main 2026-03-24 22:39:02 +01:00
openhands
4d429b274a fix: use undirected reachability for reviewer affected-objectives tracing
The directed graph has mixed edge directions along the path from
agent/formula to objective (agent→formula→label←issue→objective),
so descendants() never reaches objectives.  Use undirected connected
components for reachability instead.  Also fix closed-issues query
to use forge_get (bounded at 50) instead of forge_get_all (unbounded).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:31:55 +00:00
openhands
3a7b95046d fix: Project knowledge graph for structural defect detection (#629)
Add lib/build-graph.py that builds a NetworkX DiGraph from project docs
and forge API, runs structural analyses (orphans, cycles, disconnected
clusters, thin objectives, bottlenecks), and outputs a JSON report.

Predictor and reviewer agents now call build-graph.py before launching
their Claude sessions and inject the report as context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:24:20 +00:00
johba
e0b70d67f4 Merge pull request 'fix: fix: stale phase file poisons recovery — clear before respawn (#628)' (#631) from fix/issue-628 into main 2026-03-24 22:04:02 +01:00
openhands
a5cbd30bb6 fix: stale phase file poisons recovery — clear before respawn (#628)
- Clear phase file after reading it in recovery mode so new sessions
  start clean instead of inheriting stale state
- When last phase was escalate, tell Claude "previous session escalated —
  starting fresh" instead of "resume from escalate" to prevent re-escalation
- Add explicit "PR already exists — do NOT create a new PR" instructions
  to recovery prompt to prevent Claude from calling forge API directly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:56:41 +00:00
johba
fda8e99634 Merge pull request 'fix: feat: gardener recycles stale failed PRs back to backlog (#626)' (#630) from fix/issue-626 into main 2026-03-24 21:55:23 +01:00
openhands
a5c141ce92 fix: feat: gardener recycles stale failed PRs back to backlog (#626)
Add stale-pr-recycle step to the gardener formula that detects open PRs
with failed CI older than 24 hours and no active tmux session. Stale PRs
are closed with a comment, and the linked issue is relabeled from
in-progress to backlog so dev-poll picks it up for a fresh attempt.

Also adds close_pr manifest action to the gardener executor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:48:55 +00:00
johba
9a9b82eea5 Merge pull request 'fix: Containerize full stack with docker-compose (#618)' (#625) from fix/issue-618 into main 2026-03-24 21:43:39 +01:00
johba
a4fdebce67 Merge pull request 'fix: escalation notifications should @mention human on Matrix (#624)' (#627) from fix/issue-624 into main 2026-03-24 21:39:02 +01:00
openhands
4f99a7a26a fix: Clean up decrypted secrets on failure, verify Claude CLI install (#618)
Add EXIT trap in disinto_up() so the plaintext .env is removed even if
docker compose up fails.  Previously set -euo pipefail would abort
before the cleanup block, leaving secrets on disk.

Replace the silent || true in the Dockerfile with an explicit
claude --version check so the build fails visibly if the CLI cannot
be installed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:36:55 +00:00
openhands
0aa3890fb8 fix: Start cron daemon in agent container entrypoint (#618)
The entrypoint installed a crontab but never started a cron daemon,
leaving the container idle.  Fix by running as root in the entrypoint
(cron requires it), installing the crontab for the agent user via
`crontab -u agent`, and starting cron in the foreground with `cron -f`.
Remove `USER agent` from the Dockerfile and `user: "1000:1000"` from
the compose template accordingly — cron jobs still execute as UID 1000.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:30:44 +00:00
openhands
32c336f3df fix: escalation notifications should @mention human on Matrix (#624)
Add MATRIX_MENTION_USER config to project TOML and include a Matrix
mention pill in escalation notify_ctx calls so humans get notified
even in muted rooms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 19:21:46 +00:00
openhands
e38866ab61 fix: Containerize full stack with docker-compose (#618)
Add docker-compose.yml generation, agent Dockerfile, and new CLI
commands (up/down/logs/shell) so the full stack runs containerized.
The --bare flag preserves the current bare-metal setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:53:55 +00:00
johba
e58e60fe7c Merge pull request 'fix: feat: active-state files — per-cron guard with self-off semantics (#622)' (#623) from fix/issue-622 into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/623
2026-03-23 22:59:30 +01:00
openhands
e535ed776f fix: feat: active-state files — per-cron guard with self-off semantics (#622)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:46:59 +00:00
johba
e041b20823 Merge pull request 'fix: Push to public mirrors after merge (#614)' (#621) from fix/issue-614 into main 2026-03-23 20:27:23 +01:00
openhands
d3f831f39e fix: Register lib/mirrors.sh in CI smoke test (#614)
Add mirrors.sh to the LIB_FUNS scan and check_script list so the
agent-smoke function resolution test recognizes mirror_push.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:20:59 +00:00