Skip to content

feat: add autonomous bounty-hunting agent (Bounty #861)#1009

Open
liufang88789-ui wants to merge 1 commit intoSolFoundry:mainfrom
liufang88789-ui:feat/bounty-861-clean
Open

feat: add autonomous bounty-hunting agent (Bounty #861)#1009
liufang88789-ui wants to merge 1 commit intoSolFoundry:mainfrom
liufang88789-ui:feat/bounty-861-clean

Conversation

@liufang88789-ui
Copy link
Copy Markdown

Overview

Implements a full Autonomous Bounty-Hunting Agent for SolFoundry — a state-machine system that autonomously finds, analyzes, plans, implements, tests, and submits solutions for GitHub bounty issues.

This PR is a clean replacement for earlier draft work and contains only the files relevant to Bounty #861.


What’s Included

automaton/bounty_hunter/agent.py

  • Main BountyHunterAgent state machine
  • Flow: IDLE → SCANNING → ANALYZING → PLANNING → IMPLEMENTING → TESTING → SUBMITTING → DONE
  • Supports scanning for bounties, selecting a target, generating code, testing, and creating PRs

automaton/bounty_hunter/github_client.py

  • GitHub API wrapper for:
    • listing open bounty issues
    • reading issue details
    • creating branches
    • updating files
    • opening pull requests
  • Includes bounty metadata parsing (tier, reward, domain)

automaton/bounty_hunter/planner.py

  • LLM-backed planner that:
    • analyzes bounty requirements
    • produces a structured implementation plan
    • can generate code per implementation step
  • Falls back to heuristic planning if no API key is configured

automaton/bounty_hunter/coder.py

  • Applies generated file changes locally
  • Handles git staging, commit, and push workflows
  • Provides basic codebase exploration utilities

automaton/bounty_hunter/tester.py

  • Detects test frameworks (pytest, jest, vitest, mocha, unittest)
  • Runs tests and parses results
  • Includes lightweight lint integration hook

automaton/bounty_hunter/test_bounty_hunter.py

  • Minimal validation tests covering:
    • bounty metadata parsing
    • planner fallback behavior
    • test framework detection

automaton/bounty_hunter/README.md

  • Usage, architecture, CLI examples, and integration notes

Acceptance Criteria Mapping

  • Multi-LLM agent orchestration with planning
    Implemented through the planner-driven workflow and pluggable LLM integration.
  • Automated solution implementation and testing
    Implemented via the coder + tester modules.
  • Autonomous PR submission with proper formatting
    Implemented via GitHub client + branch/PR creation flow.

Validation

Ran locally:

python3 -m py_compile automaton/bounty_hunter/*.py
python3 -m pytest automaton/bounty_hunter/test_bounty_hunter.py -q

Result:

  • py_compile
  • pytest3 passed

Wallet

Solana: 7UqBdYyy9LG59Un6yzjAW8HPcTC4J63B9cZxBHWhhHsg

EVM: 0x7F3a01563C504bD57aa465dd6273Ef21AF8F7784


Closes #861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏭 Bounty T3: Full Autonomous Bounty-Hunting Agent

1 participant