Dogfood findings: reliability improvements for the agent workflow #1
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
serious-devs/ai-factory#1
Loading…
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?
Context
First full dogfood run of the pipeline on
serious-devs/test_factory_ai, issue #3 (plan → build → PR). The happy path works end-to-end — plan reply with spec block, human edits the spec, build produces branchagent/issue-Nand a mergeable PR — but the run exposed four reliability gaps.Findings
1. Automatic triggers run but the agent skips (blocks day-to-day usage)
With the thin per-project workflow delegating via
uses:, the glue sees the event asworkflow_call/<action>instead of the originalissues/issue_commentevent and, inmode: auto, cannot infer plan vs build (log:not addressed to the agent (unhandled event workflow_call/created) — skipping). Every automatic trigger currently produces a no-op run (~3 min wasted each).Proposed fix: the glue should read the caller's original event from
GITHUB_EVENT_PATH(the payload forwarded to the called workflow is the caller's) and infer the mode from it. The thin per-project workflow stays unchanged.2. Build agent killed by orphaned background servers (3/3 runs lost)
The build agent wrote correct code and its smoke test passed (HTTP 200 on the target endpoint), but it started the server with
npm start &;kill $SERVER_PIDkills npm while the node child survives, keeps listening and holds the shell's stdout/stderr open → opencode's shell tool kills the command at its timeout (30 s, 60 s on retry) → opencode exitsnull→ the run is marked failed. Editing the spec to forbid runtime servers made the next run succeed, but that is a manual workaround, not a fix.Proposed fix: standing guidance in the build prompt: no long-lived/background processes; if a server must be exercised, start
nodedirectly with output redirected to a file andkill -9the exact PID — otherwise prefer static checks (node --check,npm ls) when the spec allows.3. Completed work is lost when opencode crashes mid-run
In all three failed builds the files were fully written before the crash, but the ephemeral workspace was destroyed with nothing pushed — the human gate never saw usable output.
Proposed fix: salvage path in the glue — if opencode exits non-zero/null after files changed in the workspace, still push
agent/issue-Nand open a draft PR with an explicit warning (e.g. "agent crashed after implementing — unverified"), so the human decides.4. (minor) Called-workflow job logs unreachable via API
GET /repos/{o}/{r}/actions/jobs/{id}/logsreturns HTTP 500 for theagentjob (the reusable workflow's job); only the duplicatedagent-1job's logs are readable. Possibly a Forgejo bug rather than ai-factory code — verify upstream before changing anything here.Scope boundaries
glue/), reusable workflow inputs if needed, and the build prompt text only. No changes to opencode itself, no new services.Proposed child issues
workflow_call⏳ Awaiting validation by @mlvtito before any child issue is created or worked on.
Child issues created (validated by @mlvtito):
This mother stays open until all of them land.