Repository navigation
docs: document the parametric HTTP interface - #8484
Conversation
docs/understand/weblogs/parametric_weblog.md describes the server contract (port, environment, readiness check, crash endpoint) and every endpoint, generated from the test client and the Python reference server. A test_the_test check fails when an endpoint called by the client is not documented, and the agent rules ask to keep the document up to date. Also sync the requirements of run_reference_http.sh with the python parametric image: it could not start the reference server any more (missing openfeature-sdk). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c-http-interface-doc # Conflicts: # docs/understand/scenarios/parametric.md
|
|
…code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 4 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)🧪 All tests passed Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 295bde6 | Docs | View more details | Give us feedback! |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 295bde64a6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| Response: | ||
|
|
||
| _not declared by the reference server_ |
There was a problem hiding this comment.
Document the remote-config success response
For anyone implementing /trace/remote-config/apply from this new contract, this incorrectly says that the reference server has no declared response. The unchanged Python server defines TraceRemoteConfigApplyReturn with an applied_configs list whose entries contain config_id and product, returns that model from trace_remote_config_apply(), and ParametricTestClientApi.flush_remote_config() consumes the field. Document that success schema here so compatible implementations do not omit or mis-shape the response.
Useful? React with 👍 / 👎.
| | `parent_id` | integer | | | ||
| | `service` | string | | | ||
| | `type` | string | | | ||
| | `resource` | string | | |
There was a problem hiding this comment.
Mark the span-start parameters as nullable
For ordinary dd_start_span(name=...) calls, the client always includes parent_id, service, type, and resource and serializes their default None values as JSON null; the reference StartSpanArgs model likewise declares each field as Optional. Listing only integer or string here tells implementers that omission is allowed but not that the values actually sent by the client may be null, so a server validating this contract can reject normal span creation. Mark all four types as nullable.
Useful? React with 👍 / 👎.
|
|
||
| | Field | Type | Required | | ||
| |--|--|--| | ||
| | `trace_structure_request` | LlmObsAnnotationContextRequest \| LlmObsSpanRequest \| ApmSpanRequest | yes | |
There was a problem hiding this comment.
Define the LLM trace request variants
For anyone implementing /llm_observability/trace from this document, these three Python type names do not describe the accepted JSON and are not defined or linked anywhere in the specification. The reference models contain required type and sdk discriminators plus nontrivial recursive fields such as children and annotations, so an implementer cannot construct or validate a compatible request from this table. Expand the three schemas here or link to a complete definition.
Useful? React with 👍 / 👎.
| def _client_endpoints() -> set[tuple[str, str]]: | ||
| """Return the (HTTP method, path) of every request sent with `self._session.<method>(self._url(...))`""" | ||
| endpoints: set[tuple[str, str]] = set() | ||
| for function in ast.walk(ast.parse(CLIENT.read_text())): |
There was a problem hiding this comment.
Scan the inherited readiness endpoint
When the readiness route or method changes, this guard remains green because _client_endpoints() parses only _test_client_parametric.py. Every ParametricTestClientApi construction invokes the inherited TestClientApi._wait(), whose _is_alive() method sends GET /non-existent-endpoint-to-ping-until-the-server-starts from _core.py, and the new specification makes that request part of the server contract. Include the base client source in the scan or explicitly assert the documented readiness request.
Useful? React with 👍 / 👎.
Motivation
Closes #2892: the HTTP interface every parametric server must implement was only described by the code.
Changes
docs/understand/weblogs/parametric_weblog.md: server contract (port, environment variables, readiness check, request/response conventions, crash endpoint) and every endpoint called by the client, with the callingParametricTestClientApimethod and the request/response fields of the Python reference server. Endpoints not implemented by the reference server are flagged, with the fields sent by the client when the server doesn't declare a schema.tests/test_the_test/test_parametric_interface_doc.py: fails when an endpoint called by_test_client_parametric.pyis not documented..agents/rules/parametric-testing.md: agents must update the document when they change an endpoint..agents/rules/code-review/infrastructure-and-conventions.md: new review ruleINFRA-010, keep every weblog specification (docs/understand/weblogs/) in sync with the code.docs/understand/scenarios/parametric.mdanddocs/understand/weblogs/README.md: link the new document.utils/build/docker/python/parametric/requirements.txt: synced with the pins of the python parametric base image;run_reference_http.shcould not start the reference server (missingopenfeature-sdk).Workflow
🤖 Generated with Claude Code