The fix-apply layer lets IssueLoop go beyond finding and cataloguing bugs — it can propose a shell command to repair the problem, check that command against an explicit allowlist before running it, re-execute the associated test, and mark the ticket resolved if the test passes. This layer is off by default: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.
apply_fix will deny every command until you add an entry to config/permission.yaml. This is intentional — running arbitrary shell commands against a codebase is irreversible, and the allowlist is your only gate.
Configure the allowlist
The permission system readsconfig/permission.yaml. The file is resolved in priority order: the ISSUELOOP_PERMISSION_PATH environment variable → ./config/permission.yaml in your current directory → the bundled package default (which allows nothing).
The default file looks like this:
global.allowed_exact — exact string match
global.allowed_exact — exact string match
Commands in this list are allowed for every repo. The entire command string must match exactly (no wildcards).
global.allowed_patterns — regex match, all repos
global.allowed_patterns — regex match, all repos
Patterns here are tested with
re.fullmatch against the command string. They apply to every repo.per_repo.<name>.allowed_patterns — regex match, one repo
per_repo.<name>.allowed_patterns — regex match, one repo
Scope a pattern to a single repository by placing it under its name in
per_repo. This is the recommended approach when a command is specific to one project.test_manifest.json for a repo is automatically allowed for that repo without any extra configuration — the permission system loads the manifest’s command list as an implicit exact-match set.
propose_fix
Store a proposed shell command on a ticket before attempting to run it. This separates the planning step from the execution step and lets you inspect or modify the proposed command before committing.propose_fix writes the command to the ticket’s proposed_fix field and returns the updated ticket dict. The command is not run at this point — no permission check is performed yet.
apply_fix
apply_fix executes the full fix-verify-resolve cycle:
- Look up the ticket and read its
proposed_fix. - Check the command against the allowlist — raise
PermissionDeniedand return"denied"if it is not allowed. - Run the command in the repo’s
local_path. - Re-run the ticket’s associated test (
test_id) viarun_single_test. - If the test passes, mark the ticket
doneand return"resolved". - If the test fails, increment the attempt counter and retry or escalate.
status key:
"resolved"
The fix was applied and the associated test now passes. The ticket is marked
done."retry"
The fix was applied but the test still fails. The ticket is reset to
pending and the attempt count is incremented."escalated"
The fix failed and
max_retries has been reached. The ticket is set to needs_human."denied"
The command is not in the allowlist. Nothing was run. Add an entry to
config/permission.yaml to permit it.Retry and escalation
apply_fix accepts a max_retries parameter (default 3). Each failed attempt increments the ticket’s attempts counter. When attempts reaches max_retries, the status is set to needs_human and the escalation summary records how many attempts were made and what the proposed fix was.
Audit log
Every permission decision — whether the command was allowed by exact match, allowed by pattern, or denied — is written todata/logs/permission_audit.jsonl. Retrieve recent entries with:
ISO 8601 timestamp (UTC) of the permission decision.
One of
"allowed_exact", "allowed_pattern", or "denied".The repo the command was checked against.
The full command string that was checked.
For
"allowed_pattern" events, the regex pattern that matched. Empty for other events.check_permission
Check whether a command would be allowed for a repo without actually running anything. Useful for validating yourpermission.yaml configuration before committing to an automated pipeline.
check_permission performs the same allowlist lookup as apply_fix — including the implicit manifest commands — and writes an audit entry, so every check is logged.