Skip to content

docs: document the parametric HTTP interface - #8484

Merged
cbeauchesne merged 3 commits into
mainfrom
cbeauchesne/parametric-http-interface-doc
Nov 13, 2026
Merged

cbeauchesne merged 3 commits into
mainfrom
cbeauchesne/parametric-http-interface-doc

Conversation

@cbeauchesne

@cbeauchesne cbeauchesne commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

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 calling ParametricTestClientApi method 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.py is 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 rule INFRA-010, keep every weblog specification (docs/understand/weblogs/) in sync with the code.
  • docs/understand/scenarios/parametric.md and docs/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.sh could not start the reference server (missing openfeature-sdk).

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review

🤖 Generated with Claude Code

cbeauchesne and others added 2 commits November 13, 2026 09:28
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
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

docs/understand/weblogs/parametric_weblog.md                            @DataDog/system-tests-core
tests/test_the_test/test_parametric_interface_doc.py                    @DataDog/system-tests-reviewers
.agents/rules/code-review/infrastructure-and-conventions.md             @DataDog/system-tests-core
.agents/rules/parametric-testing.md                                     @DataDog/system-tests-core
docs/understand/scenarios/parametric.md                                 @DataDog/system-tests-core
docs/understand/weblogs/README.md                                       @DataDog/system-tests-core
utils/build/docker/python/parametric/requirements.txt                   @DataDog/system-tests-reviewers

…code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 4 Pipeline jobs failed

DDCI - DataDog/system-tests | system_tests_build_python_flask-poc — 🔧 Needs a code fix, caused by this PR

View more details · View in DDCI

DataDog/system-tests | system_tests_build_python_flask-poc

View more details · View in GitLab

Testing the test | System Tests (python, prod) / End-to-end #1 / openai-py@2.0.0 1

View more details · View in GitHub Actions

View all 4 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 295bde6 | Docs | View more details | Give us feedback!

@cbeauchesne
cbeauchesne marked this pull request as ready for review November 13, 2026 09:36
@cbeauchesne
cbeauchesne requested review from a team as code owners November 13, 2026 09:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T09:45:52.363053Z 295bde6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cbeauchesne
cbeauchesne merged commit ef933a7 into main Nov 13, 2026
729 of 733 checks passed
@cbeauchesne
cbeauchesne deleted the cbeauchesne/parametric-http-interface-doc branch November 13, 2026 09:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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_

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +374 to +377
| `parent_id` | integer | |
| `service` | string | |
| `type` | string | |
| `resource` | string | |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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())):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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.

Document parametric HTTP interface

2 participants