Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
36de648
Demo: add multiply function with intentional lint issues for PatchPro…
waigisteve Sep 30, 2025
1bf18d8
test: introduce intentional Ruff and Semgrep failures to simulate CI …
waigisteve Oct 1, 2025
5ee0f50
test: add unused function and hardcoded secret to simulate CI findings
waigisteve Oct 1, 2025
e051af8
ci: add comprehensive test_sample.py with intentional issues
waigisteve Oct 2, 2025
e9a8e45
feat: complete CI/DevX integration with LLM support
waigisteve Oct 2, 2025
b35a337
docs: add comprehensive demo guide and usage instructions
waigisteve Oct 2, 2025
b483be6
ci: update workflow to use agent-dev branch
waigisteve Oct 2, 2025
aeeed2f
test: add CI test file to verify GitHub Actions workflow
waigisteve Oct 2, 2025
2f6af9c
test: inject obvious flaws and conflicts for PatchPro CI demo
waigisteve Oct 2, 2025
3069234
chore: update workflow and docs for PatchPro demo
waigisteve Oct 2, 2025
745c51e
fix: remove merge conflict markers and fix YAML syntax in workflow
waigisteve Oct 2, 2025
b6b892e
ci: use demo-update-2025-10-01 branch of patchpro-bot for testing
waigisteve Oct 2, 2025
5242c4e
ci: fix import error by running agent core as a module
waigisteve Oct 2, 2025
1a80ae4
fix: move permissions block to top of workflow file for valid YAML
waigisteve Oct 2, 2025
3914ef5
ci: rewrite workflow for robust PatchPro autocorrect and push
waigisteve Oct 2, 2025
7388b8b
ci: fix workflow git push with GITHUB_TOKEN authentication
waigisteve Oct 2, 2025
e3e74ed
ci: set contents: write for workflow push permissions
waigisteve Oct 2, 2025
951babb
ci: fetch and rebase before push to avoid rejected updates
waigisteve Oct 2, 2025
d18c52b
chore: PatchPro Bot autocorrect
Oct 2, 2025
63c8abb
ci: use agent-dev branch from patchpro-bot for agent core
waigisteve Oct 2, 2025
a043a18
chore: PatchPro Bot autocorrect
Oct 2, 2025
4df00fc
ci: add error handling and auto-resolution for analysis artifact conf…
waigisteve Oct 2, 2025
c017567
chore: PatchPro Bot autocorrect
Oct 2, 2025
cc53435
fix: clean up CI workflow to avoid workspace pollution
waigisteve Oct 2, 2025
fdc90a2
fix: remove git submodule reference that breaks GitHub Actions checkout
ezeanyicollins Oct 2, 2025
0eec4d2
chore: PatchPro Bot autocorrect
Oct 2, 2025
118fd1e
fix: focus analysis on PR changed files instead of entire repository
ezeanyicollins Oct 2, 2025
dad42f0
chore: remove artifact files from git tracking and update gitignore
ezeanyicollins Oct 2, 2025
545bd28
chore: PatchPro Bot autocorrect
Oct 2, 2025
e6a8c2d
feat: improve PR simulation for manual testing
ezeanyicollins Oct 2, 2025
242a5f4
chore: PatchPro Bot autocorrect
Oct 2, 2025
2e786c8
chore: remove artifact/ from git tracking (already in .gitignore)
ezeanyicollins Oct 5, 2025
dd445f6
ci: add agent-dev telemetry test workflow
ezeanyicollins Oct 5, 2025
3e5de87
feat: Add Render.com deployment configuration with Flask app
denis-mutuma Oct 7, 2025
d734fa6
feat: Add interactive code analysis with live testing capabilities
denis-mutuma Oct 7, 2025
1652a59
docs: Add comprehensive testing guide for interactive features
denis-mutuma Oct 7, 2025
a38d337
docs: Add deployment status summary
denis-mutuma Oct 7, 2025
cd1607b
feat: Add URL fetch capability - analyze code from GitHub, Gists, and…
denis-mutuma Oct 7, 2025
17cb434
feat: Integrate PatchPro AI-powered fix generation with OpenAI
denis-mutuma Oct 7, 2025
7d182ae
feat: Make AI analysis always-on - remove enable/disable toggle
denis-mutuma Oct 7, 2025
b6de55c
docs: Add comprehensive AI always-on update documentation
denis-mutuma Oct 7, 2025
64dc813
feat: Add user-provided API key input field
denis-mutuma Oct 7, 2025
063ae46
docs: Add user API key quick reference guide
denis-mutuma Oct 7, 2025
84cd4e5
docs: Add comprehensive success summary
denis-mutuma Oct 7, 2025
308c977
docs: Add complete project summary and overview
denis-mutuma Oct 7, 2025
a389f63
fix: Update OpenAI library version and improve client initialization
denis-mutuma Oct 7, 2025
d340fd5
docs: Add OpenAI client initialization fix documentation
denis-mutuma Oct 7, 2025
2a27fab
docs: Add comprehensive Render.com setup guide
denis-mutuma Oct 7, 2025
a2c1852
fix: Add Flask error handlers and improve fetch response validation
denis-mutuma Oct 7, 2025
9540c23
docs: Add FAQ and agent integration guide + improve logging
denis-mutuma Oct 7, 2025
4aed1bf
feat: Integrate PatchPro Bot agentic system
denis-mutuma Oct 7, 2025
0644763
docs: Add integration success summary
denis-mutuma Oct 7, 2025
cb17dd2
🚀 Add comprehensive repository analysis capabilities
Oct 9, 2025
3d7012d
🔧 Fix build configuration for Render deployment
Oct 9, 2025
e759b79
🔧 Enable PatchPro Bot AgentCore integration and testing
Oct 9, 2025
ab2565f
🤖 Fix PatchPro Bot installation for AgentCore integration
Oct 9, 2025
fc87ffd
🔧 Robust PatchPro Bot installation with build script
Oct 9, 2025
d39d2d5
🎭 Add Mock PatchPro Bot to demonstrate AgentCore capabilities
Oct 9, 2025
e76f70c
✅ Working Mock PatchPro Bot AgentCore Implementation!
Oct 9, 2025
03b6472
📚 Comprehensive README and PR documentation
Oct 9, 2025
eeb8dc3
📚 Final PR documentation and creation guide
Oct 9, 2025
40c700c
Update patchpro_integration_broken.py
waigisteve Oct 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions .github/workflows/patchpro-agent-dev-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
permissions:
contents: read
pull-requests: write

name: PatchPro Agent-Dev (Phase 1 Evaluation Test)
on:
pull_request:
branches:
- demo/patchpro-ci-test # Trigger for PRs targeting this branch
workflow_dispatch:

concurrency:
group: patchpro-agent-dev-${{ github.ref }}
cancel-in-progress: true

jobs:
patchpro-with-telemetry:
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Checkout demo repo
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0 # Need full history for git diff

- name: Checkout patchpro-bot (agent-dev branch)
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/patchpro-bot
path: patchpro-bot
ref: agent-dev # 🔥 NEW: Use agent-dev branch with telemetry
token: ${{ secrets.BOT_REPO_TOKEN }}

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install PatchPro with dependencies
run: |
python -m pip install --upgrade pip
pip install ./patchpro-bot
pip install ruff==0.5.7 semgrep==1.84.0

- name: Run PatchPro analyze-pr (Agentic Mode + Telemetry)
run: |
# Create .patchpro.toml with agentic mode enabled
cat > .patchpro.toml << 'EOF'
[agent]
enable_agentic_mode = true
agentic_max_retries = 3
agentic_enable_planning = true

[llm]
model = "gpt-4o-mini"
temperature = 0.1
max_tokens = 8192
EOF

# Run analyze-pr command (replaces old run_ci.py)
python -m patchpro_bot.cli analyze-pr \
--base origin/${{ github.base_ref }} \
--head HEAD \
--with-llm \
--artifacts .patchpro \
--no-exit-code
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PP_ARTIFACTS: .patchpro # For backward compatibility

- name: Upload PatchPro artifacts (including telemetry)
uses: actions/upload-artifact@v4
if: always()
with:
name: patchpro-telemetry-artifacts
path: |
.patchpro/
!.patchpro/.git
retention-days: 30

- name: Post PR comment with results
uses: marocchino/sticky-pull-request-comment@v2
if: always()
with:
recreate: true
path: .patchpro/report.md

- name: Display telemetry summary
if: always()
run: |
echo "## 📊 Telemetry Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

if [ -f .patchpro/traces/traces.db ]; then
echo "✅ Telemetry database created" >> $GITHUB_STEP_SUMMARY
echo "- Database size: $(du -h .patchpro/traces/traces.db | cut -f1)" >> $GITHUB_STEP_SUMMARY
echo "- Trace files: $(find .patchpro/traces -name '*.json' | wc -l)" >> $GITHUB_STEP_SUMMARY
else
echo "❌ No telemetry data captured" >> $GITHUB_STEP_SUMMARY
fi

