Skip to content

Investigation mode

From a reported incident to a proven cause

You add a label to an incident ticket. Forge reads the code, change history, logs and data of the project, with read-only access to all of it. It writes a report in the ticket: where the cause is, what proves it and how to fix it. It changes neither the code nor the ticket status.

  • Reporter

    Describes the incident in a ticket and adds the investigation label.

  • Incident owner

    Reads the report and decides on the fix: sends it to implementation or does it by hand.

  • Forge operator

    Turns investigation on in the project settings and connects the data sources.

  • Your system administrator

    Sets up read-only access for Forge to databases, logs and CI.

How investigation works

Five steps from the report to the decision on a fix.

Investigation flow: people and Forge take turns over five steps

If the ticket does not say what failed, Forge only asks questions in step 3 and stops. Once you answer and remove the ai-needs-human label, the investigation starts again.

Step by step

  1. Reporter

    Step 1: Describe the incident and add the label

    In the ticket, write what failed, where and when it happened and how it shows. The ID of an affected record or a link to a failed pipeline helps too.

    Then add the investigation label. The ticket status does not matter: the investigation runs in the backlog as well as in Code Review, and the ticket stays where it is.

    TicketPRJ-214

    Some November invoices have the wrong VAT rate

    Since 28 Nov, some invoices in the portal show 21% VAT instead of 12%. Production, about 40 invoices according to support.

    Labels
    incident investigate
  2. Forge

    Step 2: Forge checks access to the data

    Before it starts looking, Forge sets up access to the project's data sources and checks it. For a database, it verifies that the account can only read and cannot reach anyone else's data. For logs and CI, it verifies that the account or token cannot write.

    If any source fails the check, the run ends before the search starts. Smaller issues do not stop the run, and the report lists them as caveats.

    Data source check

    Sources

    • Database
    • Logs
    • CI

    Findings

    • VerifiedThe database account can only read and sees only the data of the project.
    • VerifiedThe logs account cannot write or read passwords.
    • CaveatThe database account can create temporary tables.
  3. Forge

    Step 3: Forge looks for the cause

    Forge reads the ticket, including comments and attachments, and goes through the project's repositories. It builds a timeline, forms hypotheses and tests them with targeted queries against the data and logs. Before settling on a verdict, it tries to disprove it.

    If the ticket does not say what failed, Forge does not look for the cause. It checks the data at most for the environment and time of the incident, writes specific questions in the ticket and stops.

    What Forge reads

    Sources

    • Code
    • Change history
    • Database
    • Logs

    Findings

    • RejectedA price list error: the 12% rate in it is correct.
    • HypothesisThe price recalculation changed on 27 Nov alters the rate.
    • VerifiedAll 38 wrong invoices were created after that change went live.
  4. Forge

    Step 4: Forge writes a report

    Forge posts the report as a comment in the ticket and adds the ai-investigated label. The report starts with a classification: where the cause is, what kind of fix is needed and how confident Forge is.

    Then come a one-sentence verdict, where the problem is, a proposed fix, a timeline with evidence, rejected hypotheses and what could not be verified. Each piece of evidence is written so you can check it yourself.

    CommentsPRJ-214
    Forge5 minutes ago

    🔎 Incident investigation
    Classification: cause code · fix code · confidence high

    Verdict: Since 27 Nov, the price recalculation rounds the rate before it picks the product category, so 38 invoices got 21% instead of 12%.

    Fix: restore the order of steps in the recalculation and recalculate the 38 invoices with the command in the report.

    ➡️ The fix is a code change. To have Forge implement it from this report, add the forge label.

  5. Incident owner

    Step 5: Decide on the fix

    The investigation does not fix anything itself. If the report recommends a code change, add the implementation label to the ticket. Implementation reads the ticket comments, so it gets the report as part of the request.

    A person fixes data or does any manual step. For a data fix, the report gives the exact command. Forge never writes anything to the sources itself.

    TicketPRJ-214

    Some November invoices have the wrong VAT rate

    The report is in the comments. Forge does the code fix, support recalculates the invoices with the command from the report.

    Labels
    incidentinvestigateai-investigated forge

Labels Forge adds

The label on the ticket tells you how the investigation ended.

  • ai-running

    The investigation is running.

  • ai-investigated

    The report is in the ticket. Remove the label to run the investigation again.

  • ai-needs-human

    Forge is asking for more information, a data source failed the check, or the investigation failed. The ticket comment says what happened.

When something gets stuck

  • Forge only asked questions. What now?

    Answer the questions in a ticket comment or add to the description. Then remove the ai-needs-human label and the investigation starts again. Until you remove it, the label stays on the ticket even in the Done status, so the investigation does not keep restarting.

  • What if a data source fails the check?

    The ticket comment gives the exact cause, for example that the database account can write. Once your system administrator fixes the access, remove ai-needs-human.

  • What if the investigation fails?

    Forge tries again. After the third failed attempt, it hands the ticket to a person, the same as when a run leaves neither a report nor questions. Once you remove what blocks the investigation and the ai-needs-human label, the count starts from zero.

  • How do I run the investigation again?

    Remove the ai-investigated label from the ticket. This is useful when new information comes in or the incident happens again.

  • Why does the report not name specific customers?

    The report leaves out rows with personal data on purpose and keeps to IDs, counts and aggregates. If something like a national ID number or an email address still slips in, Forge replaces it with [redacted] before posting.

  • What if the ticket also has the implementation label?

    The investigation goes first. Implementation, spec review and merge request maintenance wait until the ticket gets ai-investigated.

What needs to be set up

Your Forge operator turns investigation on in the project settings. Your system administrator sets up the access.

Project details

  • the label that starts an investigation,
  • data sources: databases, APIs and logs,
  • a CI source for the repositories whose failed pipelines Forge should read.

Read-only access

  • The database account can only read, and only the project's data. It cannot see other databases on the same server.
  • The cloud logs account gets read-only roles. It must not write, act as another account or read secrets.
  • The CI token can only read the listed repositories. Forge checks this before the search starts.

Missing access to metrics or traces does not stop the run. The report lists it as a caveat.

Technical details

For those who set up investigation or want to know what Forge does with data.

Report

  • The classification has three parts: cause (code, data, config, partner, not-a-bug, unknown), fix (code, data, manual, none) and confidence (high, medium, low).
  • The report ends with the caveats from the source check, followed by the model, run time, cost and the list of data sources.
  • A report too long for one comment comes as several comments in a row.
  • Forge strips the project's credentials from the report, even if they were copied into the text.

Personal data

  • Forge detects and replaces national ID numbers, bank account numbers, IBANs, email addresses and phone numbers. It does not detect names or addresses.
  • It does the same with the text the client portal shows while the run is in progress.
  • From each run, Forge keeps the input, its queries and its own text. It does not keep what the databases, logs and other sources returned.
  • Forge keeps the record of the run's progress in its operational log for 30 days.

Failed pipeline

If the ticket links to a failed pipeline and the project has a CI source set up for that repository, Forge reads the pipeline, its jobs and logs, and includes the cause in the report. It does not restart or cancel anything. It does not read a pipeline in a repository missing from the CI source, and the report lists it among what could not be verified.

What Forge does not do in investigation

  • It does not change the code, commit anything or open a merge request.
  • It does not change the ticket status.
  • It does not write to databases, logs or CI. It proposes a data fix as a command that a person runs.