fix(signals): include recent_merged_pull_requests in outcome pattern - #316
Merged
JSONbored merged 13 commits intoJun 4, 2026
Merged
Conversation
JSONbored
requested changes
Jun 2, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
A few notes:
- The core bug is real:
recent_merged_pull_requestshas to participate in repo outcome analysis or healthy repos get falsely flagged as low-merge/high-closure-risk. - The evidence-completeness denominator change is also important because merged-only rows are not detail-sync eligible.
- The remaining blocker is maintainer-lane accuracy. Merged-only records are currently added with
maintainerLane: falseandauthorRole: "first_time_or_external", which can inflate outside-contributor merge rates when the merged history includes owner/member/collaborator work.
Required changes:
- Derive maintainer association from available merged-row payload when present, or exclude unknown-association merged-only rows from outside-contributor merge-rate calculations.
- Add a regression where a merged-only OWNER/MEMBER/COLLABORATOR PR does not improve outside-contributor merge-rate signals.
- Keep the evidence-completeness denominator fix.
Validation expected:
- Run
test/unit/repo-outcome-patterns.test.ts. - Run the full validate pipeline after the association fix.
…on merged-only repo outcome rows
Contributor
Author
|
Hi, @JSONbored |
JSONbored
self-requested a review
June 3, 2026 05:27
JSONbored
requested changes
Jun 3, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@enjoyandlove this still needs the maintainer-lane accuracy fix before merge.
A few notes:
- Including recent merged PRs is the right direction for #312.
- The issue is that merged-only records should not inflate outside-contributor success patterns when author/maintainer lane cannot be classified safely.
- The current title is also truncated.
Required changes:
- Retitle the PR to a complete scoped title, for example
fix(signals): include recent merged PRs in outcome patterns. - Fix the maintainer-lane classification for merged-only records.
- Make the fallback conservative when author association is unknown.
Validation expected:
- Add/keep focused tests for maintainer-authored, external-author, and unknown-author merged PR records.
- Re-run the targeted signal tests and the normal CI gate.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JSONbored
self-requested a review
June 3, 2026 22:46
JSONbored
requested changes
Jun 3, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@enjoyandlove this is closer, but cleanup is still needed.
A few notes:
- Including recent merged PRs in outcome patterns is the right fix for #312.
- The latest code is more conservative about unknown/maintainer associations.
- The title is still truncated and the branch still includes the generated extension zip artifact.
Required changes:
- Retitle to
fix(signals): include recent merged PRs in outcome patterns. - Remove
apps/gittensory-ui/public/downloads/gittensory-extension.zip. - Fix merge conflicts.
- Re-request review after artifact cleanup.
Validation expected:
- Keep CI green.
- Re-run
test/unit/repo-outcome-patterns.test.ts.
Signed-off-by: Chan <101856681+enjoyandlove@users.noreply.github.com>
JSONbored
self-requested a review
June 4, 2026 06:04
Contributor
Author
|
Thank you for merging this PR |
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.
Summary
buildRepoOutcomePatternsiterated onlyargs.pullRequestsand usedrecentMergedPullRequestspurely as an enrichment lookup for PRs alreadypresent. Any PR that existed only in the
recent_merged_pull_requeststablewas silently dropped from every count and rate, collapsing the
outside-contributor merge rate toward zero and falsely triggering
"Outside contributor PRs rarely merge here" risk patterns on healthy repos.
pullRequestsbut present in
recentMergedPullRequestsare appended asbucket: "merged".pullRequeststhat have a non-nullmergedAtin their merged record (mislabelled by the GitHub API at sync time).
evidenceCompletenessratios now use onlypullRequests-sourced records as the denominator — merged-only records arenever eligible for detail sync and must not dilute
filesCompletenessRatio.buildRepoOutcomePatternsignores therecent_merged_pull_requeststable — merge-rate analysis runs almost without merged PRs, falsely flagging healthy repos as "high closure risk" #312,no-double-count invariant, mislabelled-closed reconciliation, and the guard
that
mergedAt: nullmerged records are not incorrectly reconciled.Related to #82.
Does not close it, as it's the parent issue/roadmap.
Scope
CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
actionlint,test:workers,build:mcp,test:mcp-pack,ui:*: change isconfined to
src/signals/engine.ts(pure signal logic, no API routes, no MCPhandlers, no UI). These gates are not impacted by this diff.
Safety
buildRepoOutcomePatternsis an internal signal builder)Notes
maintainerLanedefaults tofalsefor merged-only records becauseRecentMergedPullRequestRecordcarries noauthorAssociation. This is theconservative/correct assumption: the merged history table is populated by the
outside-contributor backfill path. Maintainer-lane PRs tracked in
pullRequestsare still classified correctly via theirauthorAssociation.changedLineCountis0for merged-only records (noPullRequestFileRecordrows exist for them). Size-by-file-count bucketing still works via
filePaths.97.02% branches / 98.99% statements globally.