Repository navigation
feat: add the autofix factory - #3
Conversation
Routed triggers call the systemone API, which serves decision models only. openai/gpt-6-luna is a chat model. Route with typesafe/jev-1-14 on OpenRouter.
Four agents find, verify, fix and review problems in one GitHub repository. Review feedback, failed CI and comments route back to the coder, joining its open run when there is one.
Add autofix to make example with its checks, credentials and users. Serve decision models and Claude Sonnet 5.5 from the OpenRouter provider, and validate the factory in CI.
Visual WalkthroughThis change adds the autofix factory: four agents and the triggers that start them, which hunt, verify and fix issues and review the resulting pull requests. Issue hunt, verify and fixIssues move from the daily hunt through verification to a fix run by the coder. flowchart TB
subgraph hunting[Hunt]
hunt[hunt-daily trigger]
hunter[bug-hunter agent]
end
subgraph verifying[Verify]
verifyT[verify-new-issue trigger]
verifier[bug-verifier agent]
end
subgraph fixing[Fix]
fixT[fix-verified trigger]
coder[coder agent]
end
issue[GitHub issue]
labeled[Issue labeled verified]
closed[Issue closed or asks for info]
hunt --> hunter
hunter -->|files up to 3 issues| issue
issue --> verifyT
verifyT --> verifier
verifier -->|labels verified| labeled
verifier -->|other outcomes| closed
labeled --> fixT
fixT --> coder
classDef added fill:#1f883d,stroke:#1a7f37,stroke-width:2px,color:#ffffff
classDef changed fill:#bf8700,stroke:#9a6700,stroke-width:2px,color:#ffffff
classDef removed fill:#cf222e,stroke:#a40e26,stroke-width:2px,stroke-dasharray:5,color:#ffffff
classDef context fill:transparent,stroke:#8c959f,stroke-width:1px,stroke-dasharray:3,color:#8c959f
linkStyle default stroke:#8c959f,stroke-width:2px
class hunt,hunter,verifyT,verifier,fixT,coder added
class issue,labeled,closed context
style hunting fill:transparent,stroke:#8c959f
style verifying fill:transparent,stroke:#8c959f
style fixing fill:transparent,stroke:#8c959f
Legend: green = added, amber = changed, red = removed, dashed grey = context
Pull request review loopThe coder's pull request returns to the coder through review, failed CI and comments. sequenceDiagram
participant C as Coder agent
participant G as GitHub pull request
participant T as Factory triggers
participant R as Code reviewer agent
C->>G: open pull request
G->>T: pull_request opened
T->>R: start review
R->>G: post review, state commented
opt third review, problems remain
R->>G: add needs-human label
end
G->>T: review submitted
T->>C: resume on review
alt CI fails on branch
G->>T: workflow run failed
T->>C: fix failed CI
else person comments
G->>T: issue comment created
T->>C: act on comment
end
C->>G: push fix to branch
opt third push still failing
C->>G: summary, add needs-human label
end
|
There was a problem hiding this comment.
Walkthrough
Adds the factories/autofix factory with four agents, eight triggers and a platform repository. Extends the quickstart with autofix credentials and users, and fixes multi-tenant on-mention routing.
| Severity | Finding | Location |
|---|---|---|
| Restrict who can start the verifier | factories/autofix/factory/triggers/verify-new-issue.yaml:11 |
|
| Bound the coder and reviewer loop | factories/autofix/factory/triggers/coder-on-review.yaml:63 |
|
| Allow a separate key for the autofix App | quickstart/Makefile:189 |
Minor points: the README says triggers/ has "One file per stage" but holds eight triggers. The check-example comment in quickstart/Makefile omits autofix. The coder and reviewer prompts both apply needs-human with separate counts.
Review effort: High
Risk: Medium, new agents with write access driven by webhooks
Coverage: 37 of 37 files reviewed
Where to focus
| Area | Why it needs a person |
|---|---|
factories/autofix/factory/triggers |
Decide who may start the verifier and coder. |
factories/autofix/factory/agents |
Confirm the loop limits and needs-human ownership. |
quickstart/Makefile |
Confirm one App key is correct for both examples. |
Lower risk
| Area | Why |
|---|---|
factories/autofix/platform/models |
Model definitions copied from the multi-tenant example. |
README.md and multi-tenant/README.md |
Documentation index changes. |
Changes by area
| Area | Files | Change |
|---|---|---|
factories/autofix/factory |
19 | Agents, triggers, connection, source, role, environment |
factories/autofix/platform |
9 | Tenant and six models |
multi-tenant |
4 | New routing model and trigger fix |
quickstart |
6 | Autofix credentials, users, provider models |
| root | 2 | Makefile and README entries |
Checked
Platform models and tenant, kustomization resource lists, glauth users.
Adds
factories/autofix, a factory of four agents that finds, verifies and fixes problems in one GitHub repository and hands a person the pull request.Changes
factories/autofix: The platform repository (tenantautofix, models) and the factory repository (GitHub App connection, webhook source,buildenvironment,maintainerrole, four agents, eight triggers).bug-hunterfiles issues each morning.bug-verifierlabels each new issue.coderfixes verified issues and opens a pull request.code-reviewerreviews it.coderwith a decision model, joining its open run when there is one.fix-verified) is on. Gate B (fix-assigned), where a person assigns the issue, is commented out.make exampleoffers autofix and checks its placeholders.make credentialscreates its GitHub App key and webhook secrets. glauth gains two autofix users. The OpenRouter provider servessystemone,typesafe/jev-1.14andanthropic/claude-sonnet-5.5.on-mentionrouted withopenai/gpt-6-luna, a chat model. Routing needs a decision model, so it now usestypesafe/jev-1-14.Testing
make validatepasses for all eight kustomizations.hunt-dailyfired andbug-hunterfiled three issues.bug-verifierverified all three with a severity.coderopened three pull requests, each with a test that failed before the fix. CI passed.code-reviewerreviewed them, andcoder-on-reviewrouted each review tocoderwithtypesafe/jev-1-14.