Repository navigation
Engine-parity host polish: index page, pretty JSON, engine error shape - #19
Merged
Merged
Conversation
…or shape
GET / serves the engines' minimal index page (embedded, no static file
service by design); actuator JSON responses are pretty-printed (the
engines' default SimpleMapper presentation); unknown paths and non-GET
methods answer the engines' SimpleHttpUtility error shape
{status, message, type: 'error'} with 'Resource not found'.
Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three engine-parity refinements to the HTTP host, signatures extracted from the Java
engine first:
GET /index page — the engines' minimal Welcome page (platform-corepublic/index.htmlstyle) embedded as a constant, linking/info,/info/routes,/env,/healthand/livenessprobe. Deliberately no static file service.presentation (Java
SimpleMapper= pretty Gson; the Rust port matches): 2-spaceindented JSON.
engines'
SimpleHttpUtilitysignature:{"status": 404, "message": "Resource not found", "type": "error"}(Java key insertion order), pretty-printedwith
application/json. aiohttp's default text error page is no longer reachable(catch-all route behind the exact routes).
Content types confirmed live:
application/json; charset=utf-8on all JSON endpointsand errors,
text/plainonly on/livenessprobe(engine parity),text/htmlon/.Envelope transport errors on
/api/eventare untouched (octet-stream envelopes).Why
Operations teams should not be able to tell a Python function host from an engine by
its HTTP presentation: the landing page, the JSON rendering, and the error signature
are part of the one-aggregation surface the polyglot initiative promises.
Verification
57/57 pytest (new pins: index links, error shape for GET-unknown and POST-on-known,
pretty rendering), ruff clean, basedpyright 0. Live demo drive verified all three
shapes plus the content-type map; byte-symmetric with the node twin.
Co-Authored-By: Claude Code noreply@anthropic.com
🤖 Generated with Claude Code