if [ -d .patchpro ]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Generated Files" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
find .patchpro -type f -name '*.diff' -o -name '*.json' -o -name '*.db' | head -20 >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi
100 changes: 80 additions & 20 deletions .github/workflows/patchpro.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
permissions:
contents: read
contents: write
pull-requests: write

name: PatchPro (Sprint-0)
Expand All @@ -10,56 +10,116 @@ on:
concurrency:
group: patchpro-${{ github.ref }}
cancel-in-progress: true

jobs:
patchpro:
timeout-minutes: 10
timeout-minutes: 5
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout demo repo
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Checkout patchpro-bot
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/patchpro-bot
path: patchpro-bot
ref: main
token: ${{ secrets.BOT_REPO_TOKEN }} # PAT with read-only contents

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install analyzers
- name: Install analyzers and PatchPro
run: |
python -m pip install --upgrade pip
pip install ruff==0.5.7 semgrep==1.84.0
pip install git+https://github.com/${{ github.repository_owner }}/patchpro-bot.git@agent-dev

- name: Run analyzers (JSON artifacts)
- name: Get changed files in PR
id: changed-files
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
# Get changed Python files in the PR
git fetch origin ${{ github.base_ref }}
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '\.(py)$' | tr '\n' ' ' || echo "")
echo "changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT
echo "Changed Python files in PR: $CHANGED_FILES"
else
# For workflow_dispatch, simulate PR by comparing with main branch
echo "Simulating PR behavior - comparing with main branch"
git fetch origin main || git fetch origin master || echo "No main/master branch found"
CHANGED_FILES=$(git diff --name-only origin/main...HEAD 2>/dev/null | grep -E '\.(py)$' | tr '\n' ' ' || \
git diff --name-only HEAD~5...HEAD | grep -E '\.(py)$' | tr '\n' ' ' || \
echo "ci_test.py example.py test_sample.py")
echo "changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT
echo "Simulated PR changed files: $CHANGED_FILES"
fi

- name: Run analyzers on changed files
run: |
mkdir -p artifact/analysis
ruff check --output-format json . > artifact/analysis/ruff.json || true
semgrep --config .semgrep.yml --json > artifact/analysis/semgrep.json || true
CHANGED_FILES="${{ steps.changed-files.outputs.changed_files }}"

if [ -n "$CHANGED_FILES" ]; then
echo "Analyzing files: $CHANGED_FILES"
ruff check --output-format json $CHANGED_FILES > artifact/analysis/ruff_output.json || true
semgrep --config .semgrep.yml --json $CHANGED_FILES > artifact/analysis/semgrep_output.json || true
else
echo "No Python files changed, creating empty analysis files"
echo "[]" > artifact/analysis/ruff_output.json
echo '{"errors": [], "paths": {"scanned": []}, "results": [], "skipped_rules": [], "version": "1.84.0"}' > artifact/analysis/semgrep_output.json
fi

- name: Run PatchPro bot (Sprint-0 stub)
- name: Run PatchPro Agent Core
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python -m pip install ./patchpro-bot
python -m patchpro_bot.run_ci

- name: Set up git authentication for push
if: github.event_name == 'pull_request'
run: |
git config --global user.name "patchpro-bot"
git config --global user.email "patchpro-bot@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
env:
PP_ARTIFACTS: artifact
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit and push PatchPro autocorrected changes with error handling
if: github.event_name == 'pull_request'
run: |
set -e
git add .
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "chore: PatchPro Bot autocorrect"
git fetch origin ${{ github.head_ref }}
# Try to rebase, auto-resolve conflicts in analysis artifacts
if ! git rebase origin/${{ github.head_ref }}; then
echo "Rebase failed, attempting to resolve conflicts in analysis artifacts..."
git checkout --theirs artifact/analysis/*.json || true
git add artifact/analysis/*.json || true
git rebase --continue || true
fi
# Try to push, if fails, print error and exit gracefully
if ! git push origin HEAD:${{ github.head_ref }}; then
echo "Push failed after rebase. Please resolve conflicts manually."
exit 0
fi
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: patchpro-artifacts
path: artifact/

- name: Ensure report exists
run: |
if [ ! -f artifact/report.md ]; then
echo "No report generated." > artifact/report.md
fi

- name: Post summary comment
uses: marocchino/sticky-pull-request-comment@v2
with:
Expand Down
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

# Generated artifacts
artifact/
patchpro_demo.egg-info/
uv.lock
.env

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
venv/
env/
ENV/
*.egg-info/
dist/
build/

# IDE
.vscode/
.idea/
*.swp
*.swo

# Deployment
.render/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.0
Loading