feat: CI log access — disinto ci-logs + dev-agent CI failure context #136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When CI fails on a dev-agent PR, the agent has no access to the actual CI log output. It only gets "CI failed" status and guesses what's wrong. This leads to repeated blind fix attempts (issue #124 took 8+ attempts because the agent couldn't see
USER: unbound variablein the logs).The Woodpecker API log endpoints return HTML (SPA catch-all) instead of JSON — a v3 routing issue. But the logs are stored in the Woodpecker SQLite database and are accessible directly.
What to do
1.
disinto ci-logs <pipeline-number>CLI commandAdd a subcommand to
bin/disintothat reads CI logs from the Woodpecker SQLite database:Implementation: use Python's built-in
sqlite3module (no new dependency):The SQLite path is: the Woodpecker data volume mountpoint +
/woodpecker.sqlite. This can be discovered viadocker volume inspect disinto_woodpecker-data.2. Mount Woodpecker SQLite into agents containers (read-only)
Add to
docker-compose.yml(andbin/disintogenerate_compose) for bothagentsandagents-llamaservices:This gives the agents read-only access to the Woodpecker SQLite database. The agents container already has Python 3 with the built-in
sqlite3module.3.
lib/ci-helpers.sh— addci_get_logsfunctionCreate
lib/ci-log-reader.py(~30 lines) that:/woodpecker-data/woodpecker.sqlite(container path)4. Update
lib/pr-lifecycle.sh— inject CI logs on failureIn
pr_walk_to_merge, when CI fails and the agent is re-invoked to fix it, include the actual CI log output in the prompt:This gives the agent the exact error message instead of forcing it to guess.
Affected files
bin/disinto(addci-logssubcommand)lib/ci-log-reader.py(new — ~30 lines Python)lib/ci-helpers.sh(addci_get_logswrapper)lib/pr-lifecycle.sh(inject CI logs into fix prompt)docker-compose.yml/bin/disintogenerate_compose (mount woodpecker-data volume)lib/AGENTS.md(document new function)Acceptance criteria
disinto ci-logs <N>prints CI log output for pipeline Ndisinto ci-logs <N> --step <name>filters to specific stepci_get_logsfunction available in lib/ci-helpers.sh