NatLabRockies / NatLabRockies/plexosdb

Run the nested plexosdb-mcp package in CI and pre-push checks

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dx improve workon-ready
Dominant language
Python
Stars
37
Forks
21
Avg merge
1h 23m
Merged PRs (30d)
3

Description

Run the nested plexosdb-mcp package in CI and pre-push checks

Executor instructions: Follow this issue step by step. Run every
verification command and confirm the expected result before moving on. If any
STOP condition is true, stop and report instead of improvising.

Drift check (run first): git diff --stat a11b6a3..HEAD -- .github/workflows/CI.yaml .pre-commit-config.yaml src/plexosdb-mcp/pyproject.toml src/plexosdb-mcp/uv.lock AGENTS.md
If any in-scope file changed since this issue was written, compare the
Current behavior excerpts against live code before proceeding. If they do not
match, stop and ask for /plan to refresh this issue.

Status

  • Priority: P1
  • Effort: M
  • Risk: LOW
  • Depends on: none
  • Category: dx
  • Planned at: commit a11b6a3, 2026-07-08

Current behavior

The branch adds a nested Python package under src/plexosdb-mcp with its own
package metadata and test suite. The root CI and pre-push hooks still exercise
only the root package paths.

  • src/plexosdb-mcp/pyproject.toml:2-17 — nested package and CLI entry point.
# src/plexosdb-mcp/pyproject.toml:2-17
name = "plexosdb-mcp"
version = "0.1.0"
description = "Model Context Protocol server package for plexosdb"
readme = "README.md"
requires-python = ">=3.11,<3.15"
...
dependencies = [
    "plexosdb>=1.3.4",
    "fastmcp>=3.0.0",
]

[project.scripts]
plexosdb-mcp = "plexosdb_mcp.__main__:main"
  • src/plexosdb-mcp/pyproject.toml:35-36 — nested pytest config exists.
# src/plexosdb-mcp/pyproject.toml:35-36
pythonpath = ["src"]
testpaths = ["tests"]
  • pyproject.toml:153-154 — root pytest config only targets root tests.
# pyproject.toml:153-154
pythonpath = ["src"]
testpaths = ["tests"]
  • .github/workflows/CI.yaml:65 and .github/workflows/CI.yaml:100 — CI typecheck/test commands target root package behavior.
# .github/workflows/CI.yaml:65
run: uv run ty check --output-format github ./src/plexosdb

# .github/workflows/CI.yaml:100
uv run pytest --cov --cov-report=xml
  • .pre-commit-config.yaml:62 and .pre-commit-config.yaml:77 — pre-push hooks target root package behavior.
# .pre-commit-config.yaml:62
entry: uv run pytest -q -m "not slow" --maxfail=1 --disable-pytest-warnings

# .pre-commit-config.yaml:77
entry: uv run ty check ./src/plexosdb

Desired behavior or Goal

Normal CI and pre-push validation must exercise the nested plexosdb-mcp package
explicitly, using the nested package's own pytest configuration. MCP regressions
should be caught before merge instead of relying on a maintainer to remember a
manual nested-package command.

Acceptance criteria

  • CI has an explicit MCP package test step or job that runs src/plexosdb-mcp/tests with src/plexosdb-mcp/pyproject.toml as the pytest config.
  • CI typechecking covers src/plexosdb-mcp/src/plexosdb_mcp or adds a documented MCP-specific typecheck command in the same workflow.
  • Pre-push hooks include a focused MCP test hook that uses the nested project/config and does not accidentally run the nested tests under the root coverage configuration.
  • Root package CI/pre-push behavior remains intact for src/plexosdb and root tests.
  • AGENTS.md lists the focused MCP validation command so future agents do not run the nested tests with the wrong root config.

Non-goals

  • Do not merge plexosdb-mcp into the root package in this issue.
  • Do not change MCP server behavior or tool names in this issue.
  • Do not lower the root package coverage threshold to make nested-package checks pass.
  • Do not add slow benchmark jobs or release-publishing changes; those are separate concerns.

Work Plan

Validation
  • uv run --project src/plexosdb-mcp pytest -q -c src/plexosdb-mcp/pyproject.toml src/plexosdb-mcp/tests exits 0.
  • uv run --project src/plexosdb-mcp ty check ./src/plexosdb-mcp/src/plexosdb_mcp exits 0 after adding ty to the nested dev dependencies.
  • uv run pytest --cov --cov-report=xml still exits 0 for the root package.
  • uv run prek run --show-diff-on-failure --color=always --all-files --hook-stage pre-push exits 0 before handoff.
Documentation
  • Update AGENTS.md with the nested MCP package test/typecheck commands under the existing validation guidance.
  • No user-facing docs are required for this CI-only change.
Testing
  • No new product tests are required.
  • The change is validated by running the nested MCP test suite through CI/pre-push commands.

Risks

Breaking-change

Absent for runtime behavior. This changes only validation automation. The main risk is CI/pre-push runtime increasing or selecting the wrong pytest config.

Review-size

Low. Scope is limited to CI/pre-push configuration, nested package dev dependencies, and validation guidance.

Implementation notes

Scope

In scope:

  • .github/workflows/CI.yaml
  • .pre-commit-config.yaml
  • src/plexosdb-mcp/pyproject.toml
  • src/plexosdb-mcp/uv.lock
  • AGENTS.md

Out of scope:

  • .github/workflows/release.yaml — handled by the release/publishing work packet.
  • src/plexosdb-mcp/src/plexosdb_mcp/server.py — runtime behavior is not part of this CI wiring issue.
  • pyproject.toml root testpaths — do not broaden root pytest discovery to include nested tests under root coverage settings.
Suggested steps
  1. Add ty to src/plexosdb-mcp's dev dependency group and refresh the nested lockfile.
    • Verify: uv run --project src/plexosdb-mcp ty check ./src/plexosdb-mcp/src/plexosdb_mcp exits 0.
  2. Add an MCP package CI job or explicit steps in .github/workflows/CI.yaml.
    • Use uv sync --project src/plexosdb-mcp --all-groups or the repository's current uv pattern for nested projects.
    • Run the exact nested pytest command with -c src/plexosdb-mcp/pyproject.toml.
    • Run the nested ty command.
  3. Add a local pre-push hook in .pre-commit-config.yaml for the MCP test command.
    • Use pass_filenames: false and stages: [pre-push] like the root pytest hook.
  4. Update AGENTS.md with the focused MCP validation commands.
  5. Run the focused commands and the broad pre-push gate.
Test details
  • Preserve the package-local pytest selection pattern: uv run --project src/plexosdb-mcp pytest -q -c src/plexosdb-mcp/pyproject.toml src/plexosdb-mcp/tests.
  • This avoids root pytest addopts and root coverage configuration being applied to the nested project.
Maintenance notes
  • Future nested package checks should be added explicitly rather than relying on root test discovery.
  • Reviewers should verify that CI output contains a clearly named MCP package check.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the drift check first, then inspect .github/workflows/CI.yaml, .pre-commit-config.yaml, src/plexosdb-mcp/pyproject.toml, src/plexosdb-mcp/uv.lock, and AGENTS.md. Use the specified nested pytest and ty commands to verify the package-local configuration, then run the root tests and pre-push gate. Done means CI and pre-push cover MCP while preserving root validation, and AGENTS.md documents the focused commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.