Project layout: - src/: application modules (run_server, auto_merge_bot, health-check, sync-key, trivial_merge, callback_server, start_server) - scripts/: setup/deployment helpers (setup_all, setup_app, generate_manifest) - templates/: manifest.json (GitHub App manifest template) - docs/ + CONTRIBUTING.md: documentation Improvements: - flake.nix: added pr-agent-auto-merge wrapper binary, updated installPhase paths - deploy.yml: syntax check covers all modules including health-check.py and sync-key.py - README.md: comprehensive with architecture, layout, dev, ops, deployment - CONTRIBUTING.md: standards and testing checklist - .gitignore: added *.log, *.pid, .env.* - Cleanup: removed duplicate manifest_current.json / manifest_final.json - Fix: health-check.py docstring updated to claude-opus-5 Verification: - ✅ python3 -m py_compile: all 11 modules pass - ✅ nix flake check: passes
1.2 KiB
1.2 KiB
Contributing to PR-Agent Server
Development Workflow
- Fork the repo
- Create a feature branch:
git checkout -b feat/your-feature - Make changes — keep files organized in the project layout:
src/for application modulesscripts/for setup/deployment helperstemplates/for config templates
- Syntax check:
python3 -m py_compile src/*.py scripts/*.py - Nix build:
nix build .#default(verify the flake still builds) - Commit with descriptive message + push
- Open PR — the server's auto-merge bot will review it
Standards
- Python: 4-space indent, type hints where practical, no hardcode secrets
- Secrets: Always via environment variables or BWS at runtime — never in source
- Model names: Must be tested live against 9router before committing (strip
openai/prefix issue) - Nix: Update
flake.nixinstallPhaseif you move files between directories
Testing Checklist
python3 -m py_compilepasses on all modified filesnix build .#defaultsucceeds- CI syntax-check job passes
- New models tested via curl to 9router (not assumed)
- No secret values in git history (
sk-[a-z0-9]+patterns)