Teaching LiveReview to See Operational and Business Risk Like a Senior Engineer

LiveReview now connects production signals from Sentry, New Relic, and Datadog to code review, so a change is judged by what we know about the system it runs in, not just by what the diff looks like.

Teaching LiveReview to See Operational and Business Risk Like a Senior Engineer

A new capability in LiveReview connects production signals from Sentry, New Relic, and Datadog to code review. The idea is straightforward: a change should be evaluated not just by what the code looks like, but also by what we know about the system in which that code runs.

A senior engineer reviewing a payment-related change might remember that the affected function has caused incidents before, that its service is currently struggling with latency, and that several important workflows depend on it.

A conventional code reviewer might see three lines of modified code.

The difference is production knowledge.

We wanted LiveReview to have access to that knowledge and use it to assess operational and business risk.

The First Lesson: Production Signals Tell Us Which Code Matters

The first thing we learn from Sentry, New Relic, and Datadog is that not all code has the same operational importance.

Consider two functions.

formatCustomerAddress() is called by an internal reporting page. It has almost no production errors, low traffic, and no known operational history.

calculateSettlement() is called by checkout, refunds, and reconciliation. It has recurring exceptions, elevated P95 latency, and a history of production incidents.

Both functions might receive an identical three-line change. Should they receive the same level of scrutiny?

A senior engineer would probably say no.

This is the first capability LiveReview introduces: production feedback becomes an input into risk assessment for every review.

It brings together both historical and current production evidence.

Source Production evidence
Sentry Historical errors, exception patterns and affected code
New Relic Application performance, transaction latency and entity signals
Datadog Service errors, latency, incidents and SLO consumption

The distinction between historical and current information matters.

Historical information tells us which parts of the system have repeatedly caused problems. Current information tells us which parts are experiencing operational pressure now.

For example, a file might have a history of elevated error rates. Another might currently be responsible for a service consuming its error budget unusually quickly. Both are useful signals, for different reasons.

LiveReview uses this information to assess the production significance of a change.

When a file drives elevated P95 latency, error rates, or SLO burn, a change to that file receives greater attention than an otherwise comparable change in a relatively cold execution path. Production failures also influence how subsequent changes to that area are assessed.

This is important because error counts alone can be misleading. A service handling ten million requests will naturally produce more errors than one handling ten thousand.

We need to understand the relationship between the errors, traffic, affected functionality, and business responsibility.

There is a historical example worth considering.

On August 1, 2012, Knight Capital experienced a major failure in its automated trading system. Legacy Power Peg functionality remained callable in its order-routing software. During a deployment, updated code was not copied to one of eight servers. That server retained the old code.

The failure eventually produced millions of unintended orders and over $460 million in losses.

The interesting engineering lesson is that code does not exist independently of its operational history. Legacy functionality, deployment practices, system dependencies, and missing safeguards all contributed to the outcome.

This is the kind of context that experienced engineers develop over years of operating software.

LiveReview's objective is to make some of that context available at review time.

Connecting Production Evidence to the Codebase

Monitoring platforms and source repositories describe software differently.

Sentry understands projects, issues, exceptions, and stack traces. New Relic understands entities and transactions. Datadog organises information around services, metrics, incidents, and monitors.

A code review system understands repositories, files, functions, symbols, and commits.

The challenge is connecting these representations.

LiveReview provides integrations that map production entities to repositories:

  • Sentry: Map repositories to Sentry projects, with automatically suggested mappings that can be confirmed.
  • New Relic: Associate repositories with entities using tags and deployment matches.
  • Datadog: Map repositories to Datadog services so their production signals can contribute to risk assessment.

Once connected, LiveReview brings the evidence into the review itself.

The reviewer can see Sentry errors, New Relic signals, and Datadog service information together. The blast-radius breakdown also exposes the specific evidence behind an assessment, with links back to the originating monitoring systems.

The simplified data flow looks like this:

Production systems flow into repository mapping, then into LiveReview's evidence-linked risk assessment, producing a production-aware code review

This integration is not intended to replace monitoring dashboards. It changes when and where engineers consume the information.

Instead of remembering to investigate production history after seeing a suspicious change, the reviewer gets relevant production evidence as part of the initial assessment.

There is an important distinction here: a file appearing in a slow transaction does not prove that the file caused the latency. The signal establishes operational relevance, not causation. The engineer still needs to investigate the underlying evidence.

