Spaces:
Sleeping
Sleeping
Commit History
-
Fix JSX MIME type on Spaces
vatche.thorossian +1: OpenAI CodexCo-authored-by: OpenAI Codex <codex@openai.com>e7f005d
-
Polish fallback report copy
vatche.thorossian +1: OpenAI CodexCo-authored-by: OpenAI Codex <codex@openai.com>bf2a74c -
Fix live structuring fallback
vatche.thorossian +1: OpenAI CodexCo-authored-by: OpenAI Codex <codex@openai.com>c4889d4 -
Harden structuring prompt for honest, fuller reports
ClaudeUnverified signatureLive Modal testing showed the structuring model overclaimed ("data loss/ security") and produced only one missing-info item, weakening the Missing Info card (the product differentiator). Tighten STRUCTURE_PROMPT: - Ban data-loss/security/privacy/backend-consequence claims unless visible or tester-stated. - "critical" only for a completely and visibly blocked core flow with no workaround — never for an inferred/possible consequence; explicit high/ medium/low guidance. - Require 3-5 specific missing_info questions (the most important field). - Require at least 3 regression_tests and at least 3 edge_cases. Kept as prompt rules (schema minimums stay at 1) so a slightly-short response still renders in the demo instead of erroring. Add a test guarding the rules. https://claude.ai/code/session_01JE4YVLBWnk188Yu5sib59ye4e23c5 -
Keep example analysis available in modal mode
vatche.thorossian +1: OpenAI CodexFix the live-analyze path so gallery examples and exports remain available when BUGLENS_BACKEND=modal; only uploaded screenshot analysis depends on Modal. Co-authored-by: OpenAI Codex <codex@openai.com>31a374d -
Route uploaded screenshots to the Modal backend
ClaudeUnverified signatureB5a: add POST /api/analyze that accepts a base64 screenshot + note and runs real inference via the configured backend. - When BUGLENS_BACKEND=modal, decode the image and forward it to the Modal endpoint through buglens.backend.analyze_via_modal, returning the BugReport payload. Backend/network errors surface as 502; bad image data as 400. - In mock mode, uploaded-image analysis returns 501 with a clear message to pick an example (examples remain fully working via GET /api/analyze?id=). - Tests cover mock 501, modal forwarding, invalid base64 (400), and backend error (502), all without network. Stacked on feat/modal-endpoint (needs buglens.backend). https://claude.ai/code/session_01JE4YVLBWnk188Yu5sib59y7d6a093 -
Add Modal GPU endpoint and Space-side backend client
ClaudeUnverified signatureB4: stand up the real inference path (deploy with `modal deploy modal_app.py`). - modal_app.py: a @app.cls(gpu="A10G") container that loads MiniCPM-V 4.6 once via @modal.enter (buglens.vision.load_model) and exposes a POST @modal.fastapi_endpoint. It decodes a base64 screenshot, runs observe() then structure(), and returns the BugReport payload; StructureError comes back as 422 with the observation + raw text so the UI can degrade gracefully. Local buglens package is baked into the image (add_local_python_source copy=True). - buglens/backend.py: analyze_via_modal() posts the screenshot+note to the endpoint and returns the payload, raising BackendError on misconfig/network/ HTTP errors. requests-only, so the Space image stays light. - requirements-modal.txt: torchcodec -> av (CUDA-safe), add fastapi + pydantic. - tests: backend client payload/error paths via monkeypatched requests. Stacked on feat/structure-call (needs structure.py). https://claude.ai/code/session_01JE4…3a9fb8a -
Add structuring call (observation -> validated BugReport)
ClaudeUnverified signatureImplement Call 2 of the pipeline (docs/plans/04): - prompts.py: STRUCTURE_PROMPT describing the canonical schema by field name (so output validates directly) with the honesty/severity/regression/edge rules, plus structure_user_text() to attach the observation and note. - structure.py: extract_json() (tolerates code fences and surrounding prose), parse_report() (json + Pydantic validate), generate_json() (text-only generation), and structure() which validates, retries once with a repair instruction, then raises StructureError carrying the last raw output for a graceful UI fallback. - tests: fence/prose extraction, round-trip parse, and first-try / retry-once / fail-after-retry orchestration via sequenced fakes. No model download. https://claude.ai/code/session_01JE4YVLBWnk188Yu5sib59y31e28fb -
Add MiniCPM-V 4.6 vision call (screenshot -> observation)
ClaudeUnverified signatureImplement Call 1 of the pipeline (docs/plans/04): - prompts.py: VISION_PROMPT (perception only; bans guessing browser/OS/device/ role/environment/backend) and vision_user_text() to append the tester note. - vision.py: build_vision_messages() (PIL image or URL), observe() running apply_chat_template + generate + decode with downsample_mode="16x" and max_slice_nums=36, and load_model() that imports transformers lazily so the module stays importable on the CPU frontend (the model runs on Modal). - tests: prompt composition, message shape, and observe() orchestration via fakes (no model download). Verified the module imports without transformers. https://claude.ai/code/session_01JE4YVLBWnk188Yu5sib59y00a4ce4 -
Serve custom frontend on gradio.Server with mock analyze pipeline
ClaudeUnverified signatureWire the buglens-ui prototype to a real backend so the four cards render from the canonical contract end-to-end (mock mode): - buglens/examples.py: the four prototype examples as validated BugReports, plus list_examples()/get_example() helpers. - app.py: gradio.Server (FastAPI) serving the custom frontend at "/", static jsx under /static, and JSON endpoints /api/examples, /api/analyze, and /api/export/{jira,github,csv}. analyze() is mock now; the Modal/ZeroGPU MiniCPM pipeline plugs in behind the same return contract. - buglens-ui: frontend now fetches /api/analyze and renders the returned payload; script srcs point at /static so we never shadow /gradio_api/*. - Tests: examples validation + endpoint smoke tests (TestClient). Booted the server and verified "/", /api/analyze, /api/examples, and static assets. https://claude.ai/code/session_01JE4YVLBWnk188Yu5sib59y85ebe4a -
Adopt UI prototype shape as canonical contract
ClaudeUnverified signatureEvolve BugReport to match the richer buglens-ui data contract so the backend and custom frontend speak one language (per docs/plans 03/04, superseded by the prototype's shape): - Severity becomes four-level (critical/high/medium/low) with severity_why. - missing_info is [{question, why}] — the differentiator card, with reasoning. - regression_tests are Gherkin {id, title, given, when, then}. - edge_cases are {title, detail}; add summary, env table, vision_read, app, blurb. - Serialization aliases emit the exact JSON keys the frontend reads (severityWhy, visionRead, missing/q, tests, edges/t/d, env/k/v) via BugReport.to_ui_payload(). Update Jira/GitHub/CSV exporters and the schema/render tests for the new shape. https://claude.ai/code/session_01JE4YVLBWnk188Yu5sib59yb3b0eee -
Add deterministic render exports
ClaudeUnverified signatureImplement model-free renderers in buglens/render.py that turn a validated BugReport into the export and card formats described in docs/plans/03 and 04: - to_jira_markdown: Jira wiki markup for pasting into a ticket - to_github_issue: GitHub-flavored Markdown issue body with checkboxes - regression_tests_to_csv: stable CSV with proper escaping and \n endings - bug_report / missing_info / regression_tests / edge_cases card markdown All functions consume the single schema contract and are deterministic, so the same report always renders identically. Add tests/test_render.py covering structure, CSV escaping/round-trip, determinism, and card headers. https://claude.ai/code/session_01JE4YVLBWnk188Yu5sib59yfc1e4ac -
Add verified stack foundation
vatche.thorossianee326f7 -
Initialize BugLens planning scaffold
vatche.thorossian232f5e1