Skip to content

fix: observability gaps and two product gaps (#215, #217) - #229

Closed
jrosskopf wants to merge 12 commits into
mainfrom
fix/gh-215-217-observability
Closed

jrosskopf wants to merge 12 commits into
mainfrom
fix/gh-215-217-observability

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • MCP JSON-RPC responses carry X-Request-Id; the access-log Request: line carries request_id (text and JSON).
  • Async MCP tasks report end-to-end latency as protocol mcp_task series in the metrics endpoint.
  • --validate-config lists every invalid endpoint/template file and warns on undeclared params.x.
  • Swagger UI assets (swagger-ui-dist 5.18.2) are built into the binary and served from /doc/assets/ (+1.9 MB binary).
  • Config-service PUT patches the YAML text, keeping comments; verified by re-parse, falls back to re-emit.

Test plan

  • Red tests committed first and failing on the pre-fix binary, green after
  • ctest (985) green; 403 integration tests (config-service, MCP, audit, docs) green
  • Undeclared-param check run over examples/ (flagged shared templates, hence warning not error)

Refs #215 #217


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

- POST /mcp/jsonrpc initialize, tools/list, tools/call and a malformed body
  must all answer with X-Request-Id; today none do
- Text and JSON formats, and exactly one Request: line per request
- A task queued behind a busy worker must show its queue wait in an mcp_task series
…ams (red, #215)

- two bad templates are both listed, params.nope fails validation
- a template using path/header/body fields, sections, conn/env/cache/context is not flagged
…es request_id (#215)

- re-assert X-Request-Id in after_handle: MCP handlers return a fresh
  crow::response that replaced the header set in before_handle
- hold Crow's Request: line (logged before any middleware) per thread and
  write it from before_handle once the request has an id
- stamp submit and finish times; record submit-to-finish (queue wait included)
  as an mcp_task series in the metrics endpoint, outside total/server_errors
…ed params (#215)

- collect endpoint load errors instead of stopping at the first
- warn on {{ params.x }} not declared in request fields, url-path or limit/offset
  (a warning: shipped examples share templates between endpoints)
)

- vendor swagger-ui-dist 5.18.2, embed via a generated source, serve at /doc/assets/
- about 1.9 MB larger binary
- patch changed keys into the existing text instead of re-emitting the file
- verified by re-parsing; falls back to the re-emit for layouts it cannot patch
@jrosskopf

Copy link
Copy Markdown
Contributor Author

Superseded by #230 (combined and merged).

@jrosskopf jrosskopf closed this Nov 21, 2026
@jrosskopf
jrosskopf deleted the fix/gh-215-217-observability branch November 21, 2026 03:27
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