From b2d955ef6614f85242d74186c19b4f75000d9878 Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Thu, 19 Feb 2026 11:25:43 +0300 Subject: [PATCH 1/7] Branch for FU-P12-T3-1: document error_message parameter From 885e8ef626601133c3a7dc2459fc621c6fcaafa2 Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Thu, 19 Feb 2026 11:26:00 +0300 Subject: [PATCH 2/7] Select task FU-P12-T3-1: Document unused error_message parameter in MetricsCollector.record_response --- SPECS/INPROGRESS/next.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/SPECS/INPROGRESS/next.md b/SPECS/INPROGRESS/next.md index 0cb0aeac..739fe14f 100644 --- a/SPECS/INPROGRESS/next.md +++ b/SPECS/INPROGRESS/next.md @@ -1,16 +1,19 @@ -# No Active Task +# Next Task: FU-P12-T3-1 — Document unused `error_message` parameter in `MetricsCollector.record_response` -## Recently Archived +**Priority:** P3 +**Phase:** Phase 13: Post-Release Follow-ups +**Effort:** 0.5-1 hour +**Dependencies:** P12-T3 +**Status:** Selected -- 2026-02-19 — FU-P12-T1-6: Uniform HTML escaping in `renderClientWidgets` (PASS) -- 2026-02-19 — FU-P12-T1-5: Cap `_clients` dict and prune `client_identities` to prevent unbounded growth (PASS) -- 2026-02-19 — FU-P12-T1-4: Make `IN FLIGHT` KPI reflect real in-flight requests in shared-metrics mode (PASS) -- 2026-02-19 — FU-P12-T3-2: Add `error_code` column to audit CSV export (PASS) -- 2026-02-18 — FU-P12-T1-3: Show multi-client widgets in Web UI instead of single overwritten active client (PASS) -- 2026-02-18 — FU-P12-T1-2: Add code comment clarifying stdin-only client capture in `on_request` (PASS) +## Description -## Suggested Next Tasks +`MetricsCollector.record_response()` accepts `error_message: Optional[str]` for +API symmetry with `SharedMetricsStore`, but the in-memory collector never +stores or uses it. Add a docstring note clarifying this parameter is accepted +for compatibility and intentionally not persisted. -- P13-T5 follow-up — Complete interactive prompt verification in a desktop session (P1) -- FU-P12-T3-1 — Document unused `error_message` parameter in `MetricsCollector.record_response` (P3) -- Final scripted follow-up after this: no additional `pick_next_task` items remain +## Next Step + +Run the PLAN command to create the task PRD with implementation details, +acceptance criteria, and validation gates. From 1aa1decd7ff5415afce151de1f3ffdaf843c7e3f Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Thu, 19 Feb 2026 11:26:16 +0300 Subject: [PATCH 3/7] Plan task FU-P12-T3-1: Document unused error_message parameter in MetricsCollector.record_response --- ...ter_in_MetricsCollector_record_response.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 SPECS/INPROGRESS/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md diff --git a/SPECS/INPROGRESS/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md b/SPECS/INPROGRESS/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md new file mode 100644 index 00000000..37fd7008 --- /dev/null +++ b/SPECS/INPROGRESS/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md @@ -0,0 +1,74 @@ +# PRD: FU-P12-T3-1 — Document unused `error_message` parameter in `MetricsCollector.record_response` + +**Created:** 2026-02-19 +**Priority:** P3 +**Branch:** `codex/feature/FU-P12-T3-1-document-error-message-param` +**Status:** PLAN + +--- + +## 1. Problem Statement + +`MetricsCollector.record_response()` accepts `error_message` to mirror the +shared-store API shape, but the in-memory collector never persists that value. +The current docstring does not explicitly state this, which can mislead future +maintainers. + +--- + +## 2. Scope + +### In Scope +- Update the `error_message` docstring in `MetricsCollector.record_response()` + to explicitly note compatibility-only behavior. + +### Out of Scope +- Any functional logic changes to metrics collection. +- Changes to `SharedMetricsStore` persistence behavior. +- API signature changes. + +--- + +## 3. Deliverables + +1. Docstring clarification +- `src/mcpbridge_wrapper/webui/metrics.py` +- Add explicit note: `error_message` is accepted for interface symmetry but not + persisted in the in-memory collector. + +2. Validation artifact +- `SPECS/INPROGRESS/FU-P12-T3-1_Validation_Report.md` + +--- + +## 4. Acceptance Criteria + +- [ ] Docstring clearly notes `error_message` is accepted for API symmetry but + not stored in-memory. +- [ ] No functional behavior changes. +- [ ] `pytest` passes. +- [ ] `ruff check src/` passes. +- [ ] `mypy src/` passes. +- [ ] `pytest --cov` reports coverage >= 90%. + +--- + +## 5. Dependencies + +- P12-T3 ✅ + +--- + +## 6. Risks and Mitigations + +- **Risk:** Wording may be too vague and still imply optional persistence. + - **Mitigation:** Use direct phrasing: accepted for compatibility, ignored for + storage in this collector. + +--- + +## 7. Validation Plan + +1. Update the target docstring line in `metrics.py`. +2. Run quality gates to confirm no behavior regressions. +3. Record results in validation report. From 83ae28c822eeafee52ab9031f021c3eba32e6aee Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Thu, 19 Feb 2026 11:27:09 +0300 Subject: [PATCH 4/7] Implement FU-P12-T3-1: clarify error_message compatibility in metrics docstring --- .../FU-P12-T3-1_Validation_Report.md | 38 +++++++++++++++++++ src/mcpbridge_wrapper/webui/metrics.py | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 SPECS/INPROGRESS/FU-P12-T3-1_Validation_Report.md diff --git a/SPECS/INPROGRESS/FU-P12-T3-1_Validation_Report.md b/SPECS/INPROGRESS/FU-P12-T3-1_Validation_Report.md new file mode 100644 index 00000000..44557ca9 --- /dev/null +++ b/SPECS/INPROGRESS/FU-P12-T3-1_Validation_Report.md @@ -0,0 +1,38 @@ +# Validation Report — FU-P12-T3-1 + +**Task:** FU-P12-T3-1 — Document unused `error_message` parameter in `MetricsCollector.record_response` +**Date:** 2026-02-19 +**Verdict:** PASS + +## Scope + +- Clarified `MetricsCollector.record_response()` docstring for + `error_message`: accepted for API compatibility with `SharedMetricsStore`, + but not stored by the in-memory collector. +- No functional code changes were introduced. + +## Files Changed + +- `src/mcpbridge_wrapper/webui/metrics.py` + +## Required Quality Gates + +- `pytest` + - Result: **PASS** (`594 passed, 5 skipped, 2 warnings`) +- `ruff check src/` + - Result: **PASS** (`All checks passed!`) +- `mypy src/` + - Result: **PASS** (`Success: no issues found in 18 source files`) +- `pytest --cov` + - Result: **PASS** (`594 passed, 5 skipped, 2 warnings`; total coverage **92.18%**, threshold 90%) + +## Acceptance Criteria Status + +- [x] Docstring clearly notes `error_message` is accepted for API symmetry but + not stored in-memory. +- [x] No functional changes. + +## Notes + +- Existing third-party deprecation warnings from `websockets` / `uvicorn` were + observed during test runs and are unrelated to this task. diff --git a/src/mcpbridge_wrapper/webui/metrics.py b/src/mcpbridge_wrapper/webui/metrics.py index aa3c0eed..e9276df3 100644 --- a/src/mcpbridge_wrapper/webui/metrics.py +++ b/src/mcpbridge_wrapper/webui/metrics.py @@ -173,7 +173,9 @@ def record_response( latency_ms: Explicit latency in milliseconds. If not provided and request_id was tracked, latency is computed automatically. error_code: JSON-RPC error code (if error=True). - error_message: JSON-RPC error message (if error=True). + error_message: JSON-RPC error message (if error=True). Accepted for + API compatibility with SharedMetricsStore; not stored by the + in-memory collector. """ now = time.time() with self._lock: From fc6c6fd0e3050487f64f4d66133439f7d93806d5 Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Thu, 19 Feb 2026 11:28:37 +0300 Subject: [PATCH 5/7] Archive task FU-P12-T3-1: Document unused error_message parameter in MetricsCollector.record_response (PASS) --- ...ter_in_MetricsCollector_record_response.md | 4 +++ .../FU-P12-T3-1_Validation_Report.md | 0 SPECS/ARCHIVE/INDEX.md | 4 ++- SPECS/INPROGRESS/next.md | 25 ++++++++----------- SPECS/Workplan.md | 7 +++--- 5 files changed, 21 insertions(+), 19 deletions(-) rename SPECS/{INPROGRESS => ARCHIVE/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response}/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md (97%) rename SPECS/{INPROGRESS => ARCHIVE/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response}/FU-P12-T3-1_Validation_Report.md (100%) diff --git a/SPECS/INPROGRESS/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md b/SPECS/ARCHIVE/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md similarity index 97% rename from SPECS/INPROGRESS/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md rename to SPECS/ARCHIVE/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md index 37fd7008..9bf02574 100644 --- a/SPECS/INPROGRESS/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md +++ b/SPECS/ARCHIVE/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response.md @@ -72,3 +72,7 @@ maintainers. 1. Update the target docstring line in `metrics.py`. 2. Run quality gates to confirm no behavior regressions. 3. Record results in validation report. + +--- +**Archived:** 2026-02-19 +**Verdict:** PASS diff --git a/SPECS/INPROGRESS/FU-P12-T3-1_Validation_Report.md b/SPECS/ARCHIVE/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response/FU-P12-T3-1_Validation_Report.md similarity index 100% rename from SPECS/INPROGRESS/FU-P12-T3-1_Validation_Report.md rename to SPECS/ARCHIVE/FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response/FU-P12-T3-1_Validation_Report.md diff --git a/SPECS/ARCHIVE/INDEX.md b/SPECS/ARCHIVE/INDEX.md index 16afc9bc..4bb85af8 100644 --- a/SPECS/ARCHIVE/INDEX.md +++ b/SPECS/ARCHIVE/INDEX.md @@ -1,6 +1,6 @@ # mcpbridge-wrapper Tasks Archive -**Last Updated:** 2026-02-19 (REVIEW_fu_p12_t1_6_uniform_client_widget_escaping_archived) +**Last Updated:** 2026-02-19 (FU-P12-T3-1_archived) ## Archived Tasks @@ -121,6 +121,7 @@ | FU-P12-T1-4 | [FU-P12-T1-4_Make_IN_FLIGHT_KPI_reflect_real_in_flight_requests_in_shared_metrics_mode/](FU-P12-T1-4_Make_IN_FLIGHT_KPI_reflect_real_in_flight_requests_in_shared_metrics_mode/) | 2026-02-19 | PASS | | FU-P12-T1-5 | [FU-P12-T1-5_Cap_clients_dict_and_prune_client_identities_to_prevent_unbounded_growth/](FU-P12-T1-5_Cap_clients_dict_and_prune_client_identities_to_prevent_unbounded_growth/) | 2026-02-19 | PASS | | FU-P12-T1-6 | [FU-P12-T1-6_Uniform_HTML_escaping_in_renderClientWidgets/](FU-P12-T1-6_Uniform_HTML_escaping_in_renderClientWidgets/) | 2026-02-19 | PASS | +| FU-P12-T3-1 | [FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response/](FU-P12-T3-1_Document_unused_error_message_parameter_in_MetricsCollector_record_response/) | 2026-02-19 | PASS | | FU-P12-T3-2 | [FU-P12-T3-2_Add_error_code_column_to_audit_CSV_export/](FU-P12-T3-2_Add_error_code_column_to_audit_CSV_export/) | 2026-02-19 | PASS | ## Historical Artifacts @@ -366,5 +367,6 @@ | 2026-02-19 | FU-P12-T1-5 | Archived REVIEW_FU-P12-T1-5_client_identity_retention report | | 2026-02-19 | FU-P12-T1-6 | Archived Uniform_HTML_escaping_in_renderClientWidgets (PASS) | | 2026-02-19 | FU-P12-T1-6 | Archived REVIEW_FU-P12-T1-6_uniform_client_widget_escaping report | +| 2026-02-19 | FU-P12-T3-1 | Archived Document_unused_error_message_parameter_in_MetricsCollector_record_response (PASS) | | 2026-02-19 | FU-P12-T3-2 | Archived Add_error_code_column_to_audit_CSV_export (PASS) | | 2026-02-19 | FU-P12-T3-2 | Archived REVIEW_FU-P12-T3-2_error_code_csv_export report | diff --git a/SPECS/INPROGRESS/next.md b/SPECS/INPROGRESS/next.md index 739fe14f..b3cabfcf 100644 --- a/SPECS/INPROGRESS/next.md +++ b/SPECS/INPROGRESS/next.md @@ -1,19 +1,14 @@ -# Next Task: FU-P12-T3-1 — Document unused `error_message` parameter in `MetricsCollector.record_response` +# No Active Task -**Priority:** P3 -**Phase:** Phase 13: Post-Release Follow-ups -**Effort:** 0.5-1 hour -**Dependencies:** P12-T3 -**Status:** Selected +## Recently Archived -## Description +- 2026-02-19 — FU-P12-T3-1: Document unused `error_message` parameter in `MetricsCollector.record_response` (PASS) +- 2026-02-19 — FU-P12-T1-6: Uniform HTML escaping in `renderClientWidgets` (PASS) +- 2026-02-19 — FU-P12-T1-5: Cap `_clients` dict and prune `client_identities` to prevent unbounded growth (PASS) +- 2026-02-19 — FU-P12-T1-4: Make `IN FLIGHT` KPI reflect real in-flight requests in shared-metrics mode (PASS) +- 2026-02-19 — FU-P12-T3-2: Add `error_code` column to audit CSV export (PASS) +- 2026-02-18 — FU-P12-T1-3: Show multi-client widgets in Web UI instead of single overwritten active client (PASS) -`MetricsCollector.record_response()` accepts `error_message: Optional[str]` for -API symmetry with `SharedMetricsStore`, but the in-memory collector never -stores or uses it. Add a docstring note clarifying this parameter is accepted -for compatibility and intentionally not persisted. +## Suggested Next Tasks -## Next Step - -Run the PLAN command to create the task PRD with implementation details, -acceptance criteria, and validation gates. +- No pending tasks remain (`126/126` complete). diff --git a/SPECS/Workplan.md b/SPECS/Workplan.md index de6357c5..4941f694 100644 --- a/SPECS/Workplan.md +++ b/SPECS/Workplan.md @@ -2302,7 +2302,8 @@ Phase 9 Follow-up Backlog --- -#### ⬜️ FU-P12-T3-1: Document unused `error_message` parameter in `MetricsCollector.record_response` +#### ✅ FU-P12-T3-1: Document unused `error_message` parameter in `MetricsCollector.record_response` +- **Status:** ✅ Completed (2026-02-19) - **Description:** `MetricsCollector.record_response()` accepts `error_message: Optional[str]` for API symmetry with `SharedMetricsStore`, but never stores or uses it. Add a docstring note clarifying this parameter is accepted for interface compatibility but not persisted in the in-memory collector. - **Priority:** P3 - **Dependencies:** P12-T3 @@ -2310,8 +2311,8 @@ Phase 9 Follow-up Backlog - **Outputs/Artifacts:** - Updated `src/mcpbridge_wrapper/webui/metrics.py` — docstring clarification on `error_message` parameter - **Acceptance Criteria:** - - [ ] Docstring clearly notes `error_message` is accepted for API symmetry but not stored in-memory - - [ ] No functional changes + - [x] Docstring clearly notes `error_message` is accepted for API symmetry but not stored in-memory + - [x] No functional changes --- From 96e4a66c8567d9eaa32d6c9f577da459ab65aa80 Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Thu, 19 Feb 2026 11:28:51 +0300 Subject: [PATCH 6/7] Review FU-P12-T3-1: error_message docstring --- ...IEW_FU-P12-T3-1_error_message_docstring.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 SPECS/INPROGRESS/REVIEW_FU-P12-T3-1_error_message_docstring.md diff --git a/SPECS/INPROGRESS/REVIEW_FU-P12-T3-1_error_message_docstring.md b/SPECS/INPROGRESS/REVIEW_FU-P12-T3-1_error_message_docstring.md new file mode 100644 index 00000000..8c195478 --- /dev/null +++ b/SPECS/INPROGRESS/REVIEW_FU-P12-T3-1_error_message_docstring.md @@ -0,0 +1,33 @@ +## REVIEW REPORT — FU-P12-T3-1 error_message docstring + +**Scope:** origin/main..HEAD +**Files:** 8 + +### Summary Verdict +- [x] Approve +- [ ] Approve with comments +- [ ] Request changes +- [ ] Block + +### Critical Issues +- None. + +### Secondary Issues +- None. + +### Architectural Notes +- Documentation now makes the interface contract explicit: the in-memory + collector accepts `error_message` for compatibility with shared metrics API + shape but does not persist it. +- Behavior remains unchanged by design. + +### Tests +- Quality gates rerun and passing: + - `pytest` (`594 passed, 5 skipped, 2 warnings`) + - `ruff check src/` (`All checks passed!`) + - `mypy src/` (`Success: no issues found in 18 source files`) + - `pytest --cov` (`92.18%`, threshold `>=90%`) + +### Next Steps +- No actionable follow-up items identified. +- FOLLOW-UP step can be skipped for this task. From 108b879f9edff799b405aac170583eb4fdd1e2a8 Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Thu, 19 Feb 2026 11:29:13 +0300 Subject: [PATCH 7/7] Archive REVIEW_FU-P12-T3-1_error_message_docstring report --- SPECS/ARCHIVE/INDEX.md | 4 +++- .../REVIEW_FU-P12-T3-1_error_message_docstring.md | 0 2 files changed, 3 insertions(+), 1 deletion(-) rename SPECS/{INPROGRESS => ARCHIVE/_Historical}/REVIEW_FU-P12-T3-1_error_message_docstring.md (100%) diff --git a/SPECS/ARCHIVE/INDEX.md b/SPECS/ARCHIVE/INDEX.md index 4bb85af8..2d685717 100644 --- a/SPECS/ARCHIVE/INDEX.md +++ b/SPECS/ARCHIVE/INDEX.md @@ -1,6 +1,6 @@ # mcpbridge-wrapper Tasks Archive -**Last Updated:** 2026-02-19 (FU-P12-T3-1_archived) +**Last Updated:** 2026-02-19 (REVIEW_fu_p12_t3_1_error_message_docstring_archived) ## Archived Tasks @@ -207,6 +207,7 @@ | [REVIEW_FU-P12-T1-4_in_flight_shared_metrics.md](_Historical/REVIEW_FU-P12-T1-4_in_flight_shared_metrics.md) | Review report for FU-P12-T1-4 | | [REVIEW_FU-P12-T1-5_client_identity_retention.md](_Historical/REVIEW_FU-P12-T1-5_client_identity_retention.md) | Review report for FU-P12-T1-5 | | [REVIEW_FU-P12-T1-6_uniform_client_widget_escaping.md](_Historical/REVIEW_FU-P12-T1-6_uniform_client_widget_escaping.md) | Review report for FU-P12-T1-6 | +| [REVIEW_FU-P12-T3-1_error_message_docstring.md](_Historical/REVIEW_FU-P12-T3-1_error_message_docstring.md) | Review report for FU-P12-T3-1 | | [REVIEW_FU-P12-T3-2_error_code_csv_export.md](_Historical/REVIEW_FU-P12-T3-2_error_code_csv_export.md) | Review report for FU-P12-T3-2 | ## Archive Log @@ -368,5 +369,6 @@ | 2026-02-19 | FU-P12-T1-6 | Archived Uniform_HTML_escaping_in_renderClientWidgets (PASS) | | 2026-02-19 | FU-P12-T1-6 | Archived REVIEW_FU-P12-T1-6_uniform_client_widget_escaping report | | 2026-02-19 | FU-P12-T3-1 | Archived Document_unused_error_message_parameter_in_MetricsCollector_record_response (PASS) | +| 2026-02-19 | FU-P12-T3-1 | Archived REVIEW_FU-P12-T3-1_error_message_docstring report | | 2026-02-19 | FU-P12-T3-2 | Archived Add_error_code_column_to_audit_CSV_export (PASS) | | 2026-02-19 | FU-P12-T3-2 | Archived REVIEW_FU-P12-T3-2_error_code_csv_export report | diff --git a/SPECS/INPROGRESS/REVIEW_FU-P12-T3-1_error_message_docstring.md b/SPECS/ARCHIVE/_Historical/REVIEW_FU-P12-T3-1_error_message_docstring.md similarity index 100% rename from SPECS/INPROGRESS/REVIEW_FU-P12-T3-1_error_message_docstring.md rename to SPECS/ARCHIVE/_Historical/REVIEW_FU-P12-T3-1_error_message_docstring.md