Skip to content

feat(review): deterministic changed-symbol extraction from the PR diff (impact-map input) #2182

Description

@JSONbored

Foundational input slice of #1971: a pure extractor that, from the changed files + patches, deterministically pulls the changed/added/removed top-level symbols (exported functions/classes/consts) per file. No RAG query, no rendering — just the symbol set the impact computation consumes. Reuses the RagBoundary vocabulary.

Deliverables

  • New src/review/impact-symbols.ts exporting extractChangedSymbols(files: {path, patch}[]) -> {path, symbols: string[]}[]
  • Language-aware but bounded (TS/JS export forms first; degrade gracefully for others)
  • Aligns with RagBoundary ('function'|'class'|'export') in src/review/rag.ts:105
  • Fail-safe: unparseable patch yields empty symbol set, never throws
  • Tests: added export, removed export, modified body, no-symbol diff, malformed patch (branch-counted)

References

  • src/review/rag.ts:105
  • src/review/rag-wire.ts:144
  • src/review/inline-comments.ts:49

Part of #1971.


size: S · held for later release (gittensor:feature once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions