feat(workspace): surface supporting evidence for cross-repo co-change pairs (#483) - #2041
Open
sloemo01 wants to merge 2 commits into
Open
feat(workspace): surface supporting evidence for cross-repo co-change pairs (#483)#2041sloemo01 wants to merge 2 commits into
sloemo01 wants to merge 2 commits into
Conversation
… pairs (repowise-dev#483) A co-change pair is a temporal, same-author hint; the evidence is what lets a user judge whether the relationship is meaningful instead of trusting a bare score. Core (detect_cross_repo_co_changes): - git log now captures %H; _GitCommit.sha added - CoChangeEvidence: distinct authors, example matched commit pairs (source_sha, target_sha, date, gap_hours) and the max time gap, bounded per pair — 3 commit pairs, 5 authors — so a pair backed by hundreds of commits cannot bloat the persisted overlay - One example matched commit pair per co-session, deduped by SHA pair - Overlay version 2 -> 3; from_dict round-trips evidence and tolerates pre-v3 overlays (evidence=None) Server: WorkspaceCoChangeEvidence schema, WorkspaceCoChangeEntry.evidence, router builds it from the overlay. Types + UI: WorkspaceCoChangeEvidence in types + api-client mirrors; CoChangeTable gains an Evidence disclosure per row (authors, commit pairs with gap, max gap), dash when absent. Tests: core evidence capture (pair shape, bounded sample, overlay round-trip); 66 workspace tests + 145 server workspace tests pass. UI vitest suite not runnable locally (no node_modules in this checkout); type-level change is consistent with the updated test fixture.
CI caught a real gap: the api-client's WorkspaceCoChangeEntry mirror was never updated with the evidence field, so the co-changes page's WorkspaceCoChangeEntry[] from the api-client did not match the types package's entry shape (TS2322). Added the evidence interface + field to the mirror. Also regenerated the committed HTTP contract (the schema gained WorkspaceCoChangeEvidence).
sloemo01
force-pushed
the
feat/cross-repo-evidence
branch
from
August 31, 2026 08:13
d830215 to
005894b
Compare
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.
What
Fixes #483 — the evidence layer Raghav asked for in the thread ("the sample bound decides the schema").
Root cause
Cross-repo co-change pairs carried only a strength/frequency score — no authors, no example commits, no time-gap signal — so a reviewer couldn't tell a real co-evolution from a coincidental co-edit.
Changes
Core (
detect_cross_repo_co_changes):git lognow captures%H;_GitCommit.shaaddedCoChangeEvidence: distinct authors + example matched commit pairs (source_sha,target_sha,date,gap_hours) + max time gap. Bounded: 3 commit pairs and 5 authors per pair (the cap Raghav's scoping asked to settle first) — a pair backed by hundreds of commits cannot bloat the overlayevidence=NoneServer:
WorkspaceCoChangeEvidenceschema,WorkspaceCoChangeEntry.evidence, router exposes it.Types + UI: mirrors in
packages/typesandpackages/api-client; the co-change table gains an evidence disclosure per row (authors, commit pairs with gap, max-gap summary), dash when absent.Tests
Core evidence capture (pair shape, bounded sample, overlay round-trip) — 66 workspace tests pass; 145 server workspace tests pass. The UI vitest suite could not run locally (no
node_modulesin this checkout); the type change is consistent with the updated test fixture.Note:
test_plugin_contentis red on main itself (v0.47.0 release bug, unrelated to this PR).