Complete the defense-in-depth approach from PR #53 by adding explicit
in_progress=False to all remaining feature creation locations. This
ensures consistency with the MCP server pattern and prevents potential
NULL values in the in_progress field.
Changes:
- server/routers/features.py: Add in_progress=False to create_feature()
and create_features_bulk() endpoints
- server/services/expand_chat_session.py: Add in_progress=False to
_create_features_bulk() in the expand chat session
- api/migration.py: Add in_progress field handling in JSON migration,
reading from source data with False as default
This follows up on PR #53 which added nullable=False constraints and
fixed existing NULL values, but only updated the MCP server creation
paths. Now all 6 feature creation locations explicitly set both
passes=False and in_progress=False.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Problem: Features with NULL values in passes/in_progress fields caused
Pydantic validation errors in the API.
Solution - defense in depth:
1. Database model: Add nullable=False to passes and in_progress columns
2. Migration: Auto-fix existing NULL values to False on database connect
3. API layer: Handle NULL gracefully in feature_to_response (treat as False)
4. MCP server: Explicitly set in_progress=False when creating features
This ensures:
- New databases cannot have NULL boolean fields
- Existing databases are auto-migrated on connect
- Even if NULL values exist, they're handled gracefully at runtime
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add CI workflow with Python (ruff lint, security tests) and UI (ESLint, TypeScript, build) jobs
- Add ruff, mypy, pytest to requirements.txt
- Add pyproject.toml with ruff configuration
- Fix import sorting across Python files (ruff --fix)
- Fix test_security.py expectations to match actual security policy
- Remove invalid 'eof' command from ALLOWED_COMMANDS
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements feature locking to prevent multiple agent sessions from working
on the same feature simultaneously. This is essential for parallel agent
execution.
Database changes:
- Add `in_progress` boolean column to Feature model
- Add migration function to handle existing databases
MCP Server tools:
- Add `feature_mark_in_progress` - lock feature when starting work
- Add `feature_clear_in_progress` - unlock feature when abandoning
- Update `feature_get_next` to skip in-progress features
- Update `feature_get_stats` to include in_progress count
- Update `feature_mark_passing` and `feature_skip` to clear in_progress
Backend updates:
- Update progress.py to track and display in_progress count
- Update features router to properly categorize in-progress features
- Update WebSocket to broadcast in_progress in progress updates
- Add in_progress to FeatureResponse schema
Frontend updates:
- Add in_progress to TypeScript types (Feature, ProjectStats, WSProgressMessage)
- Update useWebSocket hook to track in_progress state
Prompt template:
- Add instructions for agents to mark features in-progress immediately
- Document new MCP tools in allowed tools section
Also fixes spec_chat_session.py to use absolute project path instead of
relative path for consistency with CLI behavior.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>