Skip to content

feat(status-pages): JSON view and atomic JSON apply for the editor, API and MCP - #1944

Merged
Makisuo merged 17 commits into
status-pages/6-themefrom
status-pages/7-json
Oct 31, 2026
Merged

Makisuo merged 17 commits into
status-pages/6-themefrom
status-pages/7-json

test(status-pages): the config apply audits a change once and a no-op…

98b1124
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 31, 2026 in 30s

Confidence 8/10 · No issues found

🟢 Confidence 8/10 · likely safe to merge. Held at 8 because earlier reviews of this pull request found 7 defects.
2 notes · tests covered · risk medium · 4/4 new units observable · 7 defects fixed in earlier rounds

Adds a JSON config document for status pages with an atomic apply, exposed on API v2, MCP and a new editor tab. The only change since the last review is status-pages.http.test.ts, which now pins the apply round trip, one audit entry per real change and none for a no-op. The open McpQueryError issues in registry.ts are not addressed: that diff only threads parseOptions into decoding.

  • makeHarness shares one makeMemoryAuditLog() with allV2GroupLayersWithAudit, so route audits are assertable
  • New config suite covers round trip, apply, 400s, unknown keys, 409 and admin/org guards
  • F9's gap is closed: status_page.config_applied occurs once for a change and never for a no-op

Still open from earlier reviews

Production impact

Open errors in the changed files (2)
Issue Service Occurrences File
@maple/mcp/errors/McpQueryError (6 issues) maple-chat 1.3k apps/ai/src/mcp/tools/registry.ts
@maple/mcp/errors/McpQueryError (4 issues) maple-ai 349 apps/ai/src/mcp/tools/registry.ts

After this merges, Maple checks whether they stop.

Telemetry this change adds and removes (4)
  • ➕ span name McpTool.getStatusPageConfig · apps/ai/src/mcp/tools/status-pages.ts:608
  • ➕ span name McpTool.applyStatusPageConfig · apps/ai/src/mcp/tools/status-pages.ts:646
  • ➕ span name StatusPagesService.getConfig · packages/backend/src/services/status-pages/StatusPagesService.ts:1377
  • ➕ span name StatusPagesService.applyConfig · packages/backend/src/services/status-pages/StatusPagesService.ts:1390
What was checked
  • allV2GroupLayersWithAudit and makeMemoryAuditLog exist and are used the same way in api-keys.http.test.ts:65
  • Each test builds its own harness, so the shared in-memory audit cannot leak between cases
  • registry.ts only adds parseOptions; the McpQueryError frames come from tool handlers, untouched here
Observability coverage: 4 of 4 changes observable
Change Kind Observable Evidence
GET /v2/status_pages/{id}/config http route yes server span from HttpMiddleware.tracer (apps/api/src/http/api-observability.ts:28)
PUT /v2/status_pages/{id}/config http route yes server span from HttpMiddleware.tracer (apps/api/src/http/api-observability.ts:28)
StatusPagesService.applyConfig service operation yes Effect.fn span with maple.status_page.* attributes (StatusPagesService.ts:1390-1402)
get_status_page_config / apply_status_page_config MCP tool yes registry wraps execution in its own Effect.fn span (registry.ts:624)

98b1124 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.