Skip to content

Conversation

@IanMayo
Copy link
Member

@IanMayo IanMayo commented Jan 9, 2026

No description provided.

claude added 4 commits January 9, 2026 20:57
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.
Copy link

Copilot AI left a 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,
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
MEDIA_TYPE_JSON,

Copilot uses AI. Check for mistakes.

from mcp.server.fastmcp import FastMCP

from debrief_stac.catalog import create_catalog, list_plots, open_catalog
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
from debrief_stac.catalog import create_catalog, list_plots, open_catalog
from debrief_stac.catalog import create_catalog, list_plots

Copilot uses AI. Check for mistakes.
Following TDD: Write tests first, ensure they fail, then implement.
"""

import tempfile
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
import tempfile

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 11
import pytest

Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
import pytest

Copilot uses AI. Check for mistakes.
Comment on lines 6 to 8
import pytest


Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
import pytest

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,174 @@
"""Tests for MCP tool exposure (User Story 7)."""

import json
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
import json

Copilot uses AI. Check for mistakes.

import json
from pathlib import Path
from typing import Any
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
from typing import Any

Copilot uses AI. Check for mistakes.
Comment on lines 7 to 8
import pytest

Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
import pytest

Copilot uses AI. Check for mistakes.

def test_stac_version_is_1_0_0(self, tmp_path: Path) -> None:
"""Test that STAC outputs use version 1.0.0."""
import json
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
import json

Copilot uses AI. Check for mistakes.
- 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
Copy link

Copilot AI left a 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
Copy link

Copilot AI Jan 10, 2026

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.

Copilot uses AI. Check for mistakes.

assert str(catalog_path) in str(exc_info.value)

@pytest.mark.skipif(os.geteuid() == 0, reason="Root bypasses permission checks")
Copy link

Copilot AI Jan 10, 2026

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").

Copilot uses AI. Check for mistakes.

# Import generated models
import sys
from pathlib import Path
Copy link

Copilot AI Jan 10, 2026

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.

Copilot uses AI. Check for mistakes.

def test_stac_version_is_1_0_0(self, tmp_path: Path) -> None:
"""Test that STAC outputs use version 1.0.0."""
import json
Copy link

Copilot AI Jan 10, 2026

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.

Suggested change
import json

Copilot uses AI. Check for mistakes.
@IanMayo IanMayo merged commit 22b6442 into main Jan 10, 2026
5 checks passed
IanMayo pushed a commit that referenced this pull request Jan 16, 2026
- 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
IanMayo pushed a commit that referenced this pull request Jan 16, 2026
Captures interview findings:
- Web Components for framework-agnostic reuse
- Target consumers: VS Code, Loader, Jupyter
- Draft component API and package structure
- Build tooling considerations
IanMayo pushed a commit that referenced this pull request Jan 16, 2026
IanMayo pushed a commit that referenced this pull request Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants