Skip to content

feat(workspace): surface supporting evidence for cross-repo co-change pairs (#483) - #2041

Open
sloemo01 wants to merge 2 commits into
repowise-dev:mainfrom
sloemo01:feat/cross-repo-evidence
Open

feat(workspace): surface supporting evidence for cross-repo co-change pairs (#483)#2041
sloemo01 wants to merge 2 commits into
repowise-dev:mainfrom
sloemo01:feat/cross-repo-evidence

Conversation

@sloemo01

@sloemo01 sloemo01 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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 log now captures %H; _GitCommit.sha added
  • CoChangeEvidence: 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 overlay
  • One example pair per co-session, deduped by SHA pair
  • Overlay version 2 → 3; round-trip tested, pre-v3 overlays load with evidence=None

Server: WorkspaceCoChangeEvidence schema, WorkspaceCoChangeEntry.evidence, router exposes it.

Types + UI: mirrors in packages/types and packages/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_modules in this checkout); the type change is consistent with the updated test fixture.

Note: test_plugin_content is red on main itself (v0.47.0 release bug, unrelated to this PR).

… 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
sloemo01 force-pushed the feat/cross-repo-evidence branch from d830215 to 005894b Compare August 31, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface supporting evidence (authors, matched commits, time gaps) for cross-repo co-change rows

1 participant