Commit graph

1038 commits

Author SHA1 Message Date
johba
bf337aba20 Merge pull request 'fix: fix: idle timeout does not escalate — session dies silently (#123)' (#128) from fix/issue-123 into main 2026-03-18 08:29:25 +01:00
openhands
90762d8de3 fix: address review feedback — CODEBERG_WEB unbound, title prefix, emoji
- Replace ${CODEBERG_WEB} with inline https://codeberg.org/${CODEBERG_REPO}
  to avoid unbound variable crash in gardener-poll.sh (set -euo pipefail)
- Change sub-issue title prefix from fix: to chore: since it's an
  investigation task, not a code fix
- Add emoji prefix to idle_timeout matrix notification for consistency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 07:18:57 +00:00
openhands
88f2268bc6 fix: idle timeout does not escalate — session dies silently (#123)
1. Timeout handler (dev-agent.sh): write escalation to project-suffixed
   file, restore backlog label, clean up phase file on idle timeout.
2. Fix escalation file naming: escalations.jsonl → escalations-${PROJECT_NAME}.jsonl
   everywhere in dev-agent.sh so gardener actually picks them up.
3. Gardener (gardener-poll.sh): handle idle_timeout reason before CI-specific
   recipe logic — create investigation sub-issue instead of silently returning.
4. Update .gitignore to match new escalations-*.jsonl pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 07:02:33 +00:00
johba
0aec024f78 Merge pull request 'fix: In-progress formula issue causes infinite dev-agent respawn (#115)' (#126) from fix/issue-115 into main 2026-03-18 07:54:18 +01:00
openhands
32ee53517f fix: In-progress formula issue causes infinite dev-agent respawn (#115)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 06:41:43 +00:00
johba
9b833532f5 Merge pull request 'fix: ci_fix_count/ci_fix_increment not atomic — potential race under concurrent polls (#118)' (#124) from fix/issue-118 into main 2026-03-18 07:37:54 +01:00
openhands
1352620c3d fix: ci_fix_count/ci_fix_increment not atomic — potential race under concurrent polls (#118)
Wrap ci_fix_count(), ci_fix_increment(), and ci_fix_reset() with flock
on a shared lockfile to prevent concurrent modification of the JSON
tracker. Uses flock(1) in command-wrapping mode so each Python process
holds an exclusive lock for the duration of its read-modify-write cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 06:30:17 +00:00
johba
23364c6c01 Merge pull request 'fix: feat: planner emits formula instances instead of freeform issues (#21)' (#121) from fix/issue-21 into main 2026-03-18 05:49:23 +01:00
openhands
d498334dcc fix: address review feedback — restore -d flag, drop formula label, validate names, quote YAML
- Restore `-d` flag on codeberg_api POST /issues call (regression fix)
- Do NOT apply `formula` label — dev-agent rejects it, blocking the pipeline
- Keep YAML front matter in body only (structural, harmless to freeform processing)
- Quote YAML var values with @json to handle special characters
- Validate formula name against on-disk formulas/*.toml catalog
- Fall back to freeform if Claude hallucinates a formula name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 04:37:17 +00:00
openhands
b5ec6f6cf3 fix: feat: planner emits formula instances instead of freeform issues (#21)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 04:29:21 +00:00
johba
40f6598b87 Merge pull request 'fix: try_merge_or_rebase rebase-failure spawn bypasses ci_fix_increment (#56)' (#120) from fix/issue-56 into main 2026-03-18 05:20:57 +01:00
openhands
cf8446b451 fix: try_merge_or_rebase rebase-failure spawn bypasses ci_fix_increment (#56)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 04:05:18 +00:00
johba
5c73ab3e53 Merge pull request 'fix: AGENTS.md absent from entire repository (#57)' (#119) from fix/issue-57 into main 2026-03-18 05:02:54 +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
johba
f6ca1cc70c Merge pull request 'fix: Three near-identical CI-exhaustion blocks should be a shared function (#58)' (#117) from fix/issue-58 into main 2026-03-18 04:38:25 +01:00
openhands
ff02b1e653 fix: Three near-identical CI-exhaustion blocks should be a shared function (#58)
Extract CI-exhaustion check/escalate logic into handle_ci_exhaustion() helper.
All three call sites (orphaned PRs, stuck PRs, backlog PRs) now use the shared
function, eliminating future drift between the copies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 03:21:27 +00:00
johba
c5daf475c2 Merge pull request 'fix: feat: gardener escalation recipes — pattern-matched playbooks for CI failures (#68)' (#116) from fix/issue-68 into main 2026-03-18 04:11:59 +01:00
openhands
d6e91b2466 fix: address review feedback — recipe engine robustness and correctness
- Bug: chicken-egg-ci create-per-file-issues was aliased to shellcheck-only
  function. Added generic playbook_lint_per_file() that handles any linter
  output format. Renamed action to lint-per-file.
- Bug: cascade-rebase fired retry-merge synchronously after async rebase.
  Removed retry-merge and re-approve from recipe — rebase settles, CI reruns,
  normal flow handles merge on subsequent cycle.
- Warning: jq calls on PR data lacked || true under set -euo pipefail. Fixed.
- Warning: playbook_rebase_pr and playbook_retrigger_ci incremented
  _PB_SUB_CREATED before confirming API success. Now check HTTP status code.
- Warning: Python import tomllib fails on < 3.11. Added try/except fallback
  to tomli package.
- Nit: failures_on_unchanged regex broadened to handle generic linter formats
  (file.sh:line:col patterns in addition to ShellCheck's "In file line N:").
- Info: match_recipe now logs Python stderr on error instead of silently
  falling back to generic recipe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 03:05:09 +00:00
openhands
cb8a9bc6e5 fix: restore executable permission on gardener-poll.sh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 02:53:08 +00:00
openhands
f293dd6269 fix: feat: gardener escalation recipes — pattern-matched playbooks for CI failures (#68)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 02:53:03 +00:00
johba
5bba51b547 Merge pull request 'fix: feat/formula not merged but formula templates and label docs already on main (#69)' (#114) from fix/issue-69 into main 2026-03-18 03:29:24 +01:00
openhands
2446543545 fix: feat/formula not merged but formula templates and label docs already on main (#69)
- dev-agent.sh: add explicit guard that skips formula-labeled issues with a
  clear log message instead of silently producing no formula behavior
- BOOTSTRAP.md: rewrite formula label entry to state it is not yet functional
  and that dev-agent will skip such issues until feat/formula is merged

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 02:17:18 +00:00
johba
56dd469687 Merge pull request 'fix: ci_passed() still lives in dev/dev-poll.sh, not lib/ (#70)' (#112) from fix/issue-70 into main 2026-03-18 03:12:56 +01: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
johba
87f5fb0390 Merge pull request 'fix: shellcheck TODO has no enforcement — || true may never be removed (#71)' (#108) from fix/issue-71 into main 2026-03-18 03:00:16 +01:00
openhands
bd02330b22 fix: shellcheck TODO has no enforcement — || true may never be removed (#71)
- Fix SC2164: add || exit 1 to bare cd in update-prompt.sh
- Fix SC2155: separate declare and assign in env.sh, supervisor-poll.sh, dev-agent.sh
- Fix SC2034: inline suppression for vars used by sourced helpers
- Remove unused `mergeable` declaration, rename unused loop var to `_w`
- Remove || true from shellcheck CI step — failures are now blocking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 01:53:02 +00:00
johba
81e5e5aa50 Merge pull request 'fix: feat: gardener bundles dust into ore before promoting to backlog (#74)' (#107) from fix/issue-74 into main 2026-03-18 02:48:22 +01:00
openhands
a8d10931f6 fix: address review findings from issue #74
- Add dedup guard: skip dust entries for issues already in dust.jsonl
- Inject already-staged issue list into LLM prompt to prevent re-emission
- Guard mv after jq: only overwrite dust.jsonl if jq succeeded
- Use sort -nu for numeric dedup of issue numbers
- Compute bundle count from distinct issues, not raw entries
- Add 30-day TTL expiry for sub-threshold dust groups
- Fix inconsistent heading levels in bundle body (all ###)
- Add scope note to PROMPT.md (human docs only, not injected)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 01:41:14 +00:00
openhands
530ce7319f fix: feat: gardener bundles dust into ore before promoting to backlog (#74)
- Add dust/ore rule to gardener LLM prompt: trivial tech-debt (comment
  fix, rename, style-only, single-line) outputs DUST: JSON instead of
  promoting individually
- Parse DUST lines from LLM output, validate JSON, append to dust.jsonl
  with timestamp
- After evaluation pass: check groups with 3+ items, create bundled
  backlog issue, close source issues with cross-reference
- Add gardener/dust.jsonl to .gitignore
- Create gardener/PROMPT.md documenting the dust vs ore philosophy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 01:33:09 +00:00
johba
e5f075eb97 Merge pull request 'fix: feat: supervisor auto-retriggers infra CI failures (#75)' (#104) from fix/issue-75 into main 2026-03-18 02:27:22 +01:00
openhands
1c5d3e7bbd fix: address review findings from issue #75
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 01:18:34 +00:00
openhands
57fdec9504 fix: feat: supervisor auto-retriggers infra CI failures (#75)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 01:08:35 +00:00
johba
f1959101e6 Merge pull request 'fix: feat: Matrix notifications — contextual, linked, conversational (#76)' (#102) from fix/issue-76 into main 2026-03-18 01:54:11 +01:00
openhands
8034b50315 fix: address review findings from issue #76
- Fix double-injection bug: flat-file write only when direct tmux inject didn't happen
- Fix ci_exhausted href='#' fallback to use CODEBERG_WEB/pulls/N
- Remove duplicate $THREAD_FILE in rm command
- HTML-escape CI snippet before embedding in <pre> block
- notify_ctx falls back to plain matrix_send when no thread exists
- Thread root uses HTML-formatted message for consistency
- Deduplicate _ci_pipeline_url variable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 00:42:00 +00:00
openhands
814706bf90 fix: feat: Matrix notifications — contextual, linked, conversational (#76)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 00:20:11 +00:00
johba
7cc9ce1b39 Merge pull request 'fix: feat: persistent Claude tmux session for reviewer (#78)' (#101) from fix/issue-78 into main 2026-03-18 01:11:28 +01:00
openhands
bf4c70086e fix: address review findings from issue #78
- Guard inject_into_session wait_for_claude_ready with || true
- Guard all tmux calls in inject_into_session with || true
- Add worktree cleanup to idle-timeout branch in review-poll.sh
- Check phase before sleep in wait_for_review_output (no 10s delay)
- Prune review-thread-map entries during session cleanup
- Skip human question injection during active review (phase check)
- Remove no-op tmux kill-session after has-session returns false
- Add ASCII fallback for Claude prompt detection (locale safety)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 00:04:30 +00:00
openhands
85d05cdee2 fix: feat: persistent Claude tmux session for reviewer (#78)
Rewrite review-pr.sh to use persistent tmux sessions instead of one-shot
claude -p. Re-reviews inject incremental diffs into the same session so
Claude remembers what it flagged and can verify fixes were addressed.

- review-pr.sh: tmux session review-{project}-{pr}, phase protocol
  (PHASE:review_complete), JSON output via file, retry on invalid JSON
- review-poll.sh: session lifecycle cleanup (merged/closed PRs, 4h idle)
- matrix_listener.sh: route human questions to review sessions via
  /tmp/review-thread-map

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 23:56:04 +00:00
johba
5ec587a7b6 Merge pull request 'fix: fix: review agent posts duplicate reviews when formal review submission fails (#96)' (#99) from fix/issue-96 into main 2026-03-18 00:34:31 +01:00
openhands
70c899040b fix: review agent posts duplicate reviews when formal review submission fails (#96)
Add fallback dedup check against comment watermarks before the formal
Codeberg review check. When the formal review submission fails silently,
the existing <!-- reviewed: SHA --> watermark in posted comments now
prevents the next poll cycle from re-reviewing the same commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 23:15:21 +00:00
johba
b9eea10835 Merge pull request 'fix: feat: dev-poll.sh injects CI results into tmux session (#81)' (#98) from fix/issue-81 into main 2026-03-18 00:09:40 +01:00
openhands
63e60de9d6 fix: address round 2 review findings from issue #81
- Move atomic mv inside gardener loop so reply is only claimed when a
  matching needs_human session exists (fixes reply-loss regression)
- Delay rm of claimed file until after successful injection in both
  supervisor and gardener (OOM/SIGKILL leaves file recoverable)
- Fix matrix_listener ack message: 'next poll' instead of 'next supervisor poll'

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 22:59:05 +00:00
openhands
bfe0c09b5c fix: address review findings from issue #81
- Fix dev-agent.sh comment: gardener-poll.sh is the backup injector, not review-poll.sh
- Add renotify marker cleanup to gardener injection path
- Use atomic mv to claim reply file, preventing double-injection race between supervisor and gardener
- Add break after supervisor injection for symmetry with gardener
- Remove overly prescriptive PHASE:awaiting_ci hardcode from injection instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 22:40:54 +00:00
openhands
48683e508c fix: feat: supervisor-poll.sh and gardener-poll.sh inject human replies into needs_human dev sessions (#81)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 22:33:28 +00:00
johba
9c9b3b3bde Merge pull request 'fix: poll for claude readiness before injecting prompt into tmux' (#97) from fix/dev-agent-prompt-injection into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/97
2026-03-17 23:23:25 +01:00
openhands
515c528e10 fix: poll for claude readiness before injecting prompt into tmux
Replace fixed sleep(3) + paste-buffer race with a wait_for_claude_ready()
function that polls the tmux pane for the ❯ prompt (up to 120s). This
fixes the bug where the initial prompt was pasted before Claude Code
finished initializing, resulting in a stuck session with an empty prompt.

Observed on issue #81: session sat idle for 42+ minutes because the
paste arrived during Claude's startup splash screen.

Changes:
- Add wait_for_claude_ready() that polls tmux capture-pane for ❯
- Call it inside inject_into_session() before every paste
- Use inject_into_session() for initial prompt (was inline paste-buffer)
- Remove fixed sleep(3) from session creation and recovery paths
- Fail hard if claude doesn't become ready within timeout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 23:23:12 +01: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
johba
afdcdeb78f Merge pull request 'fix: feat: review-poll.sh injects review feedback into dev tmux session (#82)' (#89) from fix/issue-82 into main 2026-03-17 22:30:35 +01:00
openhands
4d0658dcdf fix: address review findings from issue #82
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 21:19:47 +00:00