Skip to content

Review learning: rule changes from 2026-10-24 to 2026-11-22 - #8644

Closed
dd-apm-ecosystems[bot] wants to merge 4 commits into
mainfrom
review-learning/run-system-tests-2026-10-24-53f75d9d
Closed

dd-apm-ecosystems[bot] wants to merge 4 commits into
mainfrom
review-learning/run-system-tests-2026-10-24-53f75d9d

Conversation

@dd-apm-ecosystems

@dd-apm-ecosystems dd-apm-ecosystems Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Note

Monthly review learning. 10 changes to the code review rules, learned from the 348 PRs merged from 2026-10-24 to 2026-11-22.
Review them in Files changed, and answer on each rule: ok, discard, a suggestion, or a comment. Once a day, a workflow applies the answers and replies.

Merged PRs With human review Fixes linked to their cause Verified lessons Proposals Changes in this PR
348 270 15 38 34 10

🆕 New rules (5)

Rules that the review does not have yet. Open the last cell of a row for what it does, why, a bad and a good example, and the evidence.

RuleLensChangeEvidenceWhy, and examples
META-010 activation-and-metadata new rule: Gate each test at the versions and weblogs where it holds. #7844 · #8093 · #8457
Three PRs show manifest versions that enable a test beyond where its behavior holds: a class covered by a file-level floor, a legacy class kept active after ...

What it does: A manifest version must enable a test only where its expected behavior holds. If a file-level version also enables a class, check that the class works from that version. If the behavior changes between versions, give each class its own version range. If a version passes on one weblog only, do not lower it for every weblog.

Why is this bad? Three PRs show manifest versions that enable a test beyond where its behavior holds: a class covered by a file-level floor, a legacy class kept active after a key change, and a bound lowered for all weblogs. No existing rule covers version scope.

Example

  tests/parametric/test_extract_behavior.py::Test_ExtractBehavior_Restart_With_Extract_First: missing_feature (DD_TRACE_PROPAGATION_EXTRACT_FIRST=true is unsupported; dd-trace-go panics when extraction fails)
  tests/parametric/test_ffe/test_configuration_sources.py: v2.11.0-dev  # Easy win for all weblogs and version 2.10.1
  tests/parametric/test_ffe/test_dynamic_evaluation.py::Test_Feature_Flag_Dynamic_Evaluation: v2.5.0-dev
  tests/parametric/test_ffe/test_serial_id_metadata.py: v2.10.1
  tests/parametric/test_ffe/test_serial_id_metadata.py::Test_FFE_Serial_Id_Metadata: irrelevant (Go exposes serial IDs as dd.serialId)

Use instead

Gate the class at v2.11.0-dev when the file-level v2.10.0-dev covers a release without drop telemetry.

Evidence:

  • #7844 correction: "This activates the legacy dd.serialId class for every Go version from v2.10.1."
  • #8093 correction: "Gate this class at v2.11.0-dev for Go. The file-level v2.10.0-dev also enables it on v2.10.1, which reports no drop telemetry."
  • #8457 correction: "this PR moves them to v1.67.0 for every weblog, ALB included"
LIFE-005 lifecycle-and-isolation new rule: Count asynchronous data only after the flush ends. #8441 · #8352
Two PRs asserted exact counts of asynchronously flushed data.

What it does: Assert an exact count of flushed spans, events, or metrics only after the flush ends. A wait that returns at the expected count misses a late extra item. For scenario-wide data, count only the data of the requests of this test.

Why is this bad? Two PRs asserted exact counts of asynchronously flushed data. One wait returned at the expected count and missed late items. One count covered the whole scenario and raced the flush before teardown. No rule covers this.

Example

    )


def _evaluations(test_agent: TestAgentAPI, mcp_servers: list[dict] | None) -> tuple[list[dict], dict]:
    """Assert exactly the prompt and the response evaluations happened and matched their cassettes, and
    that only the response evaluation reports mcp_servers. Returns every ai_guard span and the response one.
    """
    spans = wait_for_ai_guard_spans(test_agent, 2)

Use instead

Wait for the flush window. Then count only the items of the requests of this test.

