WORK-491
ID:WORK-491Status:done

Fix plan status/severity vocabulary drift in MCP and renderer config

The MCP server and renderer config hard-coded their own copies of the status/severity vocabulary and have drifted from the canonical enums.ts — a regression of the drift SPEC-037 / WORK-127 fixed once. This is the quick, standalone fix that ships value before the larger consolidation work.

Priority:highComplexity:simpleMilestone:v0.28.0Source:SPEC-117

Criteria completion

Criteria completion: 5 of 5 (100%) checked; history from Jul 9 to Jul 140%25%50%75%100%Jul 9Jul 14
Branches 3
History 3
  1. cf13ce1
    • ☑ `mcp-bindings.ts` `STATUS_VALUES` accepts `pending` (currently omitted — MCP `plan.update` rejects the valid `pending` work status)
    • ☑ `mcp-bindings.ts` `SEVERITY_VALUES` uses `cosmetic`, not `trivial` (currently rejects the valid `cosmetic` and accepts `trivial`, which `plan validate` then flags)
    • ☑ `config.ts` bug `sentimentMap` keys `cosmetic` instead of `trivial`
    • ☑ `config.ts` work `sentimentMap` includes a `pending` entry
    • ☑ Tests cover `plan.update` accepting `pending` and `cosmetic` via the MCP path
    by bjornolofandersson
  2. 283ce5a
    Created (ready)by bjornolofandersson
  3. 9a519fd
    Content editedby Claude
    plan: add v0.28.0 plan-model-hardening milestone and work breakdown

Acceptance Criteria

  • mcp-bindings.ts STATUS_VALUES accepts pending (currently omitted — MCP plan.update rejects the valid pending work status)
  • mcp-bindings.ts SEVERITY_VALUES uses cosmetic, not trivial (currently rejects the valid cosmetic and accepts trivial, which plan validate then flags)
  • config.ts bug sentimentMap keys cosmetic instead of trivial
  • config.ts work sentimentMap includes a pending entry
  • Tests cover plan.update accepting pending and cosmetic via the MCP path

Approach

Point-fix the three files. This deliberately does not attempt the full single-source refactor (the follow-up consolidation work does that and makes these fixes structural rather than manual) — the aim here is to close the live bugs immediately.

References

  • SPEC-117 — spec (Drift-bug fixes)
  • SPEC-037 / WORK-127 — the earlier fix this regressed

Resolution

Completed: 2026-07-09

Branch: claude/milestone-v0-28-0-llvtfa PR: refrakt-md/refrakt#565

What was done

  • Folded structurally into WORK-492's consolidation: MCP STATUS_VALUES/SEVERITY_VALUES now derive from enums.ts, so plan.update accepts pending and cosmetic and rejects trivial.
  • config.ts bug sentimentMap keys cosmetic; work sentimentMap gains pending (plus cancelled/superseded).
  • Added MCP drift-guard tests in test/mcp-bindings.test.ts.