Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/onenot8/issueLoop/llms.txt

Use this file to discover all available pages before exploring further.

These functions form the entry point of the IssueLoop pipeline. Call scan_repo to build a file inventory, run_tests to execute the test suite and record failures to a JSONL log, then create_tickets to send each failure through the LLM triage step and persist the resulting tickets in the database. The functions map directly to the three-step sequence shown in the quickstart.

scan_repo

Walks the repository directory, respects .gitignore rules, skips common noise directories (.git, node_modules, __pycache__, .venv), and writes a JSON inventory file to data/logs/<repo_name>_files.json.
inventory = issueloop.scan_repo("repos/myrepo")
repo_path
str
required
Path to the local repository directory. Resolved to an absolute path before scanning.
Returns a dict describing the scanned repository:
repo_path
str
Absolute path that was scanned.
file_count
int
Total number of files found (after applying ignore rules).
language_breakdown
dict
Mapping of language name to file count, e.g. {"python": 24, "typescript": 8, "unknown": 3}.
files
list[dict]
List of file dicts, each with path (repo-relative), ext, language, and size_bytes.

get_file_inventory

Reads the JSON inventory written by the most recent scan_repo call for the named repository. Returns None if no scan has been run yet.
inventory = issueloop.get_file_inventory("myrepo")
repo_name
str
required
Name of a repository previously scanned with scan_repo. Must match the directory name used at scan time.
Returns the inventory dict (same shape as scan_repo), or None if data/logs/<repo_name>_files.json does not exist.

run_tests

Reads the test manifest, runs every test entry for the named repository in priority order, and appends each result as a JSONL line to data/logs/run_<repo_name>.jsonl. Passing tests are logged too — only exit_code != 0 entries are later picked up by create_tickets.
results = issueloop.run_tests("myrepo")
repo_name
str
required
Must match a name entry in data/test_manifest.json.
Returns a list of result dicts, one per test that was executed:
timestamp
str
ISO 8601 UTC timestamp of when the test was run.
repo
str
Repository name.
command
str
The shell command that was executed.
test_id
str
The id field from the manifest entry.
blocking
bool
Whether the test was marked blocking in the manifest.
exit_code
int
Process exit code. 0 means pass.
stdout_tail
str
Last 2000 characters of stdout.
stderr_tail
str
Last 2000 characters of stderr.
Tests are run in ascending priority order as declared in the manifest. The underlying test_runner.run_tests function accepts a stop_on_first_blocking_failure: bool = False parameter that halts the loop after the first blocking test failure — this option is not exposed through the public issueloop.run_tests wrapper, so all tests always run when called via the top-level module.

run_single_test

Runs exactly one test from the manifest and appends its result to the same JSONL log used by run_tests. Raises ValueError if the test_id is not found in the manifest for the given repo.
result = issueloop.run_single_test("myrepo", "unit")
repo_name
str
required
Must match a name entry in data/test_manifest.json.
test_id
str
required
Must match the id of a test_types entry for that repo.
Returns a single result dict with the same fields as each element returned by run_tests.

create_tickets

Reads new failure entries from the JSONL run log (using a cursor to avoid re-processing), sends each failure to the configured LLM for triage and splitting, and persists the resulting tickets in the database.
tickets = issueloop.create_tickets("myrepo")
repo_name
str
required
Name of the repository whose log should be processed.
Returns a list of ticket dicts (see Ticket object shape). Returns an empty list if there are no new failures since the last call.
The LLM triage step splits a single failing test run into one or more tickets when the output contains multiple independent errors. Each resulting ticket gets its own error_summary and priority level.

test_manifest.json format

run_tests, run_single_test, and create_tickets all read from data/test_manifest.json relative to the IssueLoop working directory. The file must follow this structure:
{
  "repos": [
    {
      "name": "myrepo",
      "local_path": "repos/myrepo",
      "test_types": [
        {
          "id": "unit",
          "command": "pytest tests/",
          "blocking": true,
          "priority": 1
        },
        {
          "id": "lint",
          "command": "ruff check .",
          "blocking": false,
          "priority": 2
        }
      ]
    }
  ]
}
FieldTypeDescription
namestrUnique repository identifier used in all API calls
local_pathstrPath to the repository relative to the IssueLoop working directory
test_types[].idstrUnique test identifier within this repo — used as test_id throughout the API
test_types[].commandstrShell command to execute
test_types[].blockingboolWhether failures from this test are considered blocking
test_types[].priorityintExecution order — lower numbers run first

Build docs developers (and LLMs) love