Evidence:

  • #8441 correction: "This returns as soon as 2 spans show up, so a third evaluation landing in a later flush wouldn't be caught."
  • #8352 correction: "so it depends on every metric point being flushed before teardown"
LIFE-006 lifecycle-and-isolation new rule: Accept every outcome that a time window can produce. #8519 · #8371
Two PRs show assertions that held only inside one wall-clock window: a 10s stats bucket and an API Security sampling window.

What it does: An assertion on a result that depends on a wall-clock window must accept each valid outcome. Stats buckets and sampling windows are such windows. Do not hide this with a flaky manifest entry.

Why is this bad? Two PRs show assertions that held only inside one wall-clock window: a 10s stats bucket and an API Security sampling window. Both were hidden as flakiness. The fix was to accept every valid timing outcome.

Example

        requests = test_agent.get_v06_stats_requests()
        assert len(requests) >= 1, "At least one stats request"
        cnt = 0
        for req in requests:
            request = req["body"]
            buckets = request["Stats"]
            assert len(buckets) == 1, "There should be one bucket containing the stats"

Use instead

        assert len(test_agent.get_v06_stats_requests()) >= 1, "At least one stats request"
        stats = _merged_v06_stats(test_agent)
        for s in stats:
            assert s["Hits"] == 1
            assert s["TopLevelHits"] == 1
            assert s["Duration"] > 0

        assert len(stats) == 7, (

Evidence:

TEST-009 test-effectiveness new rule: Do not let an error pass as a valid result. #8182 · #8578 · #8474 · #8128
Several reviews found apps or tests that turned errors into valid-looking results, so assertions could not fail.

What it does: The test and its app must report an unexpected failure as a failure. Do not catch every exception and return success. Do not treat a failed command like an empty result. Do not coerce malformed input into a default value. If the app drops data that the test path needs, the test must fail.

Why is this bad? Several reviews found apps or tests that turned errors into valid-looking results, so assertions could not fail. INFRA-011 covers only shell errors that select the tested artifact.

Example

      Constructor<?> ctor = cls.getDeclaredConstructors()[0];
      ctor.setAccessible(true);
      Object instance = ctor.newInstance(new File("/tmp"));
      Class<?> fileHeaderClass = Class.forName("com.github.junrar.rarfile.FileHeader");
      Method method = cls.getDeclaredMethod("createDirectory", fileHeaderClass);
      method.setAccessible(true);
      method.invoke(instance, (Object) null);
    } catch (Exception ignored) {}

Use instead

Catch only the expected InvocationTargetException, and return HTTP 500 for other failures.

Evidence:

  • #8182 correction: "both endpoints swallow every exception and always return"
  • #8578 correction: "if rc: treats exec failures like pgrep no-match, so real holders can vanish from holders."
  • #8474 correction: "This decoder instead discards conversion errors."
  • #8128 correction: "the Set-Cookie from /session/new never reaches the client"
TEST-010 test-effectiveness new rule: Assert every expectation that the shared cases define. #8139 · #8093
Tests ignored expectations that the shared fixtures or helpers define, so some fields were never asserted.

What it does: A test must check every expected field that a shared fixture or a shared assertion helper defines. Do not skip the helper that sibling tests use.

Why is this bad? Tests ignored expectations that the shared fixtures or helpers define, so some fields were never asserted. No rule names this.

Example

            if "errorCode" in expected_result:
                assert result.get("errorCode") == expected_result["errorCode"], (
                    f"Test case {i} in {test_case_file}: expected errorCode={expected_result['errorCode']}, result={result}"
                )
            elif expected_result["reason"] != "ERROR":
                assert result.get("errorCode") in {None, ""}, (
                    f"Test case {i} in {test_case_file}: unexpected evaluation error; result={result}"
                )

Use instead

Route the test through _assert_context_evaluation, as its siblings do.

Evidence:

  • #8139 correction: "The imported split-feature cases include result.features expectations for hook, exposure, and evaluation metadata"
  • #8093 correction: "Route this test through _assert_context_evaluation, as its two siblings do."

🔧 Existing rules, tuned (5)

Rules that exist, with a new case, a new exception, or better words. The Change column says which. Open the last cell of a row for the details.

RuleLensChangeEvidenceWhy, and examples
META-006 activation-and-metadata sharpen Detect · new case #8352 · #8457
META-006 already requires reasons that state the real cause.

What it does: 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. A declaration has no reason. A declaration covers a whole file while some of its classes pass, so passing tests stop running.

Why is this bad? META-006 already requires reasons that state the real cause. Its Detect line does not catch declarations that have no reason, or file-wide declarations that hide passing classes.

Example

        alb-multi: irrelevant (function-url event type does not support path params)
        function-url: irrelevant (function-url event type does not support path params)
  tests/appsec/test_conf.py::Test_ConfigurationVariables_New_Obfuscation: v8.113.0
  tests/appsec/test_event_tracking.py: incomplete_test_app (Event-tracking endpoints not implemented)

Evidence:

  • #8352 correction: "Would you consider declaring these per class with the real cause, or letting the ones that pass run?"
  • #8457 correction: "These new missing_feature entries have no reason."
INFRA-011 infrastructure-and-conventions sharpen Detect · new case #8071 · #8441
The rule covers hidden failures that change what is tested.

What it does: The script discards stderr (2>/dev/null, &>/dev/null) or ignores a failure (|| true) on a command. The script counts, parses, or tests the output of that command, so an error looks like an empty result. A pipeline drops the failure of its first command because pipefail is off, as in cmd 2>/dev/null | wc -l or cmd | jq. A failed check goes silently to a fallback branch. A command runs under if ! with its stderr discarded, so the failure message loses the cause. An agent setup step such as Restart-Service fails and the script continues, or an install silently checks a file path instead of an import.

Why is this bad? The rule covers hidden failures that change what is tested. Its Detect line lists only shell redirections, so it misses a provisioning script that keeps going after a failed agent restart. It also misses a file-path check that silently skips a dependency install.

Example

          throw "Service '$service' not found, can't point it to the mocked backend"
        }
        $existingEnv = (Get-ItemProperty -Path $serviceKey -Name Environment -ErrorAction SilentlyContinue).Environment
        $serviceEnv = @​($existingEnv | Where-Object { $_ -and $_ -notmatch '^DD_(DD_URL|APM_DD_URL|APM_PROFILING_DD_URL)=' }) + $backendEnv
        New-ItemProperty -Path $serviceKey -Name Environment -PropertyType MultiString -Value $serviceEnv -Force | Out-Null
      }
      # -Force stops the dependent services (trace agent...), they may not be started again with the core agent
      Restart-Service -Name datadogagent -Force

Evidence:

  • #8071 correction: "Restart-Service -Name datadogagent -Force fails with Cannot stop datadogagent service, but the script continues."
  • #8441 correction: "Checking for the mcp.py file feels a bit fragile: if anthropic turns it into a package, mcp silently isn't installed and the tests just get 501s."
LIFE-002 lifecycle-and-isolation sharpen Detect · new case #8323 · #8093 · #7464
Three waits were bounded in name only.

What it does: A setup or test uses a fixed sleep, polls without a deadline, or increases an arbitrary delay instead of waiting for an observable condition. A call inside a deadline loop has no timeout of its own, so it can block past the deadline. A flush timeout or wait budget is shorter than the flush interval of the library, or than other waits for the same event.

Why is this bad? Three waits were bounded in name only. In one, HTTP client calls had no timeout inside a retry loop. In another, library_interface_timeout was shorter than the Go flush period, so the last counters were lost. In the third, the app-started wait budget was tighter than the sibling waits.

Example

        }
    return {"createdAt": "2026-11-03T00:00:00Z", "format": "SERVER", "environment": {"name": "test"}, "flags": flags}


