From e8f2d6cc6d07d84369f784001247c031ade1f762 Mon Sep 17 00:00:00 2001 From: Obayne Date: Tue, 2 Dec 2025 11:31:10 -0600 Subject: [PATCH 1/2] Checkpoint from VS Code for coding agent session --- docs/CLI_AGENT_GUIDE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CLI_AGENT_GUIDE.md b/docs/CLI_AGENT_GUIDE.md index 911b73e..b0512a7 100644 --- a/docs/CLI_AGENT_GUIDE.md +++ b/docs/CLI_AGENT_GUIDE.md @@ -265,6 +265,7 @@ Then commit the reports to docs/analysis/ with message: ``` That's it! Copilot will: + 1. Set up the environment 2. Run the analysis 3. Generate reports @@ -285,16 +286,19 @@ That's it! Copilot will: ## 🔍 Troubleshooting ### **No DXF files found** + - Check `Projects/` directory exists - Verify DXF files have `.dxf` extension - Try custom search path: `--search-path "path/to/files"` ### **Analysis fails** + - Verify DXF file is valid (open in CAD software) - Check for corrupted files - Review error messages in console output ### **No devices detected** + - Verify layer names match expected patterns (FP-, FIRE-, etc.) - Check `autofire_layer_intelligence.py` layer detection logic - Add custom layer patterns if needed From a9306f7934636b56e2068383764eb643fa7f107b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 17:36:01 +0000 Subject: [PATCH 2/2] fix: remove unused variable, add empty except comments, fix formatting Co-authored-by: Obayne <205364295+Obayne@users.noreply.github.com> --- app/monitoring.py | 4 ++++ autofire_layer_intelligence.py | 15 --------------- backend/ops_service.py | 4 +++- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/app/monitoring.py b/app/monitoring.py index a9ac325..3ef772e 100644 --- a/app/monitoring.py +++ b/app/monitoring.py @@ -166,6 +166,7 @@ def capture_exception(exception: Exception, **kwargs) -> str | None: try: return sentry_sdk.capture_exception(exception, **kwargs) except Exception: + # Silently fail if Sentry capture fails - don't crash the app for monitoring issues return None @@ -218,6 +219,7 @@ def set_user(user_id: str | None = None, email: str | None = None, **kwargs): sentry_sdk.set_user(user_data) except Exception: + # Silently fail if setting user context fails - non-critical operation pass @@ -245,6 +247,7 @@ def add_breadcrumb(message: str, category: str = "default", level: str = "info", data=data, ) except Exception: + # Silently fail if adding breadcrumb fails - non-critical operation pass @@ -268,4 +271,5 @@ def set_context(scope): try: sentry_sdk.configure_scope(callback) except Exception: + # Silently fail if configuring scope fails - non-critical operation pass diff --git a/autofire_layer_intelligence.py b/autofire_layer_intelligence.py index 12b5ce1..c7d6fef 100644 --- a/autofire_layer_intelligence.py +++ b/autofire_layer_intelligence.py @@ -96,21 +96,6 @@ def analyze_cad_file(self, file_path: str) -> dict[str, Any]: try: logger.info(f"Starting CAD analysis: {file_path}") - # Simulate layer analysis (would use ezdxf for real CAD files) - analysis_results = { - "file_path": file_path, - "total_layers": 0, - "fire_layers": [], - "all_layers": [], - "devices_detected": [], - "analysis_timestamp": None, - "precision_data": { - "total_fire_devices": 0, - "layer_classification_accuracy": 0.0, - "confidence_score": 0.95, - }, - } - # Check if file exists if not Path(file_path).exists(): logger.warning(f"File not found: {file_path}") diff --git a/backend/ops_service.py b/backend/ops_service.py index c234637..62d5516 100644 --- a/backend/ops_service.py +++ b/backend/ops_service.py @@ -101,7 +101,9 @@ def _find_line_intersection(self, seg1: SegmentDTO, seg2: SegmentDTO) -> PointDT # Line 2: seg2.a to seg2.b x3, y3 = seg2.a.x, seg2.a.y - x4, y4 = seg2.b.x, seg2.b.y # Calculate denominators + x4, y4 = seg2.b.x, seg2.b.y + + # Calculate denominators denom = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4) if abs(denom) < 1e-10: # Lines are parallel