diff --git a/.mcp.json b/.mcp.json index 17a2c03..d061761 100644 --- a/.mcp.json +++ b/.mcp.json @@ -2,7 +2,7 @@ "mcpServers": { "filigree": { "type": "stdio", - "command": "/home/john/errorworks/.venv/bin/filigree-mcp", + "command": "/home/john/.local/bin/filigree-mcp", "args": [ "--project", "/home/john/errorworks" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b69172..87d6ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,39 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.2] - 2026-03-23 + +### Fixed + +- **Multi-worker startup crash**: All presets and default config set `workers=4`, but uvicorn + requires an import string (not a Python object) when `workers > 1`. Implemented factory pattern + with environment variable config serialization. Env var is cleaned up after uvicorn exits. +- **Metrics misclassification** (7 bugs): Both LLM and Web metrics classifiers gated + `connection_error` on `status_code is None`, but servers record some connection errors with + non-None status codes (timeout→504, incomplete_response→200). Classifiers now check `error_type` + first. Also removed `slow_response` from Web connection error set (it's a successful response + with extra delay) and added `redirect_loop_terminated` to the redirect category. +- **OpenAI API fidelity** (3 bugs): Added missing `param` field to all error responses, fixed + timeout 504 body to use standard format (`type: server_error`, `code: timeout`), and fixed echo + mode to extract text from multi-modal message content instead of dumping raw list representation. +- **CLI bugs** (6 bugs, 3 in each CLI): `show-config` YAML output no longer contains + `!!python/tuple` tags (uses `model_dump(mode="json")`), `--format` flag now validates input + and rejects unsupported formats, multi-worker env var cleaned up via `try/finally`. +- **MCP analysis logic** (4 bugs): Percentile calculation off-by-one (`int(n*p)` → `ceil(n*p)-1`), + trailing burst no longer silently dropped from `get_burst_events`, unfinished bursts excluded + from recovery time in `analyze_aimd_behavior`, `find_anomalies` now checks all 6 error columns + instead of only `rate_limited` and `capacity_error`. +- **Thread safety**: Added double-checked locking to `ContentGenerator._get_preset_bank()`, + porting the pattern already used in the LLM `ResponseGenerator`. +- **Memory scalability** (2 bugs): `get_stats()` loaded all latency values into Python memory + for percentile computation — replaced with SQL `LIMIT 1 OFFSET` queries (O(1) memory). + `export_data()` loaded entire database unbounded — added `limit`/`offset` parameters. + +### Changed + +- `InjectionEngine` docstring updated to accurately explain why RNG thread safety is acceptable + in the current ASGI architecture (single-threaded event loop per worker, multi-worker forks). + ## [0.1.1] - 2026-03-17 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index b84a022..aa0377a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -97,7 +97,27 @@ Key fixture helpers: `post_completion()`, `fetch_page()`, `update_config()`, `ge - `SIM108` (ternary) is ignored — prefer explicit if/else - First-party import: `errorworks` - +## Epic Creation Workflow + +When creating a new epic (a major capability or theme of work), always follow this process: + +1. **Create the epic** — `type: epic` with a clear description of the capability and its key sub-capabilities +2. **Draft requirements** — Create `type: requirement` issues as children of the epic (`parent_id`). Each requirement should have: + - `req_type`: functional, non_functional, constraint, or interface + - `rationale`: why this requirement exists + - `acceptance_criteria`: testable conditions + - `stakeholder`: who needs it +3. **Add acceptance criteria** — For non-trivial requirements, create `type: acceptance_criterion` children with Given/When/Then fields +4. **Label the epic** — Add `future` label for backlog epics, or appropriate labels for active work + +Requirements start in `drafted` state. As epics move out of backlog: +- Requirements go through `reviewing → approved` during scope refinement +- Tasks/features created during implementation link back to their requirements via dependencies +- Requirements move to `implementing → verified` as work completes (verification requires `verification_method`: test, inspection, analysis, or demonstration) + +This ensures traceability from "why does this exist" through to "how was it verified." + + ## Filigree Issue Tracker Use `filigree` for all task tracking in this project. Data lives in `.filigree/`. @@ -112,10 +132,14 @@ faster and return structured data. Key tools: - `create_issue` / `update_issue` / `close_issue` — manage issues - `claim_issue` / `claim_next` — atomic claiming - `add_comment` / `add_label` — metadata +- `list_labels` / `get_label_taxonomy` — discover labels and reserved namespaces - `create_plan` / `get_plan` — milestone planning - `get_stats` / `get_metrics` — project health - `get_valid_transitions` — workflow navigation - `observe` / `list_observations` / `dismiss_observation` / `promote_observation` — agent scratchpad +- `trigger_scan` / `trigger_scan_batch` / `get_scan_status` / `preview_scan` / `list_scanners` — automated code scanning +- `get_finding` / `list_findings` / `update_finding` / `batch_update_findings` — scan finding triage +- `promote_finding` / `dismiss_finding` — finding lifecycle (promote to issue or dismiss) Observations are fire-and-forget notes that expire after 14 days. Use `list_issues --label=from-observation` to find promoted observations. @@ -125,8 +149,8 @@ design concern. Don't stop what you're doing; just fire off the observation and carry on. They're ideal for "I don't have time to investigate this right now, but I want to come back to it." Include `file_path` and `line` when relevant so the observation is anchored to code. At session end, skim `list_observations` and -either `dismiss` (not worth tracking) or `promote` (deserves an issue) anything -that's accumulated. +either `dismiss_observation` (not worth tracking) or `promote_observation` +(deserves an issue) for anything that's accumulated. Fall back to CLI (`filigree `) when MCP is unavailable. @@ -137,6 +161,9 @@ Fall back to CLI (`filigree `) when MCP is unavailable. filigree ready # Show issues ready to work (no blockers) filigree list --status=open # All open issues filigree list --status=in_progress # Active work +filigree list --label=bug --label=P1 # Filter by multiple labels (AND) +filigree list --label-prefix=cluster/ # Filter by label namespace prefix +filigree list --not-label=wontfix # Exclude issues with label filigree show # Detailed issue view # Creating & updating @@ -155,6 +182,8 @@ filigree add-comment "text" # Add comment filigree get-comments # List comments filigree add-label