Skip to content

fix(review): the symbol delta is always empty because git show reads the base revision as a path #787

Closed

Description

@dan-petty

Context & Rationale

f93231b (#738) changed the base-revision read in commands/analyze.py:152 to git --no-pager show -- <rev>:<path>. Git reads everything after -- as a pathspec, so the command prints nothing and exits 0. As a result:

  • the base file is always empty and symbols_removed is always [];
  • every head symbol counts as added;
  • the "cites a removed symbol" check never fires, and every Symbol Delta is wrong.

A scratch repository with a real removal reproduced this. tests/test_analyze.py:665 runs with base=None and no git repository, so no test caught it. Found while checking the #659 fix on release/v0.2.24.

Scope & Deliverables

  • Deliverable: the base revision's file is read again, and a test against a real git repository removes a symbol and asserts it appears in symbols_removed.
  • Constraint: refs and paths are already validated before this call, so dropping -- needs no other guard.

Strategic Alignment

  • Milestone: Backlog (no release)
  • Design: none
  • Depends on: none

Generated by Claude Code

Activity

  1. added
    type/bug
    scope/review
    priority/p1-high
    on Oct 1, 2026
  2. added
    priority/p0-critical
    and removed
    priority/p1-high
    on Oct 1, 2026
  3. added this to the v0.2.24 milestone on Oct 1, 2026
  4. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Raised to P0 and admitted to v0.2.24 as a critical fix, by the owner's decision (2026-10-01). It fixes a regression from f93231b (#738), which is in no release tag, so v0.2.24 would otherwise ship it. #593 (v0.2.25) depends on it.

  5. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Closed by #893, merged into release/v0.2.24.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

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

    priority/p0-criticalscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions