feat: Fix-It Button - Agent-Proposed Code/SQL Fixes#104
Merged
Conversation
- Add FixProposal Pydantic model with typed fix types (sql_ddl, sql_dml, dbt_patch, python_patch, manual_instruction) - Add validators for SQL DDL (ALTER/CREATE/DROP) and DML (INSERT/UPDATE/DELETE) - DDL fixes always require confirmation for safety - Handle Jinja templates in dbt patches - Add comprehensive unit tests (33 tests) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add fix_proposal field to SynthesisResponse model - Extend synthesis prompt with fix generation instructions (when confidence > 0.7) - Add fix type mapping guidance (schema issues → DDL, data issues → DML, etc.) - Include safety rules (no DROP TABLE, require WHERE clause) - Add unit tests for fix_proposal in SynthesisResponse - Add tests for fix proposal prompt guidance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add fix_validator.py with comprehensive fix validation - Syntax validation via sqlglot parsing (dialect-aware) - Safety validation: no DROP/TRUNCATE, require WHERE for DELETE/UPDATE - Scope validation: fixes only touch allowed tables - Row estimation heuristics for sanity checks - validate_fix_sql for raw SQL validation - validate_fix_proposal for FixProposal objects - Export FixValidationResult, validate_fix_sql, validate_fix_proposal from safety module - 34 unit tests covering all validation scenarios Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add FixPreview component for displaying fix proposals - Add FixProposal, FixValidationResult, FixExecutionResult types - Implement expandable card with confidence indicator (color coded) - Show risks as warning callouts with yellow background - Add collapsible rollback statement section - Add Preview Impact, Copy, and Apply buttons - Require confirmation checkbox for apply action - Add comprehensive CSS styles for JupyterLab integration - TypeScript build passes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add FixExecutionService for executing LLM-generated fixes: - Pre-execution validation using fix_validator - Transaction safety with timeout support - Audit logging to database and in-memory cache - 5-minute rollback window for executed fixes - Support for DML, DDL, and manual instruction fix types Includes dataclasses: FixExecutionResult, RollbackResult, FixExecutionRecord Refs: fn-50.5 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement FixFeedbackService for collecting user feedback on applied fixes: - Record feedback with rating (yes/no/partially) and optional comment - Aggregate success rates by fix_type and root_cause_category - Alert mechanism when success rate falls below threshold - Export feedback for fine-tuning analysis - Emit FEEDBACK_FIX events via InvestigationFeedbackAdapter Add new event types to EventType enum: FEEDBACK_FIX, FIX_PROPOSED, FIX_APPLIED, FIX_ROLLED_BACK Includes: FixFeedback, FixSuccessStats, FixSuccessAlert, FeedbackExportRecord Refs: fn-50.6 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FixProposalmodel for LLM-generated fix proposals (sql_dml, sql_ddl, dbt_patch, python_patch, manual_instruction)FixPreviewwidget with syntax highlighting, confidence indicator, risks display, and rollback sectionFixExecutionServicewith pre-validation, timeout support, audit logging, and 5-minute rollback windowFixFeedbackServicefor collecting user feedback (yes/no/partially), aggregating success rates, alerting on low success, and exporting for fine-tuningTest plan
🤖 Generated with Claude Code