From 4083b5fda4d6fdac18d0b07b4f735ee99f57a6cd Mon Sep 17 00:00:00 2001 From: "dd-apm-ecosystems[bot]" <183529005+dd-apm-ecosystems[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:04:13 +0000 Subject: [PATCH 1/5] Review learning: rule changes from 2026-10-01 to 2026-10-31 --- .agents/rules/code-review/activation-and-metadata.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.agents/rules/code-review/activation-and-metadata.md b/.agents/rules/code-review/activation-and-metadata.md index bec7e14d122..4360a4ae963 100644 --- a/.agents/rules/code-review/activation-and-metadata.md +++ b/.agents/rules/code-review/activation-and-metadata.md @@ -41,7 +41,7 @@ - Old_id: claude-07 - Severity: P1 - Flag: Pick the marker that matches the cause. When one PR excludes tests for different causes, give each exclusion its own reason, and make each reason state the real cause. By default, markers other than `irrelevant` and `flaky` become a non-strict xfail, and `conftest.py` also records a fixture error as `xfailed`. When a marked test fails before its assertions, the reason must name that failure. -- Detect: A marker contradicts its cause, or several exclusions with different causes share one vague reason. A marked test fails during setup because of invalid configuration or a missing required secret that the marker does not describe. +- Detect: A marker contradicts its cause, or several exclusions with different causes share one vague reason. A marked test fails during setup from invalid configuration or a missing secret, and the marker does not describe it. A new declaration has no reason. A marker blames the library, but a test defect causes the failure. For example, no library can pass the assertion, or the test setup is nondeterministic. - ✅ Use `incomplete_test_app (weblog has no /ffe endpoint)` when the weblog does not implement the endpoint. - ❌ Use `missing_feature` for an endpoint that the weblog does not implement. Set `DD_TRACE_AGENT_PORT` to the literal `agent.port`, causing the library to exit at startup while the run reports an expected failure. - Ref: [Declaration decorators](../../../docs/edit/skip-tests.md#declaration-decorators) @@ -74,3 +74,8 @@ - ✅ Add, remove, or rename the workflow step in the same PR as the scenario. - ❌ Add a named scenario without its workflow step, even when its scenario groups are otherwise valid. - Ref: [End-to-end testing rules](../end-to-end-testing.md) + +### META-010: Gate each test at the version that ships its behavior. +- Severity: P0 +- Flag: A method that needs behavior from a later release than its class must have its own version declaration. A class that tests behavior an SDK later changed must stop at the version before the change. A version gate for a change on several active release lines must cover each line. +- Detect: A class-level version activates a method whose behavior shipped in a later release. A version gate starts before the SDK emits the data that the test needs. A class that tests a legacy behavior has no upper version bound. A version range in a manifest or `tests/parametric/capabilities.yml` omits an active release line. From 739e4b04b50a3051f0fef30469ba6019d50c3d41 Mon Sep 17 00:00:00 2001 From: "dd-apm-ecosystems[bot]" <183529005+dd-apm-ecosystems[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:04:14 +0000 Subject: [PATCH 2/5] Review learning: rule changes from 2026-10-01 to 2026-10-31 --- .../code-review/infrastructure-and-conventions.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.agents/rules/code-review/infrastructure-and-conventions.md b/.agents/rules/code-review/infrastructure-and-conventions.md index a4b93d012e0..2404173d351 100644 --- a/.agents/rules/code-review/infrastructure-and-conventions.md +++ b/.agents/rules/code-review/infrastructure-and-conventions.md @@ -73,3 +73,13 @@ - ✅ Add the `/new_endpoint` route to the weblogs and its section to `end-to-end_weblog.md` in the same pull request. - ❌ Add a field to the response of a parametric endpoint, and leave `parametric_weblog.md` unchanged. - Ref: [Weblogs](../../../docs/understand/weblogs/README.md) + +### INFRA-011: Authenticate GitHub API calls in image builds. +- Severity: P1 +- Flag: A build script that calls the GitHub API must use the shared `get_latest_release` helper and the `github_token` secret. Each Dockerfile step that calls the API must mount that secret with `RUN --mount=type=secret,id=github_token`. A change to the secret flow must update every language Dockerfile in the same pull request. +- Detect: The build passes `--secret id=github_token`, and a Dockerfile step that calls the GitHub API has no secret mount. A script calls the releases API with `wget` or `curl` and no token or no `--fail`. A script prints the token under `set -x`. + +### INFRA-013: Stop the session when provisioning fails. +- Severity: P0 +- Flag: A VM provisioning or warmup step must check that its result works. If it fails, it must stop the session. Do not store an unknown error and then run every test against a broken environment. +- Detect: A provisioning step installs a package or an engine and never checks it, for example with `docker info`. An error handler stores an unknown provisioning error and continues instead of calling `pytest.exit`. From af83b198296b4326f9493fbc84545cea45c450bd Mon Sep 17 00:00:00 2001 From: "dd-apm-ecosystems[bot]" <183529005+dd-apm-ecosystems[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:04:16 +0000 Subject: [PATCH 3/5] Review learning: rule changes from 2026-10-01 to 2026-10-31 --- .agents/rules/code-review/test-effectiveness.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.agents/rules/code-review/test-effectiveness.md b/.agents/rules/code-review/test-effectiveness.md index 4a68ef64fef..40cd4f1718d 100644 --- a/.agents/rules/code-review/test-effectiveness.md +++ b/.agents/rules/code-review/test-effectiveness.md @@ -47,7 +47,7 @@ - Old_id: codex-11 - Severity: P1 - Flag: Do not write the expected tag, code, or exporter result in the test app. The SDK must produce it. The assertion may name the value it expects. It must read that value from SDK output.. -- Detect: The app adds `runtime-id` or another tag the SDK must produce. It copies SDK result codes into its own map. It forces an exporter that the configuration already selects. +- Detect: The app adds `runtime-id` or another tag the SDK must produce. It copies SDK result codes into its own map. It forces an exporter that the configuration already selects. It returns a made-up default instead of None for a setting the SDK does not support. It catches every exception and still returns OK. Its span helpers ignore the stored parent or write fields the tracer does not use. - ✅ The tracer sets `runtime-id`, and the test asserts it on the captured span. - ❌ The app sets `runtime-id` on the span, and the test asserts that tag. From e2afa63ab8781f9a7fdda01db78c57d6c0277e40 Mon Sep 17 00:00:00 2001 From: Roberto Montero <108007532+robertomonteromiguel@users.noreply.github.com> Date: Thu, 19 Nov 2026 08:25:54 +0100 Subject: [PATCH 4/5] Review learning: add LIFE-005, its evidence comes from 2 or more PRs --- .agents/rules/code-review/lifecycle-and-isolation.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.agents/rules/code-review/lifecycle-and-isolation.md b/.agents/rules/code-review/lifecycle-and-isolation.md index d4d86ab94bd..fd1ee3111c1 100644 --- a/.agents/rules/code-review/lifecycle-and-isolation.md +++ b/.agents/rules/code-review/lifecycle-and-isolation.md @@ -32,3 +32,8 @@ - ✅ Store the response and wait result during setup, then assert and inspect the captured data in `test_*`. - ❌ Poll for traces in `test_*` after the containers have stopped, or assert expected trace contents from `setup_*`. - Ref: [End-to-end test flow](../../../docs/understand/test-flow.md#end-to-end-scenario), [Flushing default behavior](../../../docs/edit/flushing.md#default-behavior) + +### LIFE-005: Stop the session when scenario infrastructure fails. +- Severity: P0 +- Flag: A failed provisioning, warmup, or install step must stop the session with a clear error. A provisioning step must verify its result, for example with `docker info`. Do not store the error and run every test against a broken environment. +- Detect: A provisioning error handler stores an unknown error and continues the session. An install step exits 0 without checking that the installed tool works. From 8ad905e9c46e28bc455039e01001c1f68e10807a Mon Sep 17 00:00:00 2001 From: Roberto Montero <108007532+robertomonteromiguel@users.noreply.github.com> Date: Thu, 19 Nov 2026 08:25:56 +0100 Subject: [PATCH 5/5] Review learning: add TEST-008, its evidence comes from 2 or more PRs --- .agents/rules/code-review/test-effectiveness.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.agents/rules/code-review/test-effectiveness.md b/.agents/rules/code-review/test-effectiveness.md index 40cd4f1718d..7ae1eca99cd 100644 --- a/.agents/rules/code-review/test-effectiveness.md +++ b/.agents/rules/code-review/test-effectiveness.md @@ -59,3 +59,8 @@ - Not when: The test intentionally validates a deliberately broken response. - ✅ Return the real backend envelope under `data.attributes`, and derive the check from the real contract. - ❌ Return the flag config as the whole body and make the self-test expect that same body. + +### TEST-008: Assert every expectation of each case. +- Severity: P0 +- Flag: The test must assert every expectation that a case declares. Check each subject on its own. Do not sum counts across subjects. A new sibling test must use the shared assertion helper of its siblings. Compare booleans by type, because `1 == True` in Python. +- Detect: A test sums expected counts across subjects for a shared flag. A test skips the assertion helper that its siblings use. Imported fixtures hold expectations, such as `result.features`, that the runner never asserts. A bool check passes for the value `1`.