Spaces:
Sleeping
Sleeping
Commit History
-
Fix inference.py to always output valid scores for HF validation
d1d43df -
Use gpt-4o for vision support
b395a8b -
ci: sync GitHub to Hugging Face Space via hub-sync + server/app shim
- Add GitHub Action (huggingface/hub-sync) on push to main, docker Space, target vinith17/CodeBug - Add server/app.py with main() and app re-export for OpenEnv-style layouts - Requires HF_TOKEN secret in GitHub Actions for sync to succeed Made-with: Cursor96775ab -
fix(inference): align [STEP] scores with openenv.yaml task graders
- Use tasks.*.grader grade() for stdout (same functions as manifest); LLM schema matches CodeReviewAction - Defer API key check to run_inference(); safe to import module without env - json_object retry without response_format for picky gateways - Sanity-check root grader.py returns float in (0,1); keep grader import for rubric tooling Made-with: Cursor273e960 -
fix(inference): accept OPENAI_API_KEY when HF_TOKEN unset (HF Spaces)
Made-with: Cursora44cabe -
fix(hackathon): root inference + normalized grader + OpenAI-only agent
- grader.py: map integer rubric scores to (0,1) exclusive via config-derived bounds - inference.py: OpenAI client (HF_TOKEN, API_BASE_URL, MODEL_NAME); grader.grade(); 5 tasks; [START]/[STEP] task_id score/[END] only on stdout - agent.py: remove Anthropic; use openai.OpenAI with HF_TOKEN or OPENAI_API_KEY - main.py: enable LLM when HF_TOKEN or OPENAI_API_KEY is set Made-with: Cursor8e2e914 -
chore: drop Vercel serverless config (HF Spaces is canonical)
- Remove vercel.json and api/index.py so Git pushes do not trigger Vercel builds - Always use repo-local runs/ for checkpoints (remove VERCEL env branch in config) Made-with: Cursor5d1f2a8 -
fix(validation): match inference [STEP] rewards to openenv.yaml graders
- Remove score_action linear remap; call the same grade() as each task manifest - Extend openenv.yaml with spec_version, app, port, type, runtime for HF/OpenEnv CLI Made-with: Cursoree58e44 -
fix(openenv): align env step rewards with YAML task graders
- Add tasks/scoring.finalize_task_reward for strict (0,1) scores and non-finite guards - Route CodeBugEnvironment.step through the same grade() functions as openenv.yaml - Accept **kwargs on task graders for validator compatibility; make extra1/extra2 proper packages - Harden inference.py score_action for non-finite intermediate rewards Made-with: Cursor854a163 -
fix: resolve Phase 2 validation failures (tasks with graders and score range)
eb32c3c
-
Fix score_action to return values strictly between 0 and 1 (exclusive)
06bcb61
-
fix: server/app.py main() function + if __name__ guard + entry point :main
362b7f2 -
fix: add uv.lock, server/app.py, project.scripts for openenv validate
3858299 -
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