Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .agents/rules/code-review/activation-and-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 first release that has its behavior.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Kept: no change.

The review learning workflow answers once a day. It does not read this reply.

- Severity: P0
- Flag: A version declaration must match the first release that contains the behavior each test asserts. If a method asserts behavior newer than its class, declare that method separately. If the SDK changes the behavior in a later release, bound the old test with a range. If a change ships on several release lines or as a backport, cover each line.
- Detect: A new test method asserts behavior newer than its class declaration and has no method entry. A class for legacy behavior has only a minimum version and stays active after the SDK changed. A gate targets the next dev version, but a patch release or another release line already ships the change. Version ranges in `tests/parametric/capabilities.yml` follow the same rule.
5 changes: 5 additions & 0 deletions .agents/rules/code-review/infrastructure-and-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@
- ✅ Look up files with a bash glob (`shopt -s nullglob`), or let `set -euo pipefail` stop the script. If a fallback is intended, print why it runs.
- ❌ `count=$(find /binaries/ -name "dd-java-agent*.jar" 2>/dev/null | wc -l)`, then download the latest release when `count` is 0.
- Ref: [Code format standards](../code-format-standards.md)

### INFRA-013: Mount the GitHub token in every build that calls the GitHub API.
- Severity: P1
- Flag: Every Dockerfile that runs a GitHub API call must mount the `github_token` secret that the build passes. Install scripts must use the shared `get_latest_release` helper, not a raw `curl` or `wget` call. A secret that is passed but not mounted is silently absent. Then rate limits break the build.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

redefine the prompt

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Not applied: The comment asks to redefine the prompt and does not say how to change INFRA-013, so I cannot make an edit from it.

The review learning workflow answers once a day. It does not read this reply.

- Detect: A Dockerfile runs an install script that calls the GitHub API, and its `RUN` step has no `--mount=type=secret,id=github_token`. A script calls the GitHub releases API without a token or without `--fail`.
9 changes: 7 additions & 2 deletions .agents/rules/code-review/test-effectiveness.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- Old_id: claude-13
- Severity: P0
- Flag: A test of behavior that does not depend on the trace encoding must give the same result for v0.4, v0.5, and v1.0 payloads. Compare trace IDs with `trace_id_equals()`, read the sampling priority with `get_sampling_priority()`, and filter intake requests with `interfaces.library.trace_paths`. Use `is_same_boolean()` only when the contract accepts `True`, `1`, and `"true"` as the same value. A test of the wire format itself must check the exact fields and types of its encoding.
- Detect: A test that is not about the encoding compares raw fields, as in `span["trace_id"] == expected` or `meta[key] == "true"`. A test reads a sampling priority field directly. A path filter lists only `/v0.4/traces` or `/v0.5/traces`.
- Detect: A test that is not about the encoding compares raw fields, as in `span["trace_id"] == expected` or `meta[key] == "true"`. A test reads a sampling priority field directly. A path filter or a mocked response lists only `/v0.4/traces` or `/v0.5/traces` and omits `/v1.0/traces`.
- Not when: The test is explicitly validating the wire format itself.
- ✅ `assert span.trace_id_equals(int(expected_id))`.
- ❌ `assert span["trace_id"] == int(expected_id)`.
Expand All @@ -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 reports a default value for a setting the SDK does not support, instead of None. It catches every exception and returns OK, so a status-code check always passes. It drives the SDK differently from a real app, so the path under test never runs.
- ✅ 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.

Expand All @@ -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: Check the type when the contract defines it.
- Severity: P0
- Flag: Check the type as well as the value. This applies to a boolean or a number in the contract. In Python, `1 == True` and `1.0 == True` are both true. The contract can accept `True`, `1`, and `"true"` as one value. Then use `is_same_boolean()`.
- Detect: An assertion compares a boolean or a number with `==` and has no type check. A coerced value then passes.
Loading