Skip to content

[Feature]: Support AI analysis of a repository so a change can be mapped to the quality risks it introduces #3

Open

Description

@leviacicig

User problem

Today, verification still starts from a diff, a test file, or a single edited function. It does not start from how the change actually travels through the system.

A small edit can look safe in review and still break an indirect caller, a retry/refund path, a shared utility, or a cross-service contract. Existing tests often keep passing because they never executed that path. Engineers then reconstruct blast radius by hand: who calls this, what else writes this field, which jobs or APIs share this model. That does not scale on a large, multi-repo, or agent-generated codebase.

We need the skill to analyze the repository (and the change) as a system: parse call chains and data flows, extract a lightweight code knowledge graph, and report which quality risks this change introduces—not only whether the edited lines look wrong.

For each suspected risk, the output should be reviewable by a human:

  • location (file, symbol, service)
  • trigger path (how the change is reached)
  • risk type (missed boundary, broken invariant, untested caller, contract drift, weakened assertion, etc.)
  • evidence (why this chain/graph edge matters)
  • suggested next check (test, fixture, or review question)

Typical scenes this should cover:

  1. A developer tightens “amount must be greater than zero” on checkout. The unit test on that function passes, but an order-retry or refund path still accepts 0. The defect is in the call chain, not in the diff hunk.
  2. A coding agent refactors a shared helper. The diff is clean, but reviewers cannot see which APIs, cron jobs, or frontend flows depend on it, so residual risk is guessed.
  3. QA is told a change is “login-related.” Without a map of auth → session → checkout → payment, they either under-test the blast radius or regression-test everything.

The feature is successful if, given a repository and a change (PR, branch, or commit range), the tool can say: what changed, which paths are impacted, and which quality risks were introduced—instead of asking humans to reverse-engineer the system from grep and memory.

Evidence of demand

Reproducible workflow we keep hitting

  1. Change a boundary check in a checkout/pricing/permission function (or let a coding agent do it).
  2. Run the existing unit/API tests. They pass.
  3. A downstream path (retry, refund, batch job, another service) still violates the original intent.
  4. The failure is only found in staging, production, or a later manual trace of callers.

The current examples/checkout-boundary fixture is a good seed: it already has a known-good implementation and a seeded defect. What is missing is the repo-level analysis step before/around that review:

  • build or update a call-chain / knowledge-graph view of the example (and later a real repo)
  • take a branch or diff as input
  • emit impacted symbols and risk points, e.g. “validateAmount changed; retryUnpaidOrder still accepts 0; no test covers that caller”
  • attach evidence (caller list, path, missing test) so a human can confirm

Minimal input we want to support

Analyze REPOSITORY_URL at BASE_REF...HEAD with repo-level AI analysis.
Report: changed symbols, impacted call chains, and quality risks introduced by the diff.
For each risk: location, trigger path, evidence, and suggested check.

Activity

  1. added
    enhancement
    on Sep 6, 2026
  2. openqa-founder commented on Sep 6, 2026

    @openqa-founder
    Contributor

    This sounds valuable, especially for boundary and shared-helper changes where the existing unit tests may pass while an indirect caller still violates the intended behavior.

    For an MVP, I think it would help to narrow the scope around the existing checkout-boundary fixture:

    • Input: a repository plus BASE_REF...HEAD
    • Detect changed files and symbols
    • Build a lightweight function-level call graph
    • Identify direct and indirect callers
    • Link callers to existing tests where possible
    • Report risks with file, symbol, trigger path, evidence, confidence, and a suggested check

    A concrete acceptance case could be:

    1. validateAmount is changed to reject non-positive amounts.
    2. The retry path still reaches the old behavior or lacks coverage.
    3. The analysis reports retryUnpaidOrder as an impacted caller.
    4. The report identifies the missing retry test for amount=0.

    A few questions I think are important for scoping:

    • Which languages should the first version support?
    • Should the first version analyze only the fixture or arbitrary repositories?
    • Do we need static analysis only, or should we also use test/runtime traces?
    • How should unresolved dynamic calls or dependency injection be represented?
    • Should risks include confidence levels and explicit analysis limitations?
  3. leviacicig commented on Sep 20, 2026

    @leviacicig
    ContributorAuthor

    funciton is devloping?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions