Skip to content

hyperpolymath/feedback-o-tron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

feedback-o-tron

License: PMPL-1.0 Version 1.0.0 RSR Certified Idris Inside Production Ready

Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk> v1.0.0, 2026-02-07 :toc: macro :icons: font :source-highlighter: rouge :experimental: :url-github: https://github.com/hyperpolymath/feedback-o-tron :url-gitlab: https://gitlab.com/hyperpolymath/feedback-o-tron :url-bitbucket: https://bitbucket.org/hyperpolymath/feedback-o-tron :url-codeberg: https://codeberg.org/hyperpolymath/feedback-o-tron

Autonomous multi-platform bug reporting for AI agents — Fully tested in production with real Bugzilla submissions.

Real World Tested

Overview

feedback-o-tron is a production-ready tool for autonomous AI agents to submit bug reports across multiple platforms. Successfully validated on 2026-02-07 with 2 real bugs filed to Fedora Bugzilla:

Built for reliability with formal verification via Idris2 for critical ABI definitions and memory safety proofs.

Key Features

  • Multi-platform submission: GitHub, GitLab, Bitbucket, Codeberg, Bugzilla, Email (6 platforms)

  • Bugzilla REST API: Full support for product/component/version targeting

  • Deduplication: Prevents duplicate submissions using fuzzy matching (Levenshtein distance)

  • Formal verification: Idris2 ABI definitions with dependent type proofs for memory layout correctness

  • Credential rotation: Avoids rate limits by rotating credentials

  • Audit logging: Complete JSON-lines format record of all operations

  • MCP integration: Works as Claude Code tool or standalone CLI

  • CLI mode: Standalone escript for batch operations and testing

Quick Start for AI Agents

Zero-Knowledge Setup Prompt

Copy-paste this prompt to any LLM or SLM (Claude, ChatGPT, Gemini, local models) to automatically configure feedback-o-tron:

I need you to set up feedback-o-tron, an autonomous bug reporting tool. Here's what you need to do:

1. Clone the repository from https://github.com/hyperpolymath/feedback-o-tron
2. Navigate to the elixir-mcp directory
3. Run `mix deps.get` to install dependencies
4. Build the escript with `mix escript.build`
5. Test with dry-run: `./feedback-a-tron submit --repo "test/repo" --title "Test" --body "Test body" --platform github --dry-run`
6. Set up credentials:
   - For GitHub: export GITHUB_TOKEN=ghp_your_token
   - For Bugzilla: export BUGZILLA_API_KEY=your_api_key
7. Configure as MCP server in ~/.config/claude/mcp_servers.json:
   {
     "feedback-o-tron": {
       "command": "/full/path/to/feedback-a-tron",
       "args": ["--mcp-server"],
       "env": {
         "GITHUB_TOKEN": "${GITHUB_TOKEN}",
         "BUGZILLA_API_KEY": "${BUGZILLA_API_KEY}"
       }
     }
   }

After setup, you can submit bugs with commands like:
./feedback-a-tron submit --repo "Fedora" --title "App crashes on launch" --body "Details..." --platform bugzilla --component "kde" --version "43"

Check STATE.scm in .machine_readable/ for project status and integrate with your workflow.

The AI agent will read this prompt and execute all setup steps automatically.

Manual Quick Start

# Clone
git clone {url-github}
cd feedback-o-tron/elixir-mcp

# Install dependencies
mix deps.get

# Build standalone CLI
mix escript.build

# Test (dry-run mode)
./feedback-a-tron submit \
  --repo "owner/repo" \
  --title "Bug title" \
  --body "Description" \
  --platform github \
  --dry-run

# Run MCP server mode
mix run --no-halt

Production Status (2026-02-07)

v1.0.0 - Production Ready

