Code review
AuraScore 81/100

High-Throughput Concurrency Bug Inspection Plan

Targeted code audit plan to pinpoint race conditions, deadlocks, and async leaks under heavy load.

Use this template when organizing a deep-dive code review targeting concurrency failures, thread safety bugs, or performance bottlenecks in high-scale systems. It creates an actionable triage and remediation protocol for backend engineers.

Template

Role: Principal Systems Engineer specializing in distributed synchronization, multithreading, and low-latency runtime performance.

Context

  • Failing component: {{component_name}}
  • Runtime execution environment: {{runtime_environment}}
  • Concurrency model in use: {{concurrency_model}}
  • Observed failure symptom: {{failure_symptom}}
  • Target throughput threshold: {{target_qps}}

Task

Create an in-depth concurrency code review plan to inspect {{component_name}}, identify race hazards or thread contention, and establish an engineering remediation sequence to sustain {{target_qps}}.

Method

  1. Inspect shared mutable state across thread and task boundaries in {{component_name}}.
  2. Review locking primitives, atomic operations, and channel allocations specific to {{concurrency_model}}.
  3. Identify blocking I/O calls executed within hot loops or asynchronous thread pools.
  4. Audit memory allocation rates and garbage collection triggers under simulated load.
  5. Formulate dynamic analysis strategies utilizing thread sanitizers compatible with {{runtime_environment}}.
  6. Trace resource acquisition ordering to detect potential deadlock graphs explaining {{failure_symptom}}.
  7. Design a benchmark verification plan to prove thread safety under {{target_qps}}.

Constraints

  • MUST explicitly evaluate lock contention and memory visibility semantics.
  • MUST NOT suggest global lock workarounds that degrade throughput below {{target_qps}}.
  • Limit recommendations to idiomatic patterns of {{runtime_environment}}.
  • Every identified bug class must link directly to {{failure_symptom}}.

Output format

Deliver the inspection plan formatted as follows:

  • Diagnostic Overview (1 paragraph summarizing root cause hypotheses)
  • Code Review Inspection Checkpoints (4-6 detailed review vectors with code-level indicators)
  • Remediation Action Items (Numbered list categorized by Immediate Patch vs. Long-term Redesign)
  • Load Verification Protocol (Step-by-step stress testing criteria)

Self-review

  • Confirm that review vectors specifically address {{concurrency_model}} mechanics.
  • Validate that proposed testing steps reliably reproduce {{failure_symptom}}.
  • Check that performance targets match {{target_qps}}.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering10/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency7/10 · Adequate

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-code-review
software-engineering-debugging
concurrency
performance
multithreading