Agentic PR Evidence Checklist
Define the intent-to-test evidence chain, terminal states, ownership, missing coverage, and wrong-build controls for an agent-assisted PR review.
Quick answer
An AI agent should not approve a pull request because it successfully called a test tool. A defensible gate must connect the change intent to affected paths, selected tests, reviewed assertions, the exact candidate build, a terminal execution result, and accessible evidence. Represent the outcome as Pass, Fail, or Unknown; keep the gate advisory until failure, timeout, cancellation, skipped-test, missing-coverage, and wrong-build cases behave as agreed.
What this guide produces
Use this checklist when Claude Code, another MCP-compatible agent, or CI automation helps select or run ContextQA tests for a pull request. It produces a review record that answers five questions:
What change is being evaluated?
Why do these tests cover it?
Which exact application and test versions ran?
Did the execution finish with a trustworthy result?
Who owns missing coverage or remediation?
Model the evidence chain
The gate is only as strong as its weakest link.
A broken link is not automatically a failure in the product. It is an Unknown release decision until a reviewer expands coverage, verifies identity, or reruns the test.
Define the three gate outcomes
Pass
Required assertions ran against the intended build and all blocking results passed
May allow the protected action after acceptance testing
Fail
At least one required assertion reached a terminal failing result
Block and assign a remediation owner
Unknown
The evidence is incomplete, mismatched, timed out, canceled, skipped unexpectedly, or missing required coverage
Block for a required gate; report neutrally for an advisory gate
Avoid a binary mapping that treats everything other than an explicit failure as success. Queued, running, canceled, timed out, partial, and no result are not passing test outcomes.
Step 1: Capture the change contract
Populate this record from the pull request and build system before asking an agent to select tests.
Repository
Canonical repository identifier
Pull request
Number and stable URL
Candidate commit
Full commit SHA, not a moving branch name
Base commit
Merge base or comparison SHA
Build identifier
Immutable artifact, deployment, or image ID
Environment
Named target and revision
Change intent
One-paragraph author summary
Acceptance criteria
Reviewable behavioral outcomes
Risk labels
Auth, payments, data integrity, migration, permissions, or other relevant risks
Evaluation timestamp
When the evidence packet was assembled
If the pull request description conflicts with the diff, flag the mismatch. The change intent is an input, not proof.
Check repository and requirement freshness
Cached context becomes unsafe when it describes a different commit, requirement revision, generated artifact, dependency graph, or test mapping from the one under review. Record provenance before reusing prior analysis.
Repository snapshot
Full commit SHA and included paths
Head/base changes, force-push, submodule or lockfile change
Do not select tests from stale snapshot
Requirements/acceptance criteria
Source URL/ID and revision timestamp
Requirement edit, reopened decision, conflicting source
Flag conflict; request owner decision
Dependency/context graph
Source inputs, build/repo revision, refresh time
Dependency, route, schema, or service map changes
Expand fallback coverage
Test inventory/mapping
Test IDs and last-reviewed revision
Test created, retired, changed, or moved
Requery authoritative test source
Environment/deployment
Immutable build/deployment ID
Redeploy, rollback, feature-flag change
Mark build evidence Unknown
Agent context pack
Version and source list
Any input above changes
Rebuild pack; do not patch memory selectively
Freshness record
The policy above is team-defined unless your connected ContextQA workflow exposes and enforces the same metadata. Do not claim that the product invalidates stale context automatically without a verified run.
Illustrative stale-versus-refreshed example
An earlier analysis at commit A selected checkout UI tests. Commit B adds a shared authorization-schema change after the cache was built. Reusing the commit-A mapping would omit a role-boundary test. A refreshed analysis adds the permission workflow; until that refresh finishes, the gate uses the broader regression fallback and reports Unknown dependency rather than No impact.
This example is illustrative. In a real review, preserve both reports and the actual selected-test difference.
Step 2: Map paths to affected behavior
Start with the ContextQA PR Impact Analysis report when it is available. Review its scope, confidence, and Partial or Superseded state. Then add human knowledge that is not visible in the code graph.
services/permissions/*
Role-based approval controls
Structural mapping
High
Check inherited role behavior
ui/invoice/*
Invoice approval workflow
Semantic match
Medium
Include mobile viewport
Shared schema
Unknown downstream consumers
Dependency not modeled
Unknown
Run broader regression fallback
The rows above are illustrative. Replace them with the current pull request.
Mark a dependency Unknown when the impact system or reviewer cannot bound it. Do not convert “no matched tests” into “no testing needed.”
Step 3: Review test selection and assertions
For each affected behavior, require at least one of these dispositions:
Selected: an existing test contains the required assertion.
Added: a reviewed test or assertion was created for this change.
Covered elsewhere: another control owns the risk, with a reference.
Accepted gap: an authorized reviewer accepts the gap for this change.
Unknown: the team cannot yet show coverage.
Use this worksheet:
Check the assertion, not just the test name. A test called admin can approve invoice may only verify navigation. The gate needs the exact observable outcome that represents the risk.
Agent-generated tests require review
An MCP-compatible coding agent can call ContextQA tools after the server is connected and authorized. Claude Code's official MCP guidance notes that connected servers can let the agent read and act on external systems, which is precisely why tool permissions and review boundaries matter. See Connect Claude Code to tools via MCP.
Before counting an agent-generated test as coverage:
Review its preconditions and data dependencies.
Trace every acceptance criterion to a concrete assertion.
Run it once against the expected behavior.
Run it against a controlled failure when the risk warrants it.
Store the test revision or last-reviewed timestamp in the evidence packet.
Step 4: Bind execution to the candidate build
The most dangerous green result is a correct test against the wrong build.
Record at least two independent identifiers when possible:
Source
Full candidate commit SHA
Artifact
Image digest, package version, or immutable build ID
Deployment
Deployment ID or environment revision
Application
A version endpoint, footer build ID, or test-only metadata endpoint
Test
Test-case or suite reference and revision
Run
ContextQA execution or plan-run reference
Add a preflight assertion that reads the application version when your architecture supports it. If the deployed version does not equal the candidate, return Unknown: wrong build before interpreting functional results.
Wrong-build acceptance test
Deploy build A to the test environment.
Start a gate record for build B.
Run the preflight identity check.
Verify that the gate does not return
Pass.Confirm the output names both the expected and observed identities without exposing secrets.
Step 5: Wait for a terminal result
ContextQA executions are asynchronous. Follow the documented agent execution workflow or the public start/status contract supplied to your workspace. Do not infer endpoint paths from portal traffic.
Use bounded polling:
The polling timeout is a gate outcome, not proof that the underlying test failed. Report Unknown: gate timed out while run was <last observed state> and keep the run reference for later review.
Step 6: Assemble the evidence record
Use one record per pull-request evaluation.
Prefer a durable run reference and the ContextQA test result over pasted screenshots alone. Screenshots are useful evidence, but they lose surrounding identity, step, and state context when detached.
Step 7: Exercise the negative paths
Keep the gate advisory until this matrix passes.
All required assertions pass
Pass
Correct build and evidence are linked
Required assertion fails
Fail
Failure is visible and owned
Run remains queued past gate timeout
Unknown
Never becomes a pass
Run starts, then is canceled
Unknown
Cancellation is preserved
Required test is skipped
Unknown
Skip reason and owner are visible
Candidate build does not match
Unknown
Expected and observed identities appear
Selection report is partial
Unknown or broader fallback
Unprocessed scope is explicit
No test matches a risky change
Unknown or accepted gap
Human decision is recorded
Agent tool call is denied
Unknown
Permission failure is not a test failure
Evidence link is inaccessible to reviewer
Unknown
Access problem is actionable
Once the behavior is deterministic, use the CI integration acceptance runbook before making the check required.
Assign ownership without hiding uncertainty
Product assertion fails
Feature team
Diagnose and fix or document intended behavior
Test assertion is wrong
Test owner
Correct, review, and rerun
Coverage is missing
QA/release owner
Add coverage or approve the gap
Environment is unavailable
Platform owner
Restore and rerun
Build identity mismatches
Release engineering
Correct deployment or metadata propagation
Agent lacks tool permission
MCP/automation owner
Review least-privilege policy
Cause remains unclear
Named investigator
Time-box investigation; retain Unknown
An AI explanation may accelerate triage. It should not erase the named human owner or the evidence needed to close the decision.
Review prompt for an MCP-compatible agent
Copy and adapt this prompt after connecting the agent to the approved ContextQA MCP server:
Common questions
Related documentation
Last updated
Was this helpful?