What Risk Actually Means to a Senior Engineer

This brings us to the definition of risk in LiveReview.

Many code quality tools identify a technical problem and assign it a severity. A security vulnerability, a missing validation, or a potential null dereference might be marked Critical.

These are useful findings, but technical severity alone does not tell us how much shipping the change will hurt the business.

LiveReview distinguishes between two kinds of risk.

Technical risk asks whether the code follows engineering rules.

Operational and business risk asks what happens to the business if the change ships.

The second is what the production-feedback capability is designed to improve.

There are four important questions behind this assessment.

What breaks if this ships?

How far can the change propagate through the codebase? Does it affect a shared function? Does it write to a database? How many other modules and workflows depend on it?

Who carries the responsibility?

A payment-processing function, an authentication component, and an internal reporting tool do not carry the same business responsibility.

Has this hurt us before?

Have changes in this area previously caused incidents, reverts, or production degradation? What does the monitoring history tell us?

What is the business impact?

A checkout problem during a major sales event is different from a similar problem in a low-traffic back-office workflow.

This last point is particularly important.

The same code can carry different levels of business risk depending on where and when it is used.

Consider three examples:

Industry Production consequence
E-commerce A broken retry mechanism can cause payment failures during peak traffic
Fintech A non-idempotent ledger write can create reconciliation problems
Publishing A slower page-rendering path can affect search performance and traffic

These are not simply different code defects. They represent different consequences for the organisations operating the systems.

A useful risk assessment must account for those consequences.

Two Questions: How Far Can It Reach, and How Much Scrutiny Does It Need?

Knowing that operational risk matters is not enough. We need a way to assess it consistently.

LiveReview uses two separate scores for each change.

Risk Score: How far can this change reach through the codebase?

This is fundamentally a blast-radius question.

LiveReview constructs a static graph of the codebase and examines relationships between functions and symbols.

For a changed function, it considers:

  • How many other places call it, directly or indirectly.
  • Whether it writes to a database or other persistent storage.
  • Whether its callers are distributed across different parts of the codebase.

This produces a better picture of the reach of a change than counting the number of modified lines.

Consider this example:

calculateSettlement()
    |
    +-- paymentService
    |       |
    |       +-- checkoutAPI
    |       +-- refundAPI
    |
    +-- ledgerWriter
            |
            +-- reconciliationJob

A modification to calculateSettlement() potentially affects several business workflows.

The function might contain only three lines of changed code, but the consequences can propagate through the entire dependency graph.

Review Priority: How much scrutiny does this change deserve?

This is a different question.

A change with a large blast radius might be relatively straightforward to understand. Another change might have a smaller blast radius but involve complicated branching logic, nested loops, subtle interactions, or insufficient tests.

LiveReview considers factors such as:

  • The number of different paths the logic can take.
  • How deeply loops are nested.
  • How many other functions or symbols the code calls.
  • Whether the code has tests.

The intention is to estimate how difficult it is to review the change and how likely important details are to be missed.

These two scores are combined to rank individual changes within the diff.

This separation matters because reach and scrutiny are not interchangeable.

A three-line change in a widely used database function deserves attention because of its blast radius. A complex algorithm with insufficient tests deserves attention because it is difficult to reason about.

Neither should be evaluated just by line count.

Combining Production History, Code Analysis, and AI

Now we have three different kinds of information.

Production systems tell us what has happened and what is happening.

Static analysis tells us how code is connected and how far a change can propagate.

Semantic analysis helps us understand what the change actually does.

LiveReview combines these through three complementary mechanisms:

Production-trained ML model

LiveReview uses a custom ML model trained on production risk signals. Historical incidents and reverts provide feedback about the areas and types of changes that have caused real problems.

This helps move risk assessment beyond generic assumptions about what constitutes dangerous code.

Static graph-based analysis

The codebase graph provides a structural view of the software. It allows LiveReview to reason about callers, dependencies, persistent writes, and blast radius.

Unlike an LLM's interpretation of a dependency relationship, the graph provides a deterministic structural signal for the analysed codebase.

Semantic LLM analysis

An LLM examines the actual code change and helps understand its intent, behaviour, and potential problems.

This is useful because the meaning of a code change cannot always be inferred from syntax or dependency relationships alone.

The three sources complement each other.

Production ML, static graph analysis, and semantic LLM analysis each feed into LiveReview's combined risk assessment: Risk Score plus Review Priority

Why not simply ask an LLM to inspect the diff and assign a risk score?

Because linguistic reasoning alone is not sufficient for this problem.

An LLM can understand that a change modifies payment logic. It cannot reliably infer the complete operational significance of that change without production evidence and structural information about the system.

Furthermore, LLM outputs can vary between runs. Using them as the sole source of a score that drives approval decisions introduces unnecessary uncertainty.

LiveReview therefore combines semantic reasoning with a custom production-trained model and static graph analysis.

The result is a more stable and evidence-based assessment than relying on an isolated LLM judgment.

The Economics of Review Attention

There is an economic reason to build this kind of risk model.

Engineering teams have finite review capacity. Senior engineers cannot spend the same amount of time examining every pull request, especially as AI-generated code increases the volume of changes.

The objective should be to allocate review effort according to the potential consequences of a mistake.

Consider a simplified e-commerce example.

Assume:

  • 100,000 checkout attempts per day.
  • A regression increases payment errors by 0.5 percentage points.
  • Each successful checkout contributes $8 in contribution margin.

The additional failed payments would be:

100,000 * 0.005 = 500

The contribution margin exposed in one day would be:

500 * $8 = $4,000

Now assume that a particular change has a 5% probability of introducing this regression.

Its expected one-day contribution-margin exposure is:

0.05 * $4,000 = $200

Suppose an additional 30 minutes of senior-engineer review costs $60, using a loaded engineering cost of $120 per hour.

That additional review breaks even if it reduces the probability of the regression by:

$60 / $4,000 = 0.015

1.5 percentage points

In other words, reducing the probability of the regression by 1.5 percentage points would cover the additional review cost under these assumptions.

This is an illustrative expected-loss calculation, not LiveReview's internal scoring formula. Real production failures also introduce support costs, recovery expenses, customer churn, and reputational damage.

Google's Site Reliability Engineering approach provides a related way to think about this trade-off.

In the chapter on embracing risk, the authors explain why maximising reliability indefinitely is not necessarily optimal. Engineering resources spent eliminating increasingly unlikely failures have an opportunity cost: those resources cannot be spent delivering features or improving other parts of the system.

Error budgets provide a practical way to balance reliability and release velocity.

A 99.9% request-based SLO permits 0.1% of requests to be bad within the measurement window. A 99.99% SLO permits 0.01%. Moving from three nines to four nines means reducing the allowed bad-request fraction by a factor of ten.

That additional reliability has an engineering cost.

The same principle applies to code review.

Not every change needs a senior engineer to spend 30 minutes investigating it. Some changes can safely receive lighter scrutiny. Others warrant substantial attention because their potential impact is much greater.

This is the economic foundation for risk-aware review.

LiveReview makes this practical by ranking changes using production feedback, codebase structure, and semantic analysis. Teams can then apply review policies according to the risk they are willing to accept, rather than treating every diff identically.

Closing the Loop: Reviews Should Learn From Production

There is one more important part of this design.

A risk model should not remain static after deployment.

Every merged change eventually produces an outcome. Some changes work as expected. Others lead to incidents, rollbacks, performance degradation, or production errors.

That information should feed back into future reviews.

LiveReview tracks production incidents and rollbacks against the commits and reviews behind them. It uses this experience alongside its analysis methods to improve future risk assessments.

It also tracks false approvals and human overrides, allowing teams to evaluate whether their review policy is calibrated appropriately.

The overall process becomes:

Code change flows through production-aware review, human approval, deployment, and production outcomes; incidents and feedback loop back to improve future risk assessments

The idea is to make the review process learn from the actual system, not just from static rules or the opinions of whoever happens to be reviewing a pull request.

A senior engineer develops this capability through years of experience. They remember the failures, understand the dependencies, recognise critical workflows, and learn where the organisation's real operational risks lie.

With this new capability, LiveReview brings production history and current operational signals into that decision-making process.

The larger objective is to make code review sensitive to business consequences, not merely code quality.

Try It On Your Own Pull Requests

If you want to see your Sentry, New Relic, or Datadog signals show up inside code review instead of a separate dashboard, you can try LiveReview on your own repositories.

Sign up for LiveReview at hexmos.com/livereview →

A question for engineering teams:

When deciding whether a pull request is safe to merge, do you currently consider the historical production behaviour of the files being changed? Or does your review process still operate primarily on the diff in front of you?