Spaces:
Sleeping
Sleeping
Commit History
-
fix: add pyproject.toml for openenv validate multi-mode deployment
53a2a51 -
fix: openenv app IS main app so /reset /step at root — passes automated checker
22f91bc -
fix: reset POST - correct State fields, reward=0.0 on reset, complete Dockerfile + openenv.yaml
f72c418 -
feat: complete 30-rule official bug engine (R-N1..R-L5) per hackathon spec
f63e772 -
feat: comprehensive 30-rule pattern analyzer covering security/logic/style/concurrency across all languages
748fdb2 -
fix: skip LLM entirely when no API keys are configured, stop request log spam
e3f03e2 -
Fix create_fastapi_app() missing arguments for action_cls and observation_cls
45b8cab -
fix: fully compliant inference.py per hackathon pre-submission checklist
e5443c9 -
fix: resolve create_fastapi_app TypeError, restore _SYSTEM_PROMPT, fix /api/train body parsing
af2db79 -
Fix 404/500 errors: Clean up main.py, agent.py, training_loop.py for endpoint registration
e999a76 -
Fix endpoint registration and app structure for Hugging Face Spaces compatibility
f7a26b5 -
Enable RL training endpoint for Hugging Face Spaces (FastAPI)
56f6a4d -
feat: revamp with LLM-powered code analysis
NEW FEATURES: - Replaced pattern-based bug detection with Claude/GPT analysis - LLM understands code semantically, finds complex issues - Fallback to pattern-based detection if LLM fails or API keys missing - Works on HF Spaces with ANTHROPIC_API_KEY or OPENAI_API_KEY env vars - Smarter bug detection: SQL injection, XSS, race conditions, etc. - Confidence scores from LLM (0.75-0.99 range) - All bugs returned with category, severity, and fix suggestions BACKWARDS COMPATIBLE: - Single entry point: app.py imports from main.py (HF Space safe) - Same API response format - Health and stats endpoints unchanged - Pattern-based fallback ensures it works without API keys TESTED: - SQL injection detection: confidence 0.95 - Clean code detection: no false positives - Test script: test_llm_api.py8b06b9c -
fix: add PYTHONPATH setup in app.py for openenv imports
- Add openenv-course-tmp to sys.path before importing main - Enables FastAPI app to start when app.py is used as entry point - Confirms app:app entry point works with uvicorn5c49cd2 -
fix: consolidate app.py as FastAPI entry point for HF Space deployment
- Replaced old Flask code with simple FastAPI import from main.py - Ensures HF Space uses working bug detection system (main.py) - Fixes deployment mismatch between localhost and HF Spaces - app.py now acts as universal entry point for all deployment targets4ad1b43 -
docs: add debugging guide for mock vs real API data
aea1555 -
improve: add debugging and fix fallback confidence field
f971627 -
test: add mock vs real data comparison
02f6d96 -
docs: add guide explaining real vs mock data
4aef408 -
remove: embedded git submodule
b8d806a -
docs: add comprehensive test suite and verification reports
caaf9d1 -
fix: correct regex backreference in infinite recursion detection - enable API functionality
8455548 -
WIP: removing bad regex patterns
b850afb -
feat: add confidence scores, multi-language support, and export
05cb78e -
feat: display ALL bugs with tabbed navigation
FRONTEND CHANGES: - Display all detected bugs (not just primary_bug) - Tab-style navigation with prev/next buttons (← Bug N/M →) - Bug counter shows current position (e.g., 'Bug 3/12') - Summary grid for quick navigation between bugs - Click any bug in summary to jump directly to it - Visual indicator highlights current bug in grid - Each bug shows: category, severity dots, line hint, comment, fix NEW CSS STYLES: - .bug-header: Navigation controls layout - .bug-nav: Prev/next button group - .bug-nav-btn: Styled navigation buttons (disabled state) - .bug-summary-grid: Grid of mini cards for all bugs - .bug-mini-card: Clickable bug preview with category/severity NEW JAVASCRIPT: - allBugs: Store all detected bugs in memory - currentBugIndex: Track which bug we're viewing - prevBug(): Navigate to previous bug - nextBug(): Navigate to next bug - displayBug(bug): Render single bug details - updateBugNav(): Update button states and counter - renderResult(): Enhanced to handle multiple bugs …cd0f5b1 -
feat: scan for ALL bugs, not just first one - comprehensive analysis
BACKEND CHANGES: - New analyze_code_comprehensively() finds ALL bugs instead of stopping at first - Returns list of bugs sorted by severity (most critical first) - Detects many more Python-specific bugs NEW PYTHON BUG DETECTIONS: - Mutable default arguments (Severity 3) - Modifying list while iterating (Severity 3) - Shadowing built-ins like list/dict (Severity 2) - Missing return statements (Severity 2) - Race conditions in threading (Severity 3) - Bare except clauses (Severity 2) - Type errors (string + int) (Severity 2) - Missing error handling (Severity 2) - Inefficient nested loops O(n²) (Severity 2) - Infinite recursion (Severity 3) - Logical errors (identical branches) (Severity 2) API RESPONSE FORMAT: { 'bugs_found': 11, 'bugs': [...all bugs...], 'primary_bug': {...most critical bug...} } FRONTEND CHANGES: - Updated renderResult() to handle multiple bugs - Shows bug count if multiple detected - Displays most critical bug (primary_bug) - Backward compatible with old sin…d2ce69f -
feat: expand code analysis to 20+ bug types
Add comprehensive detection for: SECURITY (Severity 5): - SQL injection - Command injection - Code execution (eval, exec, pickle) - Hardcoded credentials SECURITY (Severity 4): - API keys/tokens - Missing input validation - Path traversal - XSS vulnerabilities - Weak random numbers LOGIC BUGS: - Division by zero - Null/None dereference - Infinite loops - Off-by-one errors - Resource leaks - Missing error handling - Unreachable code TYPE & COMPARISON: - Loose equality (JavaScript) - Type checking errors - Redundant checks STYLE: - var instead of const/let - Deprecated functions - Print instead of logging All 22 test cases now pass successfully.4187775 -
fix: simplify and improve code analysis patterns
- Replace complex regex with simpler string matching for SQL injection detection - Fix hardcoded password/secret detection patterns - Improve off-by-one and type coercion bug detection - Test all patterns locally - all pass - Now correctly analyzes: SQL injection, hardcoded secrets, API keys, logic errors, and style issues2c08a95 -
fix: correct FastAPI error handling and endpoint responses
- Fix HTTPException usage for proper error responses - Improve frontend error handling and logging - Ensure /api/review endpoint returns valid JSON - Remove test file from tracking1fc2334 -
feat: mandatory language selection and improved code analysis
- Add language selector requirement (must explicitly choose language) - Enhance mock code analysis with more bug patterns (security, logic, style) - Add /api/review backend endpoint for real analysis - Improve error messages and validation - Support Python, JavaScript, and Java language detection822c184 -
fix: remove invalid CodeReviewState argument from create_fastapi_app
8869da8 -
fix: resolve create_fastapi_app positional argument error
358905d -
feat: serve index.html beautifully on root route
bf5444d -
fix: add Hugging Face Spaces configuration metadata
4e39f5a -
feat: complete pivot to strictly compliant OpenEnv hackathon submission
5235bfa -
fix: Vercel serverless platform pathing (read-only file system fix)
ea723d2 -
fix: update requirements.txt with all dependencies
44fbb54 -
feat: complete frontend integration and API routes
3a826be
-
fix: Vercel structure and agent startup check bypass
6ed38e9 -
fix: address 25 code quality issues from audit
- .gitignore: add output files (agent_output, grade_output, output.txt), .venv, editor dirs (.cursor, .claude, .islstudio), runs/ folder - config.py: centralise all constants (model names, reward values, rate limits, file paths, token limits) - agent.py: startup API-key validation with clear exit message; log exceptions from both providers (no more silent swallowing); system/user message separation for cleaner role context; 3 few-shot examples for reliable JSON compliance; one automatic JSON-retry on malformed response - grader.py: +5 reward for correctly approving clean code; +5 partial credit when right decision but wrong category; all reward constants wired from config.py; type annotations - environment.py: shuffled-queue deduplication (exhausts all episodes before cycling); config-driven paths; type annotations - training_loop.py: checkpoint saved after every episode (resumable); all outputs written to runs/ (timestamped); config-driven paths - app.py: flask-lim…d1f939e -
Initial commit: CodeBug AI Training Bug Bank
b4deece