Skip to content

feat(git): warn about co-change partners missing from diff and PR - #3074

Open
devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/1791128503-co-change-partners
Open

devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/1791128503-co-change-partners

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Git history now identifies missing companion edits in diff and PR context—for example, a schema change without its usual migration. The existing co_change_partners contract is preserved: file is the changed anchor, partner is its missing companion, and together is their shared commit count.

Fixes #3015

The canonical Git co-change miner now applies coupling thresholds (3 shared commits / 50% for multiple changed files; 5 / 75% for one), skips commits touching over 50 files, and checks that companions still exist in the selected tree. Mining remains bounded to 1,000 commits within 18 months and eight returned partners. It supports project subdirectories and native Git path bytes, cancellation, and request deadlines. PR context mines history through the merge base and checks file existence at the PR head.

Diff context and all PR-context result variants use the same miner. Unavailable history produces typed co_change_unavailable metadata while preserving available graph context. The duplicate branch-local miner and incompatible response fields were removed; the TypeScript SDK and embedded extension were regenerated from canonical contracts.

Validation on the merged source:

  • Runtime Git fixtures: 6 passed, covering coupling thresholds, deletion, bulk commits, subdirectories, unusual path bytes, cancellation, and unavailable history.
  • Production MCP journeys: 2 passed, covering exact companion results in diff/PR context, missing-companion removal, unavailable-history enrichment, changed symbols, and invalid input.
  • SDK tests: 37 passed; SDK typecheck/build, canonical contracts generation/check, embedded extension build/check, formatting, and diff checks passed.
  • Scoped Clippy reached an existing match_bool warning in handlers/analysis/hotspots.rs:73, unchanged from the merged master revision. Its correction is owned by the master refresh. Full workspace tests were not run locally.

Mine bounded non-merge Git history for files that usually change with a
changed file and report the ones absent from the change set on
tracedecay_diff_context and tracedecay_pr_context. Bulk commits (>50
files) are ignored and single-file change sets need stronger evidence.

Fixes #3015

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@changeset-bot

changeset-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fde6ab0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

Co-change mining is enrichment: a failed, cancelled, or timed-out read
now reports co_change_unavailable instead of refusing diff/PR context.
The Git subprocess observes request cancellation and deadline, and paths
stay as bytes so unrelated non-UTF-8 names do not abort the read. Also
rebuild the embedded ChatGPT extension server bundle.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

diff/pr context: warn about co-change partners missing from the diff

1 participant