def _assert_value(test_library: APMLibrary, flag: str, value: str) -> None:
    deadline = time.monotonic() + 5
    while True:
        result = test_library.ffe_evaluate(

Evidence:

  • #8323 correction: "sends /ffe/evaluate without an HTTP timeout"
  • #8093 correction: "Set library_interface_timeout=15 here. Go already waits 10 s, and that wait can end before its counters arrive."
  • #7464 correction: "Worth bumping the budget or aligning it with wait_for_telemetry_configurations's loop/sleep values for consistency?"
TEST-001 test-effectiveness sharpen Flag · new case #8399 · #8371
A mock rejected a valid query because of an extra capability parameter.

What it does: When checking one protocol flag, mask that bit and accept other bits the protocol allows, unless the whole field is under test. When checking one member of a list field, such as a tracestate vendor or an x-datadog-tags entry, find that member. Do not require a count or an order that the protocol does not define. When checking for redaction leaks, use a distinctive marker or the relevant parsed field so unrelated payload values cannot count as leaked input. A mock server must accept a request with an extra parameter that the real service accepts. If timing selects between two valid outcomes, accept each outcome under the condition that selects it.

Why is this bad? A mock rejected a valid query because of an extra capability parameter. An assertion rejected a valid timing-dependent outcome, and a flaky marker hid it. Both reject valid data.

Example

def test_mock_ffe_agentless_backend_serves_fixture_and_tracks_metadata() -> None:
        for invalid_query in ("", "?dd_env=", "?dd_env=wrong", f"?dd_env={EXPECTED_DD_ENV}&dd_env=wrong"):
            f"{server.base_url}{CONFIG_PATH}?{CONFIG_QUERY}",

Use instead

@​pytest.mark.parametrize("capability_query", ["", "&cap_dependent-flags-variant-key=v1"])
def test_mock_ffe_agentless_backend_serves_fixture_and_tracks_metadata(capability_query: str) -> None:
        for invalid_query in (
            "",
            "?dd_env=",
            "?dd_env=wrong",
            f"?dd_env={EXPECTED_DD_ENV}&dd_env=wrong",
            "?cap_dependent-flags-variant-key=v1",

Evidence:

TEST-001 test-effectiveness sharpen Detect · new case #8519 · #8441
The Flag already forbids counts that the protocol does not define and raw-string comparisons.

What it does: A sampled-bit assertion requires exact flags 01. A test requires len(tracestate) == 1 or compares x-datadog-tags as a raw string. A redaction check searches an entire payload for a short marker such as 1234. A test requires one stats bucket, although the tracer buckets stats by wall-clock time. A test compares serialized JSON strings instead of parsed values.

Why is this bad? The Flag already forbids counts that the protocol does not define and raw-string comparisons. The Detect line missed stats buckets and serializer-dependent JSON strings.

Example

        requests = test_agent.get_v06_stats_requests()
        assert len(requests) >= 1, "At least one stats request"
        cnt = 0
        for req in requests:
            request = req["body"]
            buckets = request["Stats"]
            assert len(buckets) == 1, "There should be one bucket containing the stats"

Use instead

        assert len(test_agent.get_v06_stats_requests()) >= 1, "At least one stats request"
        stats = _merged_v06_stats(test_agent)
        for s in stats:
            assert s["Hits"] == 1
            assert s["TopLevelHits"] == 1
            assert s["Duration"] > 0

        assert len(stats) == 7, (

Evidence:

  • #8519 miss (culprit #5543)
  • #8441 correction: "json.dumps bakes in Python's ", "/": " separators."
11 more changes with evidence from one PR only. They stay out of the diff. Comment add <ID> to apply one.
Rule Lens Change Why Evidence
META-007 activation-and-metadata sharpen Detect A -pre version gate cannot tell an unreleased tracer change from master. #8306
INFRA-007 infrastructure-and-conventions sharpen Detect The rule already asks for a retry on brittle network commands. #8202
INFRA-005 infrastructure-and-conventions sharpen Detect The upload had !cancelled() but was also tied to the outcome of the weblog build step. #8313
INFRA-008 infrastructure-and-conventions sharpen Flag The rule only covers transitive packages that the app uses directly. #8441
INFRA-013 infrastructure-and-conventions new rule: Load companion artifacts from the same development source. No rule says that a development download must also bring its paired artifacts. #8188
INFRA-014 infrastructure-and-conventions new rule: Put backend responses in the shared mocked backend. No rule covers where to define mocked backend responses. #8266
INFRA-015 infrastructure-and-conventions new rule: Check downstream pipelines when shared CI changes. A change to the shared GitLab CI broke the dd-trace-php pipeline and was reverted. #8548
LIFE-003 lifecycle-and-isolation sharpen Flag A parametric test restarted the app and read configuration telemetry that the test agent still held from the old process. #7464
TEST-008 test-effectiveness new rule: Limit a relaxed assertion to the case that needs it. Reviewers asked to keep the strict check for non-V1 payloads and the run-wide V1 guarantee for other tracers. #7843
TEST-005 test-effectiveness sharpen Detect A debugger helper tolerated a missing root timestamp only for .NET. #7876
TEST-007 test-effectiveness sharpen Detect No blocking check compared the mock with the shared suite cases, because the parametric test never ran. #8304

META-007 · sharpen Detect · activation-and-metadata

A -pre version gate cannot tell an unreleased tracer change from master. The reviewer asked to disable the test in the manifest and then re-enable it at the release version.

Current:

A manifest declares a minimum dev version, and an RC of that version predates the change.

Proposed:

A manifest declares a minimum dev version, and an RC of that version predates the change. A test compares context.library with a -pre version to gate unreleased behavior instead of a manifest declaration.

Evidence:

  • #8306 correction: "first disable the affected test, then once the fix is released"

INFRA-007 · sharpen Detect · infrastructure-and-conventions

The rule already asks for a retry on brittle network commands. Its Detect line names only registry pulls, so it misses a base-image build script that curls a tarball with no retry.

Current:

A CI step pulls or installs from a registry on every run, and a base image already has those files. The pull skips a mirror that exists. The remaining registry command has no retry.

Proposed:

A CI step pulls or installs from a registry on every run, and a base image already has those files. The pull skips a mirror that exists. The remaining registry command has no retry. A build script downloads a remote file with curl or wget and has no retry option, such as --retry.

Evidence:

  • #8202 correction: "can you add a retry policy ?"

INFRA-005 · sharpen Detect · infrastructure-and-conventions

The upload had !cancelled() but was also tied to the outcome of the weblog build step. PARAMETRIC runs do not build a weblog, so they saved no logs. The current Detect line does not catch this.

Current:

A required upload, tag, or cleanup has no if, or it uses if: always(). In one set -e script it follows a command that can fail, and no trap runs it.

Proposed:

A required upload, tag, or cleanup has no if, or it uses if: always(). In one set -e script it follows a command that can fail, and no trap runs it. The if also depends on an earlier step, and runs that skip or fail that step save no logs.

Evidence:

  • #8313 correction: "with parametric, you won't have any logs saved"

INFRA-008 · sharpen Flag · infrastructure-and-conventions

The rule only covers transitive packages that the app uses directly. The unpinned dependencies of mcp are not used directly, but they can change the request bodies that VCR cassettes replay.

Current:

A weblog or test-app image must install the dependencies it does not test from a committed lockfile or from exact pins. This also applies to transitive packages that the app uses directly. When the dependency inputs are unchanged, the build must not resolve new versions. A PR that adds or updates a dependency resolves it and commits the updated lock.

Proposed:

A weblog or test-app image must install the dependencies it does not test from a committed lockfile or from exact pins. This also applies to transitive packages that the app uses directly. When the dependency inputs are unchanged, the build must not resolve new versions. A PR that adds or updates a dependency resolves it and commits the updated lock. If recorded cassettes depend on exact request bodies, the image must lock every transitive package too.

Evidence:

  • #8441 correction: "mcp's own deps (sse-starlette, pydantic-settings, httpx-sse, ...) aren't pinned, so a rebuild could resolve differently from what the cassettes were recorded with."

INFRA-013 · new rule: Load companion artifacts from the same development source. · infrastructure-and-conventions

No rule says that a development download must also bring its paired artifacts. INFRA-011 covers hidden errors, not a companion download that is missing.

Proposed:

INFRA-013: Load companion artifacts from the same development source.

  • Severity: P0
  • Flag: utils/scripts/load-binary.sh can download a development build of a library. Then it must also download the companion artifacts from the same branch. A companion artifact is one that the weblog pairs with the library. An example is dd-openfeature.jar for dd-java-agent.jar. Without it, the weblog build falls back to the latest release. When a download fails, the loader must stop with an error.
  • Detect: A change to load-binary.sh adds or changes a development download for one artifact. A paired artifact still comes from a release.
  • ✅ Download dd-java-agent.jar and dd-openfeature.jar from the same development branch.
  • ❌ Download only dd-java-agent.jar, so the build uses the latest released provider from Maven Central.

Proposed severity: P0. A development agent paired with a released provider is an unsupported combination, so tests can pass or fail for the wrong reason.

Evidence:

INFRA-014 · new rule: Put backend responses in the shared mocked backend. · infrastructure-and-conventions

No rule covers where to define mocked backend responses. A member asked for the response to be in the shared mock, and the author applied the change.

Proposed:

INFRA-014: Put backend responses in the shared mocked backend.

  • Severity: P1
  • Flag: A test can need a response from an official backend endpoint. Add that response to the shared mocked backend under utils/mocked_backend/. Do not override that endpoint with a handler inside the test.
  • Detect: A test calls mocked_backend.add_handler for an official backend path and builds the response itself.
  • ✅ Add the response to utils/mocked_backend/_backend_ffe.py. Use ffe_set_response() and ffe_get_requests() in the test.
  • ❌ Call mocked_backend.add_handler("GET", f"{RULES_CONFIG_PATH}/{channel}", handle_rules) inside the test.

Proposed severity: P1. This is a convention about where shared mock behavior lives, and it does not hide a failure by itself.

Evidence:

  • #8266 correction: "can you add it directly in the mocked backend, rather dynamically in a test"

INFRA-015 · new rule: Check downstream pipelines when shared CI changes. · infrastructure-and-conventions

A change to the shared GitLab CI broke the dd-trace-php pipeline and was reverted. No rule covers downstream consumers of the shared CI.

Proposed:

INFRA-015: Check downstream pipelines when shared CI changes.

  • Severity: P1
  • Flag: Other repositories, such as dd-trace-php, consume the GitLab CI configuration of this repository. If a pull request changes .gitlab-ci.yml or utils/ci/gitlab/, it must check a downstream pipeline before merge.
  • Detect: The diff changes an include condition, a job, or the image logic in .gitlab-ci.yml or utils/ci/gitlab/build_ci_image.py. The pull request shows no downstream pipeline run.
  • ❌ Add a scheduled job and a new CI image to .gitlab-ci.yml, and merge without a downstream run.

Proposed severity: P1. The breakage hits other repositories' pipelines and is reverted, but it does not hide a test failure in this repository.

Evidence:

LIFE-003 · sharpen Flag · lifecycle-and-isolation

A parametric test restarted the app and read configuration telemetry that the test agent still held from the old process. LIFE-003 matches data by request id and config version, but it does not cover runtime ids after a restart.

Current:

Match the trace, event, or acknowledgement to this request by its request id, or to this Remote Config change by its config version. Do not use one from an earlier request or an earlier config. Start watching before that request or config change, or a fast result is missed. If later code needs the new Remote Config, wait until the tracer is using it. "Received" only means the message arrived, and a test that only checks that arrival may stop there.

Proposed:

Match the trace, event, or acknowledgement to this request by its request id, or to this Remote Config change by its config version. Do not use one from an earlier request or an earlier config. Start watching before that request or config change, or a fast result is missed. If later code needs the new Remote Config, wait until the tracer is using it. "Received" only means the message arrived, and a test that only checks that arrival may stop there. If the test restarts the app, match telemetry to the runtime id of the new process, not the old one.

Evidence:

TEST-008 · new rule: Limit a relaxed assertion to the case that needs it. · test-effectiveness

Reviewers asked to keep the strict check for non-V1 payloads and the run-wide V1 guarantee for other tracers. No rule names this defect.

Proposed:

TEST-008: Limit a relaxed assertion to the case that needs it.

  • Severity: P0
  • Flag: Apply a weaker check only to the payload format or request that needs it. Keep the strict check for every other case. Do not narrow a run-wide check to one request for every tracer.
  • Detect: A change relaxes an assertion for every payload format, although only one format needs it. A run-wide check now inspects only one request.
  • ✅ Relax the first-span check only for V1 payloads, and keep it for the other formats.
  • ❌ Accept git tags on every span for every payload format, because V1 sets them at the payload level.

Proposed severity: P0. A relaxation that applies to every case removes coverage for the cases that still need the strict check.

Evidence:

  • #7843 correction: "Doesn't this change also apply to non-v1 tests? Shouldn't we still be validating the git tags are only on the first span for them?"
  • #7843 correction: "Scoping this to GET / makes sense for PHP's pre-/info healthcheck, but it also drops the run-wide guarantee for every other tracer that runs Test_V1PayloadByDefault in DEFAULT."

TEST-005 · sharpen Detect · test-effectiveness

A debugger helper tolerated a missing root timestamp only for .NET. The reviewer asked to align .NET with the shared contract. This is a library-specific branch in an assertion helper without a context.library check.

Current:

A condition on context.library changes an assertion in a test_* method or in a helper used only by assertions.

Proposed:

A condition on context.library changes an assertion in a test_* method or in a helper used only by assertions. A helper accepts a fallback payload shape that only one library produces, instead of requiring the shared contract.

Evidence:

  • #7876 correction: "If .NET is the only SDK not adding a timestamp at the root of the payload, why don't we align .NET with the other SDKs so we include that timestamp there as well?"

TEST-007 · sharpen Detect · test-effectiveness

No blocking check compared the mock with the shared suite cases, because the parametric test never ran. The reviewer asked for a test-the-test check.

Current:

The self-test imports every expected value from the fake. The fake returns a bare body where the real service uses an envelope. The fake sends config for a product the client did not ask for.

Proposed:

The self-test imports every expected value from the fake. The fake returns a bare body where the real service uses an envelope. The fake sends config for a product the client did not ask for. The only test that compares the fake with the shared case files is xfail or skipped for every SDK.

Evidence:

  • #8304 correction: "Add a test-the-test check that each suite case file agrees with the mock."
5 defects that a rule already describes
  • META-006 · activation-and-metadata: META-006 already requires incomplete_test_app instead of missing_feature when the weblog does not serve the endpoint. #8525
  • META-006 · activation-and-metadata: A flaky marker that hides a wrong assertion is a marker that contradicts its cause, which META-006 flags. #8371
  • INFRA-011 · infrastructure-and-conventions: INFRA-011 already describes this case: a find with stderr discarded and piped to wc -l, then a fallback to the latest release. #8572
  • TEST-002 · test-effectiveness: TEST-002 already requires a positive control for absence tests and names skip.yml entries as a signal. #8144 · #8398
  • TEST-005 · test-effectiveness: The assertion changes on a context.library version check, which TEST-005 flags. #8306
How to answer, and run details

How to answer each change

  • Nothing, ok, LGTM or a thumbs up: keep the change.
  • discard or discard: <reason>: put the rule back as it is on main. Outside a review thread, name the rule: discard LIFE-005.
  • A suggestion block: replace those lines.
  • add <ID>: apply a folded change, for example one with evidence from one PR only.
  • Any other comment on a rule: an agent edits that rule as you ask.
  • A change goes into the diff when its evidence comes from 2 or more distinct PRs. Each change must also pass the evidence thresholds and lint.
  • If the reason of a discard holds for the future, write it in the rule, for example as Not when:. The next runs read the rules.

This PR only edits .agents/rules/code-review/. It never merges by itself: a person from system-tests-core approves it. The next monthly run publishes nothing while it is open.

Coverage: test-effectiveness 12 · lifecycle-and-isolation 4 · activation-and-metadata 7 · infrastructure-and-conventions 11. 54 candidates went to another lens. 2 candidates had a quote that does not match.

Run: the workflow run in Datadog.

@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

.agents/rules/code-review/activation-and-metadata.md                    @DataDog/system-tests-core
.agents/rules/code-review/infrastructure-and-conventions.md             @DataDog/system-tests-core
.agents/rules/code-review/lifecycle-and-isolation.md                    @DataDog/system-tests-core
.agents/rules/code-review/test-effectiveness.md                         @DataDog/system-tests-core

@robertomonteromiguel
robertomonteromiguel deleted the review-learning/run-system-tests-2026-10-24-53f75d9d branch November 23, 2026 14:04
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