Skip to content

fix: return snake_case runtime assignments and events (MCP-14) - #45

Merged
CountableNewt merged 2 commits into
devfrom
fix/mcp-14-runtime-response
Sep 28, 2026
Merged

CountableNewt merged 2 commits into
devfrom
fix/mcp-14-runtime-response

Conversation

@CountableNewt

Copy link
Copy Markdown
Collaborator

Fixes MCP-14 / #39.

ProjectController.runtimeSettingsResponse returned the raw Fluent SkillAssignment and SkillRuntimeEvent models. Fluent encodes Swift property names (traceId, eventType, skillId, activationMode, …), while the dashboard contract reads snake_case. As a result:

  • Recent Resolution Events rendered a blank trace ID, : runtime, and a dash.
  • Saved assignments loaded without skill_id, so any save (including telemetry-only) resubmitted them in a form the PATCH validator rejects.
  • Internal fields (client identity, request hash, detail JSON, parent project) were sent to the browser.

Changes

  • New RuntimeAssignmentResponse / RuntimeEventResponse DTOs for both GET and PATCH, with only browser-needed fields.
  • Renamed the section to Recent Runtime Events, since it now includes deliveries and reports.

Tests

  • Gateway: new route test checks the exact assignment keys, snake_case event fields, null skill/reason, that internal values don't leak, and a GET → PATCH round trip of saved assignments on a telemetry-only save.
  • Web: renders a legacy selection event and an instruction-delivery event with the correct labels, and asserts the save payload resubmits the loaded assignment unchanged.
  • swift test --filter SkillUsageRoute (2/2)
  • vitest run components/dashboard/skill-usage-section.test.tsx (9/9), bun run typecheck, bun run lint

🤖 Generated with Claude Code

GET/PATCH /projects/:id/skill-runtime encoded the Fluent SkillAssignment
and SkillRuntimeEvent models directly, so the dashboard received
camelCase property names (plus internal fields such as client identity,
request hash and detail JSON). Recent events rendered blank, and saved
assignments could not be resubmitted. Map both to explicit snake_case
response DTOs with only browser-needed fields, and rename the section to
Recent Runtime Events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Sep 27, 2026

Copy link
Copy Markdown

MCP-14

The runtime-settings PATCH round trip passed locally only because a local
env file set FRONTEND_URL; CI has none, so the origin check returned 403.
Set FRONTEND_URL in the test app and send that origin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CountableNewt
CountableNewt merged commit 61dea2a into dev Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant