Skip to content

Use P0-P3 severity levels in perf-review (AI perf review) - #13375

Open
dougqh wants to merge 4 commits into
masterfrom
dougqh/perf-review-p-scale
Open

dougqh wants to merge 4 commits into
masterfrom
dougqh/perf-review-p-scale

Conversation

@dougqh

@dougqh dougqh commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #13373 ("Split the perf-review rubric into posture, hotness, checks and remedies"). Merge that first.

What does this PR do?

Switches perf-review from its own SEV-1–3 scale to the P0–P3 scale that /sdk-review uses (#13216, "Add /sdk-review lens-based review skill"). Findings from both skills then rank the same way. It also removes a naming clash: "SEV-n" reads like incident severity, which is a different scale.

Changes

  • posture.md states the four levels in /sdk-review's exact wording and maps the usual causes to them.
  • Single levels map directly: SEV-1 → P1, SEV-2 → P2, SEV-3 → P3.
  • Ranges become one base level plus a stated condition, instead of "SEV-2/3":
    • SEV-2/3 → base P3
    • SEV-1/2 → base P2, or P1 if it blocks, pins a carrier thread, or is unbounded
  • One rule in posture.md replaces the per-check ranges: raise P3 to P2 when the cost lands on the tracer's own per-span core (span create / setTag / finish, tag-map ops, propagation, serialization), which every integration pays. The raise never reaches P1; P1 comes only from a check's own escalations (unbounded, blocking, pinning).
  • The output format and the worked example use P-levels.

Decisions to review

  • Performance findings top out at P1, and P0 is not used for them. /sdk-review defines P0 as "catastrophic or actively exploitable; stop publication." An argument could be made for P0 on a guaranteed OOM on a default-on path.
  • The raise rule is new wording, not a direct translation. It is where most of the old SEV-2/3 judgment now lives.

How was this checked?

I spot-checked 8 rows of the cross-check corpus with blind reviewers, as in #13373. The rows cover:

  • the P1 memory and cardinality rows;
  • a recall seed on the propagation path;
  • the two rows where the old answer key was stale;
  • two false-positive traps.

All 8 gave the same verdicts as #13373. The levels came out as expected:

  • unbounded memory and cardinality: P1;
  • work done while a product is off (J14) on a messaging path: P2;
  • per-trace format and regex work on the propagation path, and per-activation work on the scope path: base P3 raised to P2 by the per-span-core rule;
  • integration-level allocations: P3.

On one row the reviewer softened an unweighed cache-key finding from a firm flag to "verify with a benchmark" at P3. That is closer to the reconciled answer key.

🤖 Generated with Claude Code

@dougqh dougqh added tag: no release notes Changes to exclude from release notes type: refactoring comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM labels Nov 11, 2026
@datadog-prod-us1-4

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

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 60.60% (-0.03%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0852d55 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.09 s 13.96 s [+0.2%; +1.7%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.89 s 12.93 s [-0.9%; +0.4%] (no difference)
startup:petclinic:appsec:Agent 17.10 s 17.05 s [-0.5%; +1.1%] (no difference)
startup:petclinic:iast:Agent 16.94 s 17.16 s [-2.2%; -0.4%] (maybe better)
startup:petclinic:profiling:Agent 16.09 s 16.94 s [-9.1%; -1.0%] (maybe better)
startup:petclinic:sca:Agent 17.11 s 17.02 s [-0.2%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.06 s 16.34 s [-2.5%; -0.9%] (maybe better)

Commit: 0852d55b · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@dougqh
dougqh marked this pull request as ready for review November 11, 2026 19:18
@dougqh
dougqh requested a review from a team as a code owner November 11, 2026 19:18
@dougqh
dougqh requested review from jbachorik and removed request for a team November 11, 2026 19:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 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-11T19:20:20.306609Z 783fbe0 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.

@dougqh dougqh changed the title Use the P0–P3 severity scale in perf-review Use the P0–P3 severity scale in perf-review (AI perf review) Nov 11, 2026

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Bits Code Review: PASS

More details

The core-path escalation rule is bounded by the explicit P1 ceiling, keeping unbounded memory and cardinality risks at the highest permitted performance priority. No actionable inconsistencies were identified in the severity mappings or examples.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 783fbe0

Base automatically changed from dougqh/perf-review-split to master November 18, 2026 14:36
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot requested a review from a team as a code owner November 18, 2026 14:36

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Bits Code Review: PASS

More details

The severity mappings follow the stated P1 ceiling and per-span-core escalation policy, and the reorganized rubric references resolve. The Java source change only updates a Javadoc reference.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 783fbe0

Switch perf-review from SEV-1..3 to the P0-P3 scale that /sdk-review uses,
so findings from both skills rank the same way. "SEV-n" also read like
incident severity, which uses a different scale.

- posture.md states the four levels in /sdk-review's wording, maps the usual
  causes to them, and says performance findings top out at P1.
- Single levels map directly: SEV-1 -> P1, SEV-2 -> P2, SEV-3 -> P3.
- Ranges become one base level plus a stated condition: SEV-2/3 -> P3,
  SEV-1/2 -> P2 (P1 if it blocks, pins or is unbounded).
- One rule replaces the ranges: raise one level when the cost lands on the
  tracer's own per-span core (span create/setTag/finish, tag map,
  propagation, serialization).
- The output format and the worked example use P-levels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dougqh
dougqh force-pushed the dougqh/perf-review-p-scale branch from 783fbe0 to e4c917f Compare November 18, 2026 17:41

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Bits Code Review: PASS

More details

Unbounded-memory findings retain P1 priority, while the escalation rule distinguishes shared per-span overhead from integration-local costs. Behavioral evaluations of the review skill were not rerun.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit e4c917f

Raises don't stack, and the core raise applies only to costs paid per span or
per trace, so a one-time cost in core code isn't raised. The propagation bump
becomes an instance of that raise rather than a second one. Allocation's
tail-latency row now matches allocation.md (base P3, P2 on the core, P1 when
unbounded), and critical-path checks share the table's P1 conditions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Bits Code Review: FAIL

The PR aligns perf-review with sdk-review’s P0–P3 scale, capping performance findings at P1. This update removes duplicate propagation raises, excludes one-time costs, and aligns allocation and critical-path guidance. One P2 issue remains: the blanket one-level cap contradicts explicit P1 overrides for unbounded allocation. A localized suggestion preserves those overrides. Behavioral evaluations were not rerun.

Open Bits AI session

🤖 Bits Code Review · Commit 97252c1

@dougqh
dougqh requested a review from PerfectSlayer November 19, 2026 18:37

@bric3 bric3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The severity rules give conflicting instructions for unbounded allocation.

The allocation check starts at P3 and assigns P1 when allocation is unbounded. The new one-level cap would stop that at P2. Could we apply the cap only to the extra raise for work done per span or per trace on the tracer's core path? That keeps the P1 rule for unbounded allocation intact.

Also I think the PR title should be: Use P0-P3 severity levels in perf-review

The one-level cap applied to every raise, so it also stopped a check's own
rule such as allocation's P1 when unbounded. Cap only the core raise, which
counts once however many core reasons apply; a check's own escalation
applies as written, and findings still top out at P1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dougqh dougqh changed the title Use the P0–P3 severity scale in perf-review (AI perf review) Use P0-P3 severity levels in perf-review (AI perf review) Nov 20, 2026
@dougqh

dougqh commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @bric3, good catch: my "raises don't stack" wording capped every raise, including a check's own escalations. Fixed in 7e9deaf. The cap now applies only to the core raise: it's one level, however many core reasons apply (propagation and serialization still count once). A check's own escalation, such as allocation's P1 when unbounded, applies as written, and findings still top out at P1. I've also retitled the PR as you suggested.

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Bits Code Review: PASS

More details

The PR aligns perf-review with sdk-review’s P0–P3 scale while capping performance findings at P1. Earlier updates clarified propagation, one-time costs, and allocation levels. The latest change resolves the reported conflict: only core raises are limited, preserving explicit P1 overrides for unbounded allocation. No findings remain open. Behavioral evaluations were not rerun.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 7e9deaf

@PerfectSlayer PerfectSlayer left a comment

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.

Next round of comments

The core raise now lifts P3 to P2 only. P1 comes from a check's own
escalations (unbounded, blocking, pinning), so core-path latency
findings don't rank with OOM risks. The aggressive-flagging rule names
its mechanism, unbounded memory and cardinality, rather than the P1
level. Also fixes J8's base level in repeat-work.md, "top severity" in
memory.md, and sdk-review's note on carrying perf-review's levels over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants