-
Notifications
You must be signed in to change notification settings - Fork 0
Claude/setup schemas spec 6 fw wg #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Stage 1 tracer bullet implementation of local STAC catalog operations: - Phase 1: Setup - Python package with uv workspace integration - Phase 2: Foundational - Models, exceptions, types, test fixtures - Phase 3: US1 - create_catalog(), open_catalog() functions - Phase 4: US2 - create_plot() function for STAC Items - Phase 5: US3 - read_plot() function - Phase 6: US4 - add_features() with bbox calculation Exit criteria met: Can programmatically create a local STAC catalog with a plot Item containing GeoJSON features. 22 tests passing (1 skipped - root permission check)
- US5: Add source assets with provenance tracking (assets.py) - US6: List catalog contents with PlotSummary (catalog.py, models.py) - US7: MCP tool exposure using FastMCP (mcp_server.py) - Phase 10: Integration tests, coverage tests (91.86% coverage) All 70 tests pass with >90% code coverage requirement met.
- research.md: Technical decisions, edge case handling - data-model.md: Entity definitions, STAC structure - plan.md: Implementation plan with constitution check - quickstart.md: Usage examples - contracts/python-api.md: API contract specification All constitution gates passed. Ready for /speckit.implement.
- Structural validation tests (offline, always run) - Network-dependent stac-validator tests (skipped when offline) - Validates catalog.json and item.json against STAC 1.0.0 spec - All 77 tests pass with 91.86% coverage Constitution I.1 compliant: Tests work offline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements the complete debrief-stac service for local STAC catalog operations. It provides a Python library for creating and managing STAC 1.0.0 catalogs containing analysis plots (STAC Items) with GeoJSON features and source file assets, with full MCP tool exposure for VS Code extension integration.
Changes:
- Complete implementation of STAC catalog operations (create, read, list) with proper validation
- Plot (STAC Item) management with metadata and feature support
- GeoJSON feature operations with automatic bbox calculation
- Asset management with provenance tracking per Constitution Article III
- MCP server integration using FastMCP for tool exposure
- Comprehensive test suite with >90% coverage target
- Full specification documentation including research, data models, and API contracts
Reviewed changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| specs/001-debrief-stac/tasks.md | All 71 tasks marked complete |
| specs/001-debrief-stac/research.md | Technical decisions documented (STAC 1.0.0, direct JSON, edge cases) |
| specs/001-debrief-stac/quickstart.md | Usage examples and workflow documentation |
| specs/001-debrief-stac/plan.md | Implementation plan and constitution compliance check |
| specs/001-debrief-stac/data-model.md | Entity definitions and validation rules |
| specs/001-debrief-stac/contracts/python-api.md | Complete API contract specification |
| pyproject.toml | Workspace configuration with stac and schemas members |
| services/stac/pyproject.toml | Package configuration with dependencies and test setup |
| services/stac/src/debrief_stac/*.py | Core implementation modules (catalog, plot, features, assets, mcp_server) |
| services/stac/tests/*.py | Comprehensive test suite covering all user stories |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from debrief_stac.plot import _save_plot, read_plot | ||
| from debrief_stac.types import ( | ||
| ASSET_ROLE_SOURCE, | ||
| MEDIA_TYPE_JSON, |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'MEDIA_TYPE_JSON' is not used.
| MEDIA_TYPE_JSON, |
|
|
||
| from mcp.server.fastmcp import FastMCP | ||
|
|
||
| from debrief_stac.catalog import create_catalog, list_plots, open_catalog |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'open_catalog' is not used.
| from debrief_stac.catalog import create_catalog, list_plots, open_catalog | |
| from debrief_stac.catalog import create_catalog, list_plots |
services/stac/tests/test_assets.py
Outdated
| Following TDD: Write tests first, ensure they fail, then implement. | ||
| """ | ||
|
|
||
| import tempfile |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'tempfile' is not used.
| import tempfile |
services/stac/tests/test_assets.py
Outdated
| import pytest | ||
|
|
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'pytest' is not used.
| import pytest |
| import pytest | ||
|
|
||
|
|
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'pytest' is not used.
| import pytest |
services/stac/tests/test_mcp.py
Outdated
| @@ -0,0 +1,174 @@ | |||
| """Tests for MCP tool exposure (User Story 7).""" | |||
|
|
|||
| import json | |||
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'json' is not used.
| import json |
services/stac/tests/test_mcp.py
Outdated
|
|
||
| import json | ||
| from pathlib import Path | ||
| from typing import Any |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'Any' is not used.
| from typing import Any |
services/stac/tests/test_mcp.py
Outdated
| import pytest | ||
|
|
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'pytest' is not used.
| import pytest |
|
|
||
| def test_stac_version_is_1_0_0(self, tmp_path: Path) -> None: | ||
| """Test that STAC outputs use version 1.0.0.""" | ||
| import json |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import of module json is redundant, as it was previously imported on line 8.
| import json |
- Add root ruff.toml with unified lint rules for all Python packages - Add CI workflow for Python linting (python-lint.yml) - Remove per-package [tool.ruff] sections (now inherit from root) - Auto-fix lint errors (import sorting, modern type hints, unused imports) - Exclude generated code from linting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 36 out of 38 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Import generated models | ||
| import sys | ||
| import warnings | ||
| from pathlib import Path |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable Any is imported but never used in this file after the refactoring. Consider removing it from imports.
|
|
||
| assert str(catalog_path) in str(exc_info.value) | ||
|
|
||
| @pytest.mark.skipif(os.geteuid() == 0, reason="Root bypasses permission checks") |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test uses os.geteuid() which is a Unix-specific function and will fail on Windows. Consider using a cross-platform approach or marking this test as Unix-only with pytest.mark.skipif(sys.platform == "win32", reason="Unix-only test").
|
|
||
| # Import generated models | ||
| import sys | ||
| from pathlib import Path |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable from_time is imported but never used in this file. Consider removing it to avoid clutter, or if it's needed for type checking, mark it with an underscore prefix or use TYPE_CHECKING conditional imports.
|
|
||
| def test_stac_version_is_1_0_0(self, tmp_path: Path) -> None: | ||
| """Test that STAC outputs use version 1.0.0.""" | ||
| import json |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import of module json is redundant, as it was previously imported on line 8.
| import json |
- Update description: React component library → Web Components extraction - Adjust scores: Value 3→4 (multi-frontend reuse), Autonomy 4→3 (Web Components complexity) - Park item: VS Code extension doesn't exist yet to extract from - Add to STRATEGY.md Parking Lot with revisit trigger
Captures interview findings: - Web Components for framework-agnostic reuse - Target consumers: VS Code, Loader, Jupyter - Draft component API and package structure - Build tooling considerations
No description provided.