Replace Aider with a secure mini-SWE-agent worker #1

Merged
christian.meyer merged 12 commits from feature/mini-swe-agent-worker into main 2026-08-31 17:39:42 +02:00
Collaborator

Problem

The previous Aider/database-polling automation was too complex and did not reliably turn a reported wrong result into a small, reviewable fix. Failure context and automation state were split between the Laravel database and the worker, model commands inherited too much process context, and deterministic validation could be bypassed by late patch changes.

The desired workflow is simple: a user reports Falsches Ergebnis, the report becomes one visible Gitea issue, an agent proposes a bounded patch, and a human reviews the resulting pull request. Nothing is merged automatically.

Why mini-SWE-agent

mini-SWE-agent provides the useful SWE-style edit loop with substantially less operational surface than OpenHands. This implementation keeps orchestration, credentials, Git operations, policy enforcement, and tests outside the model-controlled shell.

Changes

  • Preserve the previous Aider implementation unchanged under old_2026-08-31/.
  • Replace database polling with explicit ai:queued Gitea issue polling and atomic label transitions.
  • Run mini-SWE-agent 2.4.6 as an unprivileged user in a credential-free command environment.
  • Keep Git metadata and temporary authentication outside the writable worktree.
  • Reject unsafe commands, protected paths, symlinks, oversized patches, whitespace errors, and post-test patch drift.
  • Run a clean-clone preflight before paid model work and deterministic tests before publishing.
  • Put Fixes #N, the original reported problem, changed files, checks, and agent summary into every generated PR.
  • Require manual review and merge.

Verification

  • 47 passed
  • Ruff: all checks passed.
  • Clean-clone preflight passed.
  • Controlled issue #19 produced narrow PR #20 with only the intended endpoint and test.
  • Continuous worker is running with an empty queue.
  • Configured Gitea and Mistral credential values are absent from all committed files.

Review note

This pull request changes the automation service only. It does not merge generated PR #20 or any Laravel pull request automatically.

## Problem The previous Aider/database-polling automation was too complex and did not reliably turn a reported wrong result into a small, reviewable fix. Failure context and automation state were split between the Laravel database and the worker, model commands inherited too much process context, and deterministic validation could be bypassed by late patch changes. The desired workflow is simple: a user reports **Falsches Ergebnis**, the report becomes one visible Gitea issue, an agent proposes a bounded patch, and a human reviews the resulting pull request. Nothing is merged automatically. ## Why mini-SWE-agent mini-SWE-agent provides the useful SWE-style edit loop with substantially less operational surface than OpenHands. This implementation keeps orchestration, credentials, Git operations, policy enforcement, and tests outside the model-controlled shell. ## Changes - Preserve the previous Aider implementation unchanged under `old_2026-08-31/`. - Replace database polling with explicit `ai:queued` Gitea issue polling and atomic label transitions. - Run mini-SWE-agent 2.4.6 as an unprivileged user in a credential-free command environment. - Keep Git metadata and temporary authentication outside the writable worktree. - Reject unsafe commands, protected paths, symlinks, oversized patches, whitespace errors, and post-test patch drift. - Run a clean-clone preflight before paid model work and deterministic tests before publishing. - Put `Fixes #N`, the original reported problem, changed files, checks, and agent summary into every generated PR. - Require manual review and merge. ## Verification - `47 passed` - Ruff: all checks passed. - Clean-clone preflight passed. - Controlled issue #19 produced narrow PR #20 with only the intended endpoint and test. - Continuous worker is running with an empty queue. - Configured Gitea and Mistral credential values are absent from all committed files. ## Review note This pull request changes the automation service only. It does not merge generated PR #20 or any Laravel pull request automatically.
automation-bot added 2 commits 2026-08-31 02:47:20 +02:00
feat: replace Aider with secure mini-SWE-agent worker
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
25ed6a8439
christian.meyer added 1 commit 2026-08-31 03:02:43 +02:00
fix: tighten agent patch hygiene
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
c2028fa256
christian.meyer added 1 commit 2026-08-31 03:06:18 +02:00
fix: block temporary agent artifacts
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
badb8bb730
christian.meyer added 1 commit 2026-08-31 03:07:31 +02:00
fix: focus failure-report agent scope
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
1344c906b7
christian.meyer added 1 commit 2026-08-31 10:32:23 +02:00
fix: require anchored structured file edits
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
078c22b5e0
christian.meyer added 1 commit 2026-08-31 10:53:22 +02:00
docs: require manual issue approval
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
cf1d8acb45
christian.meyer added 1 commit 2026-08-31 11:44:25 +02:00
fix: normalize generated whitespace
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
1097fa7ae2
christian.meyer added 2 commits 2026-08-31 16:39:46 +02:00
docs: record Qwen MLX benchmark results
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
407af8099b
christian.meyer added 1 commit 2026-08-31 17:03:42 +02:00
feat: improve worker diagnostics
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
4b5ac5f9d7
christian.meyer added 1 commit 2026-08-31 17:38:11 +02:00
feat: retry failed agent validations
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled
b4ad2abc33
christian.meyer merged commit c064c40be2 into main 2026-08-31 17:39:42 +02:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: christian.meyer/lai_automatisierung#1