Part 1: Add WOODPECKER_PLUGINS_PRIVILEGED to woodpecker service environment
in lib/generators.sh, defaulting to plugins/docker, overridable via .env.
Document the new key in .env.example.
Part 2: Delete .woodpecker/ops-filer.yml from project repo — it belongs in
the ops repo and references secrets that don't exist here. Full ops-side
filer setup deferred until sprint PRs need it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Generated compose now uses `image: ghcr.io/disinto/{agents,edge}` instead
of `build:` directives; `disinto init --build` restores local-build mode
- Add VOLUME declarations to agents, reproduce, and edge Dockerfiles
- Add CI pipeline (.woodpecker/publish-images.yml) to build and push images
to ghcr.io/disinto on tag events
- Mount projects/, .env, and state/ into agents container for runtime config
- Skip pre-build binary download when compose uses registry images
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shift the guardrail from prose prompt constraints into Forgejo's permission
layer. architect-bot loses all write access on the project repo (now read-only
for context gathering). Sub-issues are produced by a new filer-bot identity
that runs only after a human merges a sprint PR on the ops repo.
Changes:
- architect-run.sh: remove all project-repo writes (add_inprogress_label,
close_vision_issue, check_and_close_completed_visions); add ## Sub-issues
block to pitch format with filer:begin/end markers
- formulas/run-architect.toml: add Sub-issues schema to pitch format; strip
issue-creation API refs; document read-only constraint on project repo
- lib/formula-session.sh: remove Create issue curl template from
build_prompt_footer (architect cannot create issues)
- lib/sprint-filer.sh (new): parser + idempotent filer using FORGE_FILER_TOKEN;
parses filer:begin/end blocks, creates issues with decomposed-from markers,
adds in-progress label, handles vision lifecycle closure
- .woodpecker/ops-filer.yml (new): CI pipeline on ops repo main-branch push
that invokes sprint-filer.sh after sprint PR merge
- lib/env.sh, .env.example, docker-compose.yml: add FORGE_FILER_TOKEN for
filer-bot identity; add filer-bot to FORGE_BOT_USERNAMES
- AGENTS.md: add Filer agent entry; update in-progress label docs
- .woodpecker/agent-smoke.sh: register sprint-filer.sh for smoke test
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The FORGE_TOKEN_OVERRIDE fix shifted line numbers in agent run scripts,
causing the shared source block (env.sh, formula-session.sh, worktree.sh,
guard.sh, agent-sdk.sh) to register as a new duplicate. This is
intentional boilerplate shared across all formula-driven agents.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two bugs in agent-smoke.sh caused non-deterministic CI failures:
1. SIGPIPE race with pipefail: `printf | grep -q` fails when grep closes
the pipe early after finding a match, causing printf to get SIGPIPE
(exit 141). With pipefail, the pipeline returns non-zero even though
grep succeeded — producing false "undef" failures. Fixed by using
here-strings (<<<) instead of pipes for all grep checks.
2. Incomplete LIB_FUNS: hand-maintained REQUIRED_LIBS list (11 files)
didn't cover all 26 lib/*.sh files, silently producing a partial
function list. Fixed by enumerating all lib/*.sh in stable
lexicographic order (LC_ALL=C sort), excluding only standalone
scripts (ci-debug.sh, parse-deps.sh).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add hard precondition check: fail fast if any required lib file is missing
- Add diagnostic dump on FAIL [undef] errors (all_fns count, LIB_FUNS match, defining lib)
- Add CI-side ls -la lib/ snapshot at start of smoke test
- Remove reference to deleted lib/file-action-issue.sh
The smoke test's function resolution check for supervisor/supervisor-run.sh
did not include lib/formula-session.sh as an extra definition source, causing
acquire_cron_lock to be flagged as undefined.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace grep+sed pipeline in get_fns with pure awk — eliminates
remaining BusyBox grep/sed cross-platform issues causing ci_fix_reset
to be missed from function name extraction on Alpine CI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix get_fns in agent-smoke.sh: use separate -e flags instead of ;
as sed command separator — BusyBox sed (Alpine CI) does not support
semicolons as separators within a single expression, causing function
names to retain their () suffix and never match in LIB_FUNS lookups.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add structural end-of-while-loop+case hash to ALLOWED_HASHES in
detect-duplicates.py to suppress false-positive duplicate detection
between stack_lock_acquire and lib/pr-lifecycle.sh.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add cleanup trap to smoke-init.sh that kills all mock-forgejo.py processes
on exit (success or failure). Also ensure cleanup at test start removes
any leftover processes from prior runs.
In .woodpecker/smoke-init.yml:
- Store the PID of the mock-forgejo.py background process
- Kill the process after smoke test completes
This prevents accumulation of orphaned Python processes that caused
OOM issues (2881 processes consuming 7.45GB RAM).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove action-agent card from site/docs/architecture.html
- Remove action/ directory line from architecture.html
- Update formula comments to reference dispatcher instead of action-agent
- Remove action/action.log from log scan loops in preflight.sh and collect-metrics.sh
- Remove action from find command in agent-smoke.sh
This keeps getting re-added by agents. It spins up a full Forgejo
inside CI and never finishes within the timeout.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The smoke-init pipeline tests `disinto init` against a Forgejo
instance — it does not build or use the agents Docker image.
Changes under docker/ should not trigger this workflow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
smoke-init spins up a full Forgejo instance inside CI and never
finishes within the 5-minute timeout. It blocks all PRs.
Remove it entirely until it can be optimized to run fast enough.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
env.sh changes don't need a full Forgejo init smoke test.
Prevents 40-minute CI hangs on env fixes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rewrite action-agent from tmux session + phase-handler pattern to
synchronous SDK pattern (agent_run via claude -p). Uses shared libraries:
- agent-sdk.sh for one-shot Claude invocation
- issue-lifecycle.sh for issue_check_deps/issue_close/issue_block
- pr-lifecycle.sh for pr_create/pr_walk_to_merge
- worktree.sh for worktree_create/worktree_cleanup
Add default callback stubs to phase-handler.sh (cleanup_worktree,
cleanup_labels) so it is self-contained now that action-agent.sh
no longer sources it. Update agent-smoke.sh accordingly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skip the heavyweight smoke-init test (spins up full Forgejo inside CI)
for PRs that do not touch init-related code. Saves ~25min of CPU per
unrelated PR.
Closes#8
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Register lib/agent-sdk.sh in the CI smoke test so agent_recover_session
resolves for dev-agent.sh and review-pr.sh.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dev-agent.sh no longer sources phase-handler.sh. Update the smoke test
to resolve phase-handler.sh callbacks against action-agent.sh (which
still sources it and defines cleanup_labels/cleanup_worktree).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New reusable library with clean function boundaries for the PR lifecycle:
- pr_create, pr_find_by_branch — PR creation and lookup
- pr_poll_ci — poll CI with infra vs code failure classification
- pr_poll_review — poll for review verdict (bot comments + formal reviews)
- pr_merge, pr_is_merged — merge with 405 handling and race detection
- pr_walk_to_merge — full orchestration loop (CI → review → merge)
- build_phase_protocol_prompt — git push instructions for agent prompts
The pr_walk_to_merge function uses agent_run() which callers must define
(guarded stub provided). This bridges to the synchronous SDK architecture
where the orchestrator bash loop IS the state machine — no phase files.
Extracted from: dev/phase-handler.sh, dev/dev-poll.sh, lib/ci-helpers.sh
Smoke test updated to include the new library.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Some BusyBox grep builds treat bare () as grouping operators even in BRE
mode, causing get_fns to miss function definitions like ci_commit_status.
Using [(][)] is unambiguous across all grep implementations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes#779
## Changes
Auto-generate WOODPECKER_TOKEN during disinto init by automating the Forgejo OAuth2 login flow after the compose stack starts. Adds generate_woodpecker_token() function that: logs into Forgejo web UI, drives the OAuth2 authorize/consent flow, completes the Woodpecker callback to get a session token, then creates a persistent personal access token via Woodpecker API. Saves to .env so activate_woodpecker_repo() can use it immediately. Failures are non-fatal (guarded with || true).
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/790
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
Push events test the raw branch which may be behind main.
PR events test the merge result, which is what matters.
This eliminates false CI failures that block the dev-agent.