Commit graph

1038 commits

Author SHA1 Message Date
johba
7d03f2c9ee Merge pull request 'fix: Dual curl calls for HAS_APPROVE / HAS_CHANGES create a race window (#321)' (#335) from fix/issue-321 into main 2026-03-20 02:04:35 +01:00
openhands
70aea63521 fix: Dual curl calls for HAS_APPROVE / HAS_CHANGES create a race window (#321)
Each of the three review-check sites (orphan, stuck-PR, backlog) now
fetches reviews with a single curl call, storing the JSON response and
jq-filtering both HAS_APPROVE and HAS_CHANGES from the cached result.
This eliminates the race window where a review submitted between the
two calls could cause a transient mismatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:59:51 +00:00
johba
305302c20a Merge pull request 'fix: Idle Stop hook marker unused by action-agent monitor loop (#327)' (#333) from fix/issue-327 into main 2026-03-20 01:55:39 +01:00
openhands
55b5a674c2 fix: Idle Stop hook marker unused by action-agent monitor loop (#327)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:50:52 +00:00
johba
f1b328d431 Merge pull request 'fix: fix: bundled dust cleanup — AGENTS.md (#328)' (#331) from fix/issue-328 into main 2026-03-20 01:43:42 +01:00
openhands
ecedbe40a7 ci: retry — agent-smoke failure is transient (pre-existing, not caused by AGENTS.md change)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:40:36 +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
johba
e3b4c733b9 Merge pull request 'fix: feat: PreToolUse hook guards destructive operations in dev-agent sessions (#277)' (#329) from fix/issue-277 into main 2026-03-20 01:25:19 +01:00
openhands
c8b09d1c72 fix: address review — whitelist /tmp, block bare force-push, improve checkout guard
- Guard 2: add /tmp/* to allowlist so normal temp file cleanup is not blocked
- Guard 1: block bare `git push --force` (no branch arg) since upstream may
  point to primary branch
- Guard 4: allow flags between verb and branch (`git switch --detach main`),
  escape branch name for regex safety, exclude -b/-B/-c/-C (branch creation)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:16:57 +00:00
openhands
de8dcef81e fix: feat: PreToolUse hook guards destructive operations in dev-agent sessions (#277)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:10:27 +00:00
johba
003f0486d1 Merge pull request 'fix: feat: stream action-agent Claude output to Matrix thread (#293)' (#325) from fix/issue-293 into main 2026-03-20 00:50:38 +01: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
johba
362ba489dc Merge pull request 'fix: prediction-agent / predictor not documented in AGENTS.md agent list (#307)' (#323) from fix/issue-307 into main 2026-03-20 00:32:55 +01: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
johba
5951cfb060 Merge pull request 'fix: Add WebP variant for factory-fixes-itself.jpg (#309)' (#322) from fix/issue-309 into main 2026-03-20 00:07:48 +01:00
openhands
b1b49e7261 fix: Add WebP variant for factory-fixes-itself.jpg (#309)
Add factory-fixes-itself.webp (107K vs 169K JPG, 37% smaller) and
wrap the image in a <picture><source> element matching the existing
al76 pattern. The original JPG is kept as fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:55:32 +00:00
johba
5ca52b8528 Merge pull request 'fix: fix: stale REQUEST_CHANGES reviews are invisible to dev-poll stuck-PR check (#319)' (#320) from fix/issue-319 into main 2026-03-19 23:50:33 +01:00
openhands
08d702b055 fix: fix: stale REQUEST_CHANGES reviews are invisible to dev-poll stuck-PR check (#319)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:24:48 +00:00
johba
954f9fb96b Merge pull request 'fix: fix: action-agent.sh ignores project TOML — falls back to .env defaults (#317)' (#318) from fix/issue-317 into main 2026-03-19 23:18:25 +01:00
openhands
28fd845714 fix: fix: action-agent.sh ignores project TOML — falls back to .env defaults (#317)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:16:01 +00:00
johba
eb6353eb21 Merge pull request 'fix: fix: duplicate-detection CI step fails on pre-existing duplicates unrelated to PR (#296)' (#316) from fix/issue-296 into main 2026-03-19 23:09:55 +01:00
openhands
5e4b00f9a3 fix: duplicate-detection CI step fails on pre-existing duplicates unrelated to PR (#296)
Add baseline comparison to detect-duplicates.py: when DIFF_BASE is set
(via CI_COMMIT_TARGET_BRANCH for PRs), the script compares findings
against the base branch and only fails on new duplicates introduced by
the PR. Pre-existing duplicates are reported as informational.

For push events (no DIFF_BASE), the script reports all findings but
exits 0 (informational only). Removes failure:ignore from the CI step
so new duplicates properly block PRs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:03:18 +00:00
johba
8d39ce79e7 Merge pull request 'fix: feat: publish formula for disinto.ai — action-agent deploys on merge (#312)' (#314) from fix/issue-312 into main 2026-03-19 22:44:04 +01:00
openhands
d47aadbe25 fix: address review — cross-step var persistence, atomic symlink, verify guards
- Persist DEPLOY_SHA and TARGET to temp files for cross-step reads
- Use ln -s + mv -T for truly atomic symlink swap
- Guard against empty title extraction in verify step
- Add repo_root var instead of hardcoded path
- Append deploy history before pruning old deploys
- Add prune-old-deploys to verify step needs for unambiguous ordering
- Explicit no-op early exit via NOOP sentinel
- Follow redirects with curl -L in verify step

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:41:46 +00:00
openhands
b4fbd9d69e fix: feat: publish formula for disinto.ai — action-agent deploys on merge (#312)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:30:59 +00:00
johba
4c301f6c2f Merge pull request 'fix: Deduplicate hook entries in settings.json on repeated create_agent_session calls (#299)' (#313) from fix/issue-299 into main 2026-03-19 22:24:58 +01:00
openhands
63d4179f38 fix: Deduplicate hook entries in settings.json on repeated create_agent_session calls (#299)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:19:58 +00:00
johba
9852c5f03e Merge pull request 'fix: feat: landing page refresh — concrete examples, CTA, robots.txt, sitemap (#306)' (#308) from fix/issue-306 into main 2026-03-19 22:14:35 +01:00
openhands
3d8bc08839 fix: address review — match og:url trailing slash, remove time-sensitive heading
- og:url now has trailing slash matching canonical link
- "It happened today" → "The factory fixed itself" (not stale on static page)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:04:39 +00:00
openhands
4087bced21 fix: feat: landing page refresh — concrete examples, CTA, robots.txt, sitemap (#306)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:56:44 +00:00
johba
bbc79e8a4c Merge pull request 'fix: feat: planner triages prediction/unreviewed issues before gap analysis (#304)' (#305) from fix/issue-304 into main 2026-03-19 21:51:21 +01: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
johba
e7f071750f Merge pull request 'fix: fix: agents don't clean up tmux sessions and phase files on completion (#302)' (#303) from fix/issue-302 into main 2026-03-19 21:36:37 +01:00
openhands
eeb8d5450f fix: agents don't clean up tmux sessions and phase files on completion (#302)
review-pr.sh: After APPROVE verdict, kill tmux session, remove phase
file, review output, sentinel files, and review worktree. Same cleanup
for unknown verdicts. REQUEST_CHANGES keeps session alive per #300.

review-poll.sh: Add safety net in stale session cleanup loop — kill
sessions in terminal phase (PHASE:review_complete) even if review-pr.sh
cleanup was interrupted.

dev/phase-handler.sh: Add sentinel file cleanup (/tmp/ci-result-*,
/tmp/review-injected-*) to PHASE:done and PHASE:failed handlers.

dev-agent.sh: Add sentinel file cleanup to idle_timeout/idle_prompt
exit handler. Add belt-and-suspenders done) case to post-loop handler.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:30:27 +00:00
johba
5d2b1c1186 Merge pull request 'fix: fix: review-pr.sh exits after REQUEST_CHANGES — should wait for new commits and re-review (#300)' (#301) from fix/issue-300 into main 2026-03-19 21:17:30 +01:00
openhands
b5c854c7a7 fix: review-pr.sh exits after REQUEST_CHANGES — should wait for new commits and re-review (#300)
After REQUEST_CHANGES/DISCUSS, review-pr.sh now writes PHASE:awaiting_changes
(with the reviewed SHA) instead of PHASE:review_complete. review-poll.sh gains
a re-review section that detects awaiting_changes sessions with new commits
and CI passing, then re-invokes review-pr.sh in the same tmux session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:09:22 +00:00
johba
62d8c81069 Merge pull request 'fix: feat: PostToolUse hook detects phase file writes in real-time (eliminates polling latency) (#278)' (#290) from fix/issue-278 into main 2026-03-19 20:59:23 +01:00
openhands
268ddc398c fix: use awk instead of grep -Eo in smoke test for Alpine compatibility (#296)
busybox grep on Alpine handles ERE character classes [(][)] differently
from GNU grep, causing get_fns to miss function definitions like
handle_ci_exhaustion(). awk is portable and works identically on all
platforms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 19:43:42 +00:00
openhands
809dd93c3b fix: distinguish phase file writes from reads in PostToolUse hook
- Parse tool_name via jq: Write tool checks file_path match,
  Bash tool checks for redirect operator (>) with phase file path
- Reads (cat, head) no longer trigger false-positive markers
- Split guard into separate statements for clarity
- Move marker cleanup inside hook-install guard
- Expand tests: 5 cases covering Bash write, Write tool, Bash read,
  unrelated Bash, and Write to different file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 18:14:49 +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
ab3efa2402 fix: replace fragile pane grep with Stop hook for idle detection (#272)
## Summary

- Claude Code v2.1.79 permanently shows `❯` in the input area even while actively thinking, causing `monitor_phase_loop` to false-positive on idle detection and kill working sessions after 90 seconds
- Replace `tmux capture-pane | grep ❯` with a Claude Code Stop hook (`lib/hooks/on-idle-stop.sh`) that writes a marker file only when Claude actually finishes responding
- Hook is installed per-worktree in `.claude/settings.json` by `create_agent_session`; marker cleaned up on inject/kill

## Test plan

- [x] Verified hook installs correctly in fresh worktree
- [x] Verified marker file appears only after Claude finishes responding (not during active thinking)
- [x] Verified live dev-agent session picks up fix and Claude works without being killed
- [x] Verified `agent_inject_into_session` clears marker before new work

🤖 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/272
2026-03-19 14:57:54 +01:00
johba
8c9d93b043 Merge pull request 'fix: feat: review + dev-poll skip CI gate for non-code PRs (#266)' (#271) from fix/issue-266 into main 2026-03-19 14:54:51 +01:00
openhands
1ab700c87a fix: feat: review + dev-poll skip CI gate for non-code PRs (#266)
Add diff_has_code_files() and ci_required_for_pr() helpers to
ci-helpers.sh. Non-code PRs (docs/*, formulas/*, evidence/*, *.md)
that have no CI results now skip the CI gate instead of being stuck
forever.

Applied to:
- review-pr.sh: CI gate skipped for non-code PRs
- review-poll.sh: CI gate skipped for non-code PRs
- dev-poll.sh: CI state treated as "success" for non-code PRs in
  orphan, stuck-PR, and backlog merge paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:48:00 +00:00
johba
65f161951f Merge pull request 'fix: gardener-poll escalation consumer does not handle idle_prompt reason (#268)' (#270) from fix/issue-268 into main 2026-03-19 13:58:46 +01:00
openhands
45745d2bfd fix: gardener-poll escalation consumer does not handle idle_prompt reason (#268)
Widen the escalation dispatch pattern from `idle_timeout*` to also match
`idle_prompt*`. When an idle_prompt escalation arrives, the gardener now
creates an investigation sub-issue with a tailored description (session
returned to prompt without writing a phase signal) instead of silently
falling through to the recipe engine.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:55:16 +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
johba
e024b0de03 Merge pull request 'fix: feat: prediction-poll.sh — per-project LLM prediction agent (#140)' (#256) from fix/issue-140 into main 2026-03-19 11:18:51 +01:00
openhands
d2f788239a fix: address review feedback on prediction agent (#140)
- Remove CLAUDE_TIMEOUT no-op override — inherit factory default (7200s) from env.sh
- Use anchored grep -qxF "NO_PREDICTIONS" to avoid false early exits
- Fetch closed PRs (state=closed, merged_at filter) instead of open — captures merged activity signals
- Parse staleness age from filename date (YYYY-MM-DD.json) instead of file mtime
- Log a warning when date -d falls back due to non-GNU date
- Add comment explaining global lock serialisation trade-off

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 10:13:22 +00:00
openhands
c06cf81031 fix: feat: prediction-poll.sh — per-project LLM prediction agent (#140)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 10:03:45 +00:00