AI bug triage pipeline shipped to production
Smart Bug Triage, an RMIT industry capstone with Focus Bear: an AI pipeline that classifies customer bug reports, checks for duplicates and files them in GitHub, plus a support panel that puts customer and subscription context beside each support ticket.
Context
Focus Bear customers report bugs, errors and feature ideas through the app and through support. Those reports arrived raw and had to be moved into GitHub by hand. Someone read each one, gathered the missing context, classified it, checked whether it duplicated existing work and decided where it belonged. Looking the customer up across internal services and billing systems added more work on top.
My estimate is that the workflow received around 60 customer reports a week, about 20 of them complex cases taking roughly an hour each to triage. That is around 20 staff-hours a week of reading, context gathering and filing before anyone starts fixing anything.
The brief was broad: build an AI automation system. The useful question was narrower. How do you get a report to the right place in GitHub, with enough context for the next person to act, without letting an AI guess hide a real defect?
My role and ownership
This was an RMIT industry partnered capstone with Focus Bear as the company partner, delivered by a four-person team. I was the Scrum Master and a developer. I investigated the workflow and the implementation options, proposed the solution that was adopted, and led its design and delivery. I oversaw the Cloudflare infrastructure at a higher level, and teammates did most of that implementation.
I implemented the duplicate retrieval, report state and history, the duplicate outcome policy and the model evaluation. On the support panel I built the customer lookup, subscription context, cancellation and much of the panel interface, and contributed to the action-token work a teammate owned.
As Scrum Master, I re-planned the project when the client chose Cloudflare and asked us to extend its existing internal bug pipeline instead of building on AWS. The backlog outside the frozen first sprint was rewritten to the new scope. I audited ticket statuses against acceptance criteria and evidence, corrected premature Done claims, and kept a clear line between what the team could finish and what needed the client: credentials, production settings, deployment and acceptance.
Technical approach
The solution has two parts.
The triage pipeline runs on Cloudflare Workers, Queues, D1 and R2, extending a pipeline Focus Bear already ran.
- Reports from internal forms and an authenticated in-app endpoint are queued, have personal information redacted, and are classified by an OpenAI model before a GitHub issue is created or updated.
- Repository-wide duplicate retrieval. The plan was to search only the report’s milestone. I tested that against real duplicate pairs and found that none of the five shared a milestone. I widened the search to every open and closed issue, synced into D1 and ranked in the Worker down to a shortlist of 50 for the model. That put the original in the shortlist for four of the five pairs.
- Traceable processing. Every report has an explicit state, a history and a mapping to its GitHub issue, so anyone can tell where a report is and whether a GitHub write has already started.
- Four outcomes: new, duplicate, closed match and unclear. Uncertain reports are held as Needs Review for a person. A match to a closed issue files a new issue that links it, rather than reopening it.
The support panel lives in Focus Bear’s own dashboard and API, beside the ticket in Zoho Desk.
- A Tampermonkey script injects a Focus Bear dashboard page into the ticket view, reusing the client’s Auth0 login, API and billing integrations. I compared six delivery options against ten requirements and proved this one in a browser before building on it.
- The browser sends only a ticket id. The API resolves the customer itself, through a read-only Zoho client and Auth0, and rejects any customer identity the browser tries to supply.
- Subscription context comes from the record the API already stores. The existing subscription read could create a Stripe customer or refresh RevenueCat as a side effect, and a support lookup should never change a customer’s billing state.
- Cancellation stops renewal while keeping access the customer has paid for. It needs a five-minute, single-use token bound to the agent, ticket, customer and operation. The API rechecks the agent’s role live, re-resolves the customer, and writes an identifiers-only audit record before calling any provider. Spent tokens are recorded in Postgres rather than Redis, because Redis eviction could make a used token valid again.
Evaluating the model
An older duplicate path could mark a report as a duplicate and never file it. Client records showed 13 reports handled that way over three months. That does not prove all 13 were wrong, but it showed how a confident model could quietly hide work. I changed the default so that matches were filed as new issues linked to the possible original.
I then built an 82-case test set: 73 written reports against real repository issues, including 20 deliberate near misses, plus 9 duplicate pairs recorded by people. A runner pushed each case through the real redaction, retrieval, model judgement and outcome logic. I compared six OpenAI models with the same prompt and threshold.
The model in use wrongly attached between three and five of the 20 near misses in every run. GPT-5.4 made no wrong attachments across three runs, so the shipped setup kept the smaller model for titles and moved duplicate judgement to GPT-5.4. Every model caught only two or three of the nine real pairs, so automatic attachment shipped switched off, with a documented trial for the client to run on real reports.
Tradeoffs
The central tradeoff was a wrong attachment against an extra issue. A wrong match can hide a distinct defect inside someone else’s ticket. An extra issue leaves a visible item for a developer to reconcile. I chose visibility, accepting some duplicates in GitHub, more reports held for review and a costlier model, over a matcher that looked efficient while silently swallowing reports.
The panel had a similar choice between stored and live data. Reading the stored subscription record avoids billing side effects but can be stale, so the panel shows when the record was last synced, and cancellation can ask Stripe directly when the stored record says nothing renews.
Operations shaped the design too. A full-text index in D1 was the obvious way to search the issue corpus, but it would have broken the weekly database export, so ranking moved into the Worker instead.
Outcome
The triage pipeline was released to production, with Focus Bear’s developer confirming the deployment, a real report and a rollback. The authenticated in-app reporting endpoint is enabled in production.
The panel’s backend was merged into Focus Bear’s API, switched off until configured. The whole panel ran end to end on infrastructure the team owned: a Zoho sandbox, a test Auth0 tenant and Stripe test mode, covering customer lookup, cancellation, already-cancelled handling and refusal of an expired confirmation. The panel interface was handed over with notes for Focus Bear to review and switch on.
The solution targets the complex triage work estimated at around 20 staff-hours a week. Realised time savings have not been measured yet.
Reflection
The decision that mattered most was not which model to use but what the system does when the model is unsure. Joining an existing production system also taught me that operational constraints such as backups, migrations and existing authentication matter as much as search quality. Next I would measure the real effect: a before and after sample of comparable reports, with product-aware human review of duplicate decisions, so the time saved is a number rather than an estimate.