Successfully validated in real-world production:

  • ✅ 2 bugs filed to Fedora Bugzilla (#2437503, #2437504)

  • ✅ CLI module: Complete with --mcp-server, submit, --version, --help commands

  • ✅ Bugzilla REST API: Full product/component/version support

  • ✅ 6 platforms: GitHub, GitLab, Bitbucket, Codeberg, Bugzilla, Email

  • ✅ Credential loading: Environment variables + CLI configs (gh, glab)

  • ✅ Deduplication: Fuzzy matching with Levenshtein distance

  • ✅ Audit logging: Complete event tracking with JSON-lines format

  • ✅ Test suite: 26/26 tests passing

Bugs fixed during validation:

  1. Mix.env() usage in escript (replaced with Application.get_env)

  2. Missing CLI module

  3. Missing :submission event type

  4. Deduplicator binary_part out of range

  5. Bugzilla credentials not loading

  6. Bugzilla component hardcoded (now configurable via --component flag)

MCP Integration:

  • MCP server supports stdio (default) for Claude Code integration

  • TCP mode available (line-delimited JSON-RPC on port 844)

  • Systemd service files included for daemon mode

Usage

As Standalone CLI

# Submit to GitHub
./feedback-a-tron submit \
  --repo "owner/repo" \
  --title "Bug: Something is broken" \
  --body "Full description..." \
  --platform github \
  --label "bug"

# Submit to Bugzilla (real-world tested)
./feedback-a-tron submit \
  --repo "Fedora" \
  --title "maliit-keyboard crash loop on startup" \
  --body "Package: maliit-keyboard\nCrashes with SIGABRT..." \
  --platform bugzilla \
  --component "maliit-keyboard" \
  --version "43"

# Multi-platform submission
./feedback-a-tron submit \
  --repo "owner/repo" \
  --title "Feature request" \
  --body "..." \
  --platform github \
  --platform gitlab \
  --platform codeberg

# Dry-run (test without submitting)
./feedback-a-tron submit \
  --repo "test/repo" \
  --title "Test" \
  --body "Test" \
  --dry-run

# Show version
./feedback-a-tron --version

# Show help
./feedback-a-tron --help

As Elixir Library

# Submit to GitHub
FeedbackATron.Submitter.submit(%{
  title: "Bug: Something is broken",
  body: "Description of the issue...",
  repo: "owner/repo"
}, platforms: [:github])

# Submit to Bugzilla
FeedbackATron.Submitter.submit(%{
  title: "maliit-keyboard crash",
  body: "Package crashes on startup...",
  repo: "Fedora"
}, platforms: [:bugzilla], component: "maliit-keyboard", version: "43")

# Submit to multiple platforms
FeedbackATron.Submitter.submit(%{
  title: "Feature request",
  body: "...",
  repo: "owner/repo"
}, platforms: [:github, :gitlab, :codeberg, :bugzilla])

# With deduplication check
FeedbackATron.Deduplicator.check(%{title: "...", body: "..."})
# => {:ok, :unique} | {:duplicate, existing} | {:similar, matches}

As MCP Tool (Claude Code)

The MCP server exposes a submit_feedback tool for autonomous AI bug reporting:

{
  "tool": "submit_feedback",
  "params": {
    "title": "Bug report",
    "body": "Full description with reproduction steps...",
    "platforms": ["github", "gitlab", "bugzilla"],
    "repo": "owner/repo"
  }
}

MCP configuration in ~/.config/claude/mcp_servers.json:

{
  "feedback-o-tron": {
    "command": "/path/to/feedback-a-tron",
    "args": ["--mcp-server"],
    "env": {
      "GITHUB_TOKEN": "${GITHUB_TOKEN}",
      "BUGZILLA_API_KEY": "${BUGZILLA_API_KEY}"
    }
  }
}

Formal Verification with Idris2

feedback-o-tron uses Idris2 for formal verification of critical ABI definitions and memory safety guarantees.

ABI Layer (src/abi/)

-- Type-level memory layout proofs
LayoutCorrect : (t : Type) -> (size : Nat) -> (align : Nat) -> Type

-- Platform-specific type definitions with formal guarantees
data PlatformType : Type where
  GitHub : PlatformType
  GitLab : PlatformType
  Bugzilla : PlatformType
  -- Proven at compile-time to match C ABI

Key modules:

  • Types.idr: ABI type definitions with dependent type proofs

  • Layout.idr: Memory layout correctness proofs

  • Foreign.idr: FFI function declarations with verified signatures

Integration with Proven Repo

Can leverage 90+ formally verified modules from the proven repo:

  • SafeMath: Overflow-safe arithmetic with mathematical proofs

  • SafeString: Buffer overflow prevention with length proofs

  • SafeJSON: Type-safe JSON parsing with schema validation

  • SafeURL: URL parsing with format guarantees

Integration architecture:

Idris2 (Formal Proofs)
   ↓
Zig FFI (C ABI Bridge)
   ↓
Elixir/BEAM (Runtime)

This ensures provable correctness at the ABI boundary while maintaining runtime flexibility in Elixir.

Architecture

┌─────────────────────────────────────────────────────────────┐
│                   FeedbackOTron                             │
├─────────────────────────────────────────────────────────────┤
│  ┌──────────┐  ┌──────────────┐  ┌─────────────────────┐   │
│  │Submitter │  │ Deduplicator │  │ NetworkVerifier     │   │
│  │          │  │              │  │  - Latency/jitter   │   │
│  │ - GitHub │  │ - SHA-256    │  │  - DNS verification │   │
│  │ - GitLab │  │ - Levenshtein│  │  - TLS validation   │   │
│  │-Bitbucket│  │ - Fuzzy match│  │  - BGP/RPKI checks  │   │
│  │-Codeberg │  │              │  │                     │   │
│  │-Bugzilla │  │              │  │                     │   │
│  │ - Email  │  │              │  │                     │   │
│  └──────────┘  └──────────────┘  └─────────────────────┘   │
│                                                             │
│  ┌──────────────────────────────────────────────────────┐  │
│  │                  AuditLog                             │  │
│  │  - All submissions recorded                          │  │
│  │  - JSON lines format                                 │  │
│  │  - Event types: :submission, :success, :error       │  │
│  └──────────────────────────────────────────────────────┘  │
├─────────────────────────────────────────────────────────────┤
│                   Credentials                               │
│  - Environment variables (GITHUB_TOKEN, BUGZILLA_API_KEY)  │
│  - CLI configs (gh, glab)                                  │
│  - Rotation for rate limit avoidance                       │
├─────────────────────────────────────────────────────────────┤
│                Idris2 ABI Layer (Formal Verification)       │
│  - Memory layout proofs                                     │
│  - Type-level correctness guarantees                        │
│  - FFI safety via Zig C ABI bridge                         │
└─────────────────────────────────────────────────────────────┘

Setup for Different LLMs

Claude Code (Anthropic)

  1. Add to ~/.config/claude/mcp_servers.json:

    {
      "feedback-o-tron": {
        "command": "/full/path/to/feedback-a-tron",
        "args": ["--mcp-server"],
        "env": {
          "GITHUB_TOKEN": "${GITHUB_TOKEN}",
          "BUGZILLA_API_KEY": "${BUGZILLA_API_KEY}"
        }
      }
    }
  2. Restart Claude Code

  3. Use tool: submit_feedback with parameters

ChatGPT / GPT-4 (OpenAI)

Use as CLI tool with GPT Code Interpreter or via API:

# GPT can execute shell commands
./feedback-a-tron submit --repo "owner/repo" --title "..." --body "..." --platform github

Or integrate via API wrapper.

Gemini (Google)

Use as CLI tool:

# Gemini can execute commands in code execution environment
./feedback-a-tron submit --repo "..." --title "..." --body "..." --platform bugzilla --component "..." --version "..."

Local SLMs (Ollama, LM Studio, etc.)

  1. Install feedback-o-tron as escript

  2. Expose via function calling or tool use API

  3. Configure credentials in environment

  4. Call via shell execution

Example function definition:

{
  "name": "submit_bug_report",
  "description": "Submit a bug report to GitHub, GitLab, Bitbucket, Codeberg, Bugzilla, or Email",
  "parameters": {
    "type": "object",
    "properties": {
      "title": {"type": "string", "description": "Bug title"},
      "body": {"type": "string", "description": "Full bug description"},
      "repo": {"type": "string", "description": "Repository (owner/repo or product name for Bugzilla)"},
      "platform": {"type": "string", "enum": ["github", "gitlab", "bitbucket", "codeberg", "bugzilla", "email"]},
      "component": {"type": "string", "description": "Bugzilla component (optional)"},
      "version": {"type": "string", "description": "Bugzilla version (optional)"}
    },
    "required": ["title", "body", "repo", "platform"]
  }
}

Troubleshooting

Build Errors

Error: Could not generate escript, module Elixir.FeedbackATron.CLI could not be loaded

  • Fix: Ensure CLI module exists at lib/feedback_a_tron/cli.ex

  • Run: mix compile before mix escript.build

Error: function Mix.env/0 is undefined (module Mix is not available)

  • Cause: Mix module not available in compiled escript

  • Fix: Use Application.get_env(:feedback_a_tron, :env) instead

Credential Issues

Error: {:error, :no_credentials}

  • Check environment variables are set: echo $GITHUB_TOKEN

  • Or check CLI configs exist:

    • ~/.config/gh/hosts.yml (GitHub)

    • ~/.config/glab-cli/config.yml (GitLab)

Error: Bugzilla authentication failed

  • Verify API key: export BUGZILLA_API_KEY=your_key

  • Test with curl:

    curl -H "Authorization: Bearer $BUGZILLA_API_KEY" \
      https://bugzilla.redhat.com/rest/bug/2437503

Platform-Specific Errors

Bugzilla: There is no component named 'X' in the 'Y' product

  • Fix: Use correct component name with --component flag

  • List valid components via Bugzilla web UI or API

GitHub: Rate limit exceeded

  • Fix: Credential rotation will automatically use next token

  • Or wait for rate limit reset

Deduplication

Error: binary_part out of range

  • Fixed in v1.0.0: Body normalization now happens before slicing

  • Upgrade to latest version

Network Verification

Before and after submission, FeedbackOTron verifies:

Check Purpose

Latency/Jitter

Detect unstable connections

Packet loss

Ensure data integrity

DNS resolution

Verify correct destination

DNSSEC

Prevent DNS spoofing

TLS certificate

Verify endpoint identity

BGP origin

Detect route hijacking

Configuration

Credentials

Environment variables (recommended):

# GitHub (or auto-detected from gh CLI)
export GITHUB_TOKEN=ghp_...

# GitLab (or auto-detected from glab CLI)
export GITLAB_TOKEN=glpat_...

# Bitbucket (requires username)
export BITBUCKET_TOKEN=...
export BITBUCKET_USERNAME=your_username

# Codeberg (Gitea-compatible API)
export CODEBERG_TOKEN=...

# Bugzilla (tested with Fedora Bugzilla)
export BUGZILLA_API_KEY=your_api_key
export BUGZILLA_URL=https://bugzilla.redhat.com  # optional, defaults to RH

# Email (SMTP configuration)
export SMTP_HOST=smtp.example.com
export SMTP_PORT=587
export SMTP_USERNAME=user
export SMTP_PASSWORD=pass
export SMTP_FROM=feedback@example.com
export FEEDBACK_EMAIL_TO=bugs@example.com

Auto-detection: If environment variables are not set, feedback-o-tron will attempt to load credentials from:

  • ~/.config/gh/hosts.yml (GitHub)

  • ~/.config/glab-cli/config.yml (GitLab)

Platform-Specific Options

Bugzilla:

# Component and version are REQUIRED for Bugzilla
./feedback-a-tron submit \
  --repo "Fedora" \
  --title "..." \
  --body "..." \
  --platform bugzilla \
  --component "maliit-keyboard" \  # Required: package/component name
  --version "43"                   # Required: version (or "rawhide")

Default values:

  • Component: "distribution" (generic)

  • Version: "rawhide" (development)

  • Severity: "medium"

  • OS: "Linux"

  • Platform: "x86_64"

Testing

Unit Tests

cd elixir-mcp
mix test

Test coverage:

  • Submitter: GitHub, GitLab, Bitbucket, Codeberg, Bugzilla platforms

  • Deduplicator: Exact hash, fuzzy matching, Levenshtein distance

  • Credentials: Environment variables, CLI config loading

  • Audit log: Event recording, JSON-lines format

Integration Tests

Dry-run mode (no actual submission):

./feedback-a-tron submit \
  --repo "test/repo" \
  --title "Test bug" \
  --body "Test description" \
  --platform github \
  --dry-run

Expected output:

✅ Submission ABC123 completed
  [DRY RUN] github: Would submit

Real-World Validation

Production bugs filed (2026-02-07):

  1. Bug #2437503: maliit-keyboard crash loop

    • Platform: Fedora Bugzilla

    • Component: maliit-keyboard

    • Version: 43

    • Status: Successfully submitted with full stack trace

  2. Bug #2437504: xwaylandvideobridge portal error

    • Platform: Fedora Bugzilla

    • Component: plasma-desktop

    • Version: 43

    • Status: Successfully submitted with error details

Both bugs demonstrate end-to-end workflow:

  • AI agent detected crashes via system logs

  • Formatted bug reports with reproduction steps

  • Submitted to Bugzilla REST API

  • Received bug IDs and URLs

  • Audit logs recorded all operations

Future Enhancements

Proven Repo Integration

The proven repository provides 90+ formally verified Idris2 modules that can enhance feedback-o-tron:

SafeMath: Overflow-safe arithmetic with mathematical proofs

-- Addition with overflow detection
safeAdd : (a : Nat) -> (b : Nat) -> Either OverflowError (n : Nat ** n = a + b)

SafeString: Buffer overflow prevention

-- String operations with length proofs
safeConcat : (s1 : String) -> (s2 : String) ->
             {auto prf : length s1 + length s2 <= maxLen} -> String

SafeJSON: Type-safe JSON parsing with schema validation

-- Parse JSON with compile-time schema validation
parseJSON : (schema : JSONSchema) -> String -> Either ParseError (JSONValue schema)

Integration approach:

  1. Use Idris2 for formal specification of API contracts

  2. Generate Zig FFI bindings via C ABI

  3. Call from Elixir via NIFs

  4. Maintain formal proofs for critical paths

Benefits:

  • Compile-time guarantees of API correctness

  • Memory safety proofs at FFI boundaries

  • Mathematical verification of deduplication algorithms

  • Provably correct credential rotation

Mirrors

Platform URL

GitHub (primary)

{url-github}

GitLab

{url-gitlab}

Bitbucket

{url-bitbucket}

Codeberg

{url-codeberg}

License

Licensed under PMPL-1.0-or-later (Palimpsest License).

See LICENSE.txt for details.

Contributing

OPSM Core
  |
  v
feedback-o-tron (feedback/telemetry capture for OPSM (opt‑in))