[Feature] Add repository harness - #15
Merged
Merged
Conversation
Symbol IDs take the form <package>@<revision>/<symbol> so indexes from different checkouts merge by string equality. Revision comes from git HEAD (version files as fallback); the content fingerprint moves to the shared symbols module.
A ConventionManifest turns per-repo conventions into data: search dirs, macro aliases and token maps for the binding detector, decorator/string registries, registration calls, and string dispatchers. PyTorch, vLLM, and torchvision register as harnesses; YAML op sources are optional and string-derived records carry candidate markers with evidence.
affected() renders file::Class::function node IDs with a paste-ready pytest block, replaces whole-file OpInfo expansion with -k runs gated to precisely-resolved APIs, reseeds the mention vocabulary from op and OpInfo names (spread-based cap), bridges dispatch stubs through their call sites and kernel TU helpers, parses structured kernel class names, and adds gradient runs for backward changes.
adabeyta
force-pushed
the
feat/repo-harness
branch
from
July 17, 2026 01:33
5468c23 to
00fb3e3
Compare
Collaborator
|
@adabeyta few tweaks can maybe be made but otherwise good to merge |
arkadip-maitra
requested changes
Jul 22, 2026
arkadip-maitra
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add repository harnesses: TorchTalk beyond PyTorch
TorchTalk's indexing pipeline was hardwired to one repo's anatomy PyTorch's directory layout, YAML files, test conventions, and cache identity were baked into constants scattered across the codebase. This PR introduces the repository harness: a declarative
ConventionManifestthat captures everything TorchTalk needs to know to index a package C++/Python/test search directories, exclusion patterns, registration macros and macro aliases, YAML data sources, decorator/string registries, and package identity. The engine consumes only the manifest; the repo-specific knowledge lives in ~30 lines of data per package.Three harnesses ship built-in pytorch, vllm, torchvision and
register_harness()accepts new ones without engine changes. Graphs built from different manifests merge via package-qualified symbol IDs (pytorch@<rev>/at::native::add).The harness boundary is enforced everywhere
Every scan binding detection, implementation search, C++ call graph (full and incremental), Python registration extraction, test-infrastructure analysis is bounded by the active manifest's search dirs, exclusion patterns, and prefilters. Incremental updates (
index update --since) apply the identical boundary, so they can never produce an index a full rebuild wouldn't.Identity is harness-qualified
Caches are keyed by package and source (
bindings_vllm_<hash>.json), so indexing two repos or one checkout under two harnesses never collides. Snapshots record which harness built them (schema v3, migrated transparently) and refuse cross-harness load/update with an actionable error. Baselines from older cache formats are rejected instead of silently merging mixed-schema rows.Multi-repo config, end to end
Sources live per-harness in
[sources]; resolution is flag →TORCHTALK_SOURCE_<HARNESS>env (derived from the name, nothing hardcoded) → config. Validation is manifest-driven, soinitaccepts a vLLM checkout and still holds PyTorch to its old strictness.--pytorch-source,PYTORCH_SOURCE, and the legacy config key remain as compatible aliases; the Claude Code plugin pins--harness pytorch.