Skip to content

Commit 6ccb9e9

Browse files
committed
Merge dev into main
2 parents a148efe + 9a35c60 commit 6ccb9e9

246 files changed

Lines changed: 39699 additions & 8897 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.continue-here.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Continue Here — Session Handoff
2+
3+
**Date:** 2026-05-09
4+
**Branch:** dev
5+
**Milestone:** v0.5.0 (Beta) — Phase 5 COMPLETE
6+
**Phase:** 5 (MCP Streamable HTTP Migration) — ALL PLANS EXECUTED
7+
8+
---
9+
10+
## What Was Done This Session
11+
12+
### Phase 5 Execution — ALL 3 PLANS COMPLETE
13+
14+
**Wave 1: Server & Config Migration (05-01)**
15+
- `dnallm/mcp/config_manager.py`: Added `get_streamable_http_config()` with fallback to server defaults
16+
- `dnallm/mcp/server.py`: Updated docstrings to recommend `streamable-http` over legacy `sse`
17+
- `dnallm/cli/cli.py`: Updated `--transport` help text
18+
19+
**Wave 2: Client SDK Migration (05-02)**
20+
- `dnallm/mcp/client.py`: Extended transport to `Literal["streamable-http", "sse", "stdio"]`
21+
- Added `streamable-http` connection branch using `streamable_http_client()` (non-deprecated API)
22+
- Set transport-specific default URLs (`/mcp` for streamable-http, `/sse` for sse)
23+
- Renamed tuple unpacking variable to `_get_session_id` (it's a callable, not a string)
24+
25+
**Wave 3: Tests, Documentation & Verification (05-03)**
26+
- `tests/mcp/test_client_sdk.py`: Added 4 streamable-http unit tests
27+
- `dnallm/mcp/tests/test_streamable_http_client.py`: New integration tests (3 streamable-http + 2 legacy SSE)
28+
- `README.md`: Updated MCP Server section with streamable-http as primary example
29+
- `CHANGELOG.md`: Added v0.5.1 migration notes
30+
- `pyproject.toml`: Registered `legacy` pytest marker
31+
32+
### Code Review + Fixes Applied
33+
- `/gsd-code-review 5` spawned gsd-code-reviewer → produced `05-REVIEW.md` with 13 findings
34+
- Verified findings: 4 Critical valid, 2 Warning invalid (pre-existing), 4 Warning valid
35+
- Applied fixes for all valid findings:
36+
- CR-01: Transport-specific default URLs
37+
- CR-02: `_session_id``_get_session_id`
38+
- CR-03: Exception handling narrowed with `AssertionError` guard
39+
- CR-04: `legacy` pytest marker registered
40+
- WR-06: Migrated from deprecated `streamablehttp_client` to `streamable_http_client`
41+
42+
---
43+
44+
## Files Changed (not yet committed)
45+
46+
**Modified:**
47+
- `CHANGELOG.md`
48+
- `README.md`
49+
- `dnallm/cli/cli.py`
50+
- `dnallm/mcp/client.py`
51+
- `dnallm/mcp/config_manager.py`
52+
- `dnallm/mcp/server.py`
53+
- `pyproject.toml`
54+
- `tests/mcp/test_client_sdk.py`
55+
56+
**New:**
57+
- `dnallm/mcp/tests/test_streamable_http_client.py`
58+
- `.planning/phases/05-mcp-streamable-http/05-REVIEW.md`
59+
60+
---
61+
62+
## Verification Status
63+
64+
- `ruff check .` — 0 errors
65+
- `pytest tests/mcp/test_client_sdk.py` — 43 passed
66+
- `pytest dnallm/mcp/tests/test_streamable_http_client.py` — 5 skipped (server not running)
67+
- `pytest dnallm/mcp/tests/` — 31 passed, 8 skipped
68+
69+
---
70+
71+
## What's Next
72+
73+
1. **Commit the WIP changes**`git add` the modified/new files, commit with message
74+
2. **Update `.planning/STATE.md`** — set `status: complete`, `completed_phases: 5`, `percent: 100`
75+
3. **Ship milestone** — run `/gsd-ship` to create PR and prepare for merge
76+
77+
No blockers. All Phase 5 requirements (R1-R5) from 05-SPEC.md are satisfied.
78+
79+
---
80+
81+
## How to Resume
82+
83+
```bash
84+
# Check current state
85+
git status
86+
cat .planning/STATE.md
87+
88+
# Verify everything still passes
89+
ruff check .
90+
pytest tests/mcp/ -q --timeout=60
91+
pytest dnallm/mcp/tests/ -q --timeout=60
92+
93+
# Commit changes
94+
git add -A
95+
git commit -m "feat(05): complete MCP Streamable HTTP Migration"
96+
97+
# Ship milestone
98+
/gsd-ship
99+
```

.github/dependabot.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2
2+
updates:
3+
# Python dependencies (pip)
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
open-pull-requests-limit: 10
10+
groups:
11+
dev-dependencies:
12+
dependency-type: "development"
13+
update-types:
14+
- "minor"
15+
- "patch"
16+
prod-dependencies:
17+
dependency-type: "production"
18+
update-types:
19+
- "minor"
20+
- "patch"
21+
labels:
22+
- "dependencies"
23+
- "automated"
24+
commit-message:
25+
prefix: "deps"
26+
include: "scope"
27+
# Auto-merge patch versions; minor/major require manual review
28+
# Note: Auto-merge must be enabled in repository settings
29+
30+
# GitHub Actions
31+
- package-ecosystem: "github-actions"
32+
directory: "/"
33+
schedule:
34+
interval: "weekly"
35+
day: "monday"
36+
open-pull-requests-limit: 5
37+
labels:
38+
- "dependencies"
39+
- "github-actions"
40+
- "automated"
41+
commit-message:
42+
prefix: "ci"
43+
include: "scope"

.github/workflows/ci.yml

Lines changed: 82 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@ on:
66
- main
77
- master
88
- dev
9-
- flake8
109
pull_request:
11-
branches: [ main, master, dev, flake8 ]
10+
branches: [ main, master, dev ]
1211

1312
permissions:
1413
contents: write
1514

1615
jobs:
1716
test:
17+
name: test (py${{ matrix.python-version }}, numpy${{ matrix.numpy-version }})
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
2121
python-version: ['3.10', '3.11', '3.12', '3.13']
22+
numpy-version: ['1.26.4', '2.2.0']
2223
steps:
2324
- name: Checkout code
2425
uses: actions/checkout@v4
@@ -55,7 +56,12 @@ jobs:
5556
run: |
5657
uv venv
5758
uv pip install -e ".[test,dev]"
58-
59+
60+
- name: Install specific numpy version
61+
run: |
62+
source .venv/bin/activate
63+
uv pip install "numpy==${{ matrix.numpy-version }}"
64+
5965
- name: Run linting and code quality checks with Ruff
6066
run: |
6167
source .venv/bin/activate
@@ -64,31 +70,27 @@ jobs:
6470
# Check linting
6571
ruff check . --statistics
6672
67-
- name: Run flake8 checks for MCP module
73+
- name: Run fast tests
6874
run: |
6975
source .venv/bin/activate
70-
# Install flake8 for MCP module compatibility check
71-
uv pip install flake8>=7.1.2
72-
# Run flake8 on MCP module
73-
flake8 dnallm/mcp/ --max-line-length=79 --extend-ignore=E203,W503,C901,E402
74-
# Run flake8 on other modules excluding metrics
75-
flake8 dnallm/ --max-line-length=79 --extend-ignore=E203,W503,C901,E402 --exclude=dnallm/tasks/metrics/
76-
76+
pytest tests/ -v -m "not slow" --cov=dnallm --cov-report=xml --cov-report=term-missing --tb=short
77+
78+
- name: Upload coverage to Codecov
79+
uses: codecov/codecov-action@v3
80+
with:
81+
file: ./coverage.xml
82+
fail_ci_if_error: false
83+
84+
- name: Run slow tests
85+
continue-on-error: true
86+
run: |
87+
source .venv/bin/activate
88+
pytest tests/ -v -m "slow" --cov=dnallm --cov-report=xml --cov-report=term-missing --tb=short --cov-append
89+
7790
- name: Run type checking
7891
run: |
7992
source .venv/bin/activate
80-
mypy dnallm/ --ignore-missing-imports --no-strict-optional --disable-error-code=var-annotated --disable-error-code=assignment --disable-error-code=return-value --disable-error-code=arg-type --disable-error-code=index --disable-error-code=attr-defined --disable-error-code=operator --disable-error-code=call-overload --disable-error-code=valid-type --disable-error-code=no-redef --disable-error-code=dict-item --disable-error-code=return --disable-error-code=unreachable --disable-error-code=misc --disable-error-code=import-untyped --exclude=dnallm/tasks/metrics/
81-
82-
# - name: Run tests with coverage
83-
# run: |
84-
# source .venv/bin/activate
85-
# pytest tests/ -v --cov=dnallm --cov-report=xml --cov-report=term-missing --tb=short
86-
87-
# - name: Upload coverage to Codecov
88-
# uses: codecov/codecov-action@v3
89-
# with:
90-
# file: ./coverage.xml
91-
# fail_ci_if_error: false
93+
mypy dnallm/ --show-error-codes --pretty --exclude=dnallm/tasks/metrics/ || true
9294
9395
test-cuda:
9496
runs-on: ubuntu-latest
@@ -143,41 +145,66 @@ jobs:
143145
uv pip install -e ".[test,dev,cuda124]"
144146
fi
145147
146-
# - name: Run GPU-enabled tests
147-
# run: |
148-
# source .venv/bin/activate
149-
# pytest tests/ -v -m "not slow" --tb=short
150-
151-
# test-mamba:
152-
# runs-on: ubuntu-latest
153-
# strategy:
154-
# matrix:
155-
# python-version: ['3.11']
156-
# steps:
157-
# - name: Checkout code
158-
# uses: actions/checkout@v4
159-
160-
# - name: Set up Python ${{ matrix.python-version }}
161-
# uses: actions/setup-python@v4
162-
# with:
163-
# python-version: ${{ matrix.python-version }}
164-
165-
# - name: Install uv
166-
# run: curl -LsSf https://astral.sh/uv/install.sh | sh
167-
168-
# - name: Create virtual environment and install mamba dependencies
169-
# run: |
170-
# uv venv
171-
# uv pip install -e ".[test,dev]"
172-
# uv pip install -e ".[mamba]" --no-cache-dir --no-build-isolation
148+
- name: Run GPU-enabled tests
149+
run: |
150+
source .venv/bin/activate
151+
pytest tests/ -v -m "not slow" --tb=short
173152
174-
# - name: Run mamba-specific tests
175-
# run: |
176-
# source .venv/bin/activate
177-
# pytest tests/ -v -m "not slow" --tb=short
153+
test-mamba:
154+
runs-on: ubuntu-latest
155+
strategy:
156+
matrix:
157+
python-version: ['3.11']
158+
steps:
159+
- name: Checkout code
160+
uses: actions/checkout@v4
161+
162+
- name: Check for GPU
163+
id: gpu-check
164+
run: |
165+
if command -v nvidia-smi &> /dev/null && nvidia-smi > /dev/null 2>&1; then
166+
echo "has_gpu=true" >> $GITHUB_OUTPUT
167+
echo "GPU detected, will run mamba tests"
168+
else
169+
echo "has_gpu=false" >> $GITHUB_OUTPUT
170+
echo "No GPU detected, skipping mamba tests"
171+
fi
172+
173+
- name: Set up Python ${{ matrix.python-version }}
174+
if: steps.gpu-check.outputs.has_gpu == 'true'
175+
uses: actions/setup-python@v4
176+
with:
177+
python-version: ${{ matrix.python-version }}
178+
179+
- name: Install uv
180+
if: steps.gpu-check.outputs.has_gpu == 'true'
181+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
182+
183+
- name: Create virtual environment and install mamba dependencies
184+
if: steps.gpu-check.outputs.has_gpu == 'true'
185+
run: |
186+
uv venv
187+
uv pip install -e ".[test,dev]"
188+
uv pip install -e ".[mamba]" --no-cache-dir --no-build-isolation
189+
190+
- name: Run mamba-specific tests
191+
if: steps.gpu-check.outputs.has_gpu == 'true'
192+
continue-on-error: true
193+
run: |
194+
source .venv/bin/activate
195+
pytest tests/ -v -m "not slow" --tb=short
196+
197+
- name: Upload mamba test logs on failure
198+
if: steps.gpu-check.outputs.has_gpu == 'true' && failure()
199+
uses: actions/upload-artifact@v4
200+
with:
201+
name: mamba-test-logs-${{ matrix.python-version }}
202+
path: |
203+
pytest.log
204+
/tmp/mamba-build.log
178205
179206
deploy:
180-
needs: [test, test-cuda]
207+
needs: [test, test-cuda, test-mamba]
181208
runs-on: ubuntu-latest
182209
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
183210
steps:

0 commit comments

Comments
 (0)