AppMap Gold Traces: Durable Runtime Context for AI Code Review

AppMap Gold Traces: Durable Runtime Context for AI Code Review

AI coding tools write plausible code fast. The hard part is knowing what that code does when it runs. A diff shows what changed in the text. It does not show what changed in the behavior.

An AppMap Gold Trace answers that question. It is a recorded application run that a team has selected as the versioned baseline. Later revisions of that path can be compared against it. The comparison is concrete: call structure, SQL shape, HTTP boundaries, downstream calls, and the runtime path of a known-good run beside the same evidence from the new code.

Source code tells you what software could do. Runtime behavior tells you what it actually did. An AppMap Gold Trace makes the second half of that sentence durable. It is a versioned baseline the team agrees on, kept under version control alongside the code it describes. It becomes trusted through the team’s normal review and merge process.

The trust gap AppMap Gold Traces close

Developers do not fully trust AI-generated code. In Sonar’s 2026 developer survey of more than 1,100 developers, 96 percent said so. Sonar also found that 38 percent of developers say reviewing AI-generated code requires more effort than reviewing human-written code. SmartBear’s 2026 research found that 70 percent of software leaders say quality has already degraded as AI sped up delivery, and 60 percent of teams hit quality issues last year because code outran testing.

The common thread is that review capacity did not scale with generation speed. Reading more code faster is not a strategy. Reviewing behavior instead of text is.

An AppMap Gold Trace gives the review a fixed point. Instead of asking a reviewer to imagine what the change does, the review compares two recordings. The baseline shows the path from the previous run. The new recording shows it as it runs now. What appeared, disappeared, or moved is visible as a difference between two pieces of evidence, not as a guess.

What an AppMap Gold Trace contains

An AppMap recording captures a real application run: function calls, SQL queries, HTTP traffic, exceptions, code structure, and their relationships. When a team promotes a recording into an AppMap Gold Trace, AppMap sanitizes the committed baseline first. Captured parameter, return, and message values are replaced with deterministic tokens, and SQL values are replaced with placeholders, preserving the shape of the behavior without preserving the original runtime values.

Promotion is therefore a governance decision as well as a lifecycle step. A team selects a deterministic recording that represents correct behavior for a service or critical path, sanitizes and blesses it, and commits the resulting baseline alongside the code. It lives in the repository in the .appmap folder, versioned with the source, so the baseline and the code stay in sync through branches and releases.

The diagrams are for people

A reviewer opens the baseline and the new recording as sequence diagrams, dependency maps, trace views, and flame graphs. The comparison is visual. A new query inside a login flow is a new arrow. A missing authorization check is a missing box. These are things a person can see in seconds that a text diff cannot show at all.

AppMap sequence diagram showing package lifelines, a loop block, and per-call timings.
An AppMap sequence diagram in the editor. Lifelines, loops, and timings from a real recorded run.

The data is for the AI

The same recordings are structured data. AI agents can query them over the Model Context Protocol using get_call_tree, find_calls, find_queries, and find_requests, and the review skill also works directly from the committed traces and comparison output. An agent reviewing a pull request does not have to infer behavior from source alone. It can read the runtime evidence, compare the two revisions, and interpret that evidence alongside the source diff.

The traces produce both. People and AI tools review the same ground truth in their native formats.

AppMap Gold Traces in the pull request

This workflow is shipped and public. The AppMap skills, published at github.com/getappmap/skills, cover recording, labeling, maintaining AppMap Gold Trace baselines, and reviewing changes against them. The public review-action at github.com/getappmap/review-action can run those skills automatically on pull requests. Teams can run review on selected pull requests, at review-ready milestones, or more broadly when their workflow calls for it.

The action re-records the selected Gold Trace paths against the PR head, compares the runs against the committed baselines, and posts an interpreted review as a sticky comment on the pull request. Blessed baselines and any labels the agent adds are committed to the branch. The evidence travels with the change. It works with Claude Code and the GitHub Copilot CLI, so the review runs on the agent tooling a team already uses.

The question in review stops being whether the diff looks right. It becomes whether the behavior held. That question has an answer, and the answer is attached to the PR.

Behavior is a property of a revision. You either do or do not want it to change. When the baseline behavior lives in the repo, it branches, merges, and reviews like everything else that describes the software before and after a change state. A separate service would just be a second source of truth to keep in sync.

— Kevin Gilpin, CTO and co-founder, AppMap

What AppMap Gold Trace review reveals

Runtime comparison surfaces changes that source review can easily miss. A new query inside a loop changes the SQL shape and call structure. A removed authorization check disappears from the execution path. A new outbound request adds a downstream dependency. A supposedly isolated refactor can change behavior in a path the diff never directly touched.

AppMap Gold Trace review separates those structural changes from runtime noise. Volatile values and elapsed-time jitter do not determine whether a trace changed. The reviewer sees the behavioral differences that remain after cleanup and can reconcile them against the intent of the code change.

AppMap review can also incorporate scanner findings from the recordings, adding security, performance, correctness, and architecture signals to the structural comparison.

AppMap queries panel listing executed SQL statements with parameter placeholders.
Queries from a recorded run, shown as parameterized statements.

Getting started

Record a real application path with AppMap and inspect it in your editor. Choose a deterministic path whose behavior matters, then use the appmap-gold-traces skill to curate, sanitize, and bless it as a baseline. Commit that baseline with the code. When automated review is useful, add review-action to your GitHub workflow so selected pull requests can be re-recorded and compared against it. See the AppMap Gold Traces reference for details.

A set of traces. Many views. Same ground truth. The AppMap Gold Trace is how that ground truth persists.

FAQ

What is an AppMap Gold Trace?

A sanitized AppMap recording that a team has selected, reviewed, and committed as the versioned baseline for a specific application path.

How is an AppMap Gold Trace different from a snapshot test?

A snapshot test asserts on output. An AppMap Gold Trace captures the recorded execution path behind the output: calls, queries, HTTP boundaries, and structure. The comparison covers how the result was produced, not just what it was.

Where are AppMap Gold Traces stored?

In the project’s repository, as files versioned with the code, with sensitive values removed. No AppMap-operated cloud is required.

Do AppMap Gold Traces work with AI coding agents?

Yes. Agents query the same recordings over MCP, and the published AppMap skills let agents record, label, and review against baselines. The review-action posts results to the pull request.

What languages are supported?

Java, Python, Ruby, and Node.js, recorded from tests or a running process without modifying application source code.

Does this send my code or runtime data to the cloud?

AppMap does not send recordings to an AppMap-operated cloud. Recording, sanitization, and comparison run in your developer environment or CI. If you choose a hosted AI agent, selected context may be sent to that provider under its configuration and terms. See the Security FAQ for details.


AppMap logo Get AppMap