Skip to content

fix: pr-bug-scan findings from #1424 - #1456

Closed
buf0-bot[bot] wants to merge 1 commit into
mainfrom
bot/pr-bug-scan-1424-1778015347
Closed

buf0-bot[bot] wants to merge 1 commit into
mainfrom
bot/pr-bug-scan-1424-1778015347

Conversation

@buf0-bot

@buf0-bot buf0-bot Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Automated fix-PR from pr-bug-scan for parent #1424.

Fixer summary: Flip parentFieldRetried inside the probe IIFE before resolveProbe() runs, eliminating the race where siblings wake between resolve and flag flip and issue duplicate with-parent probes.
Typecheck: skipped

Findings addressed

  • ✅ [medium] src/main/github/project-view.ts — parentFieldRetried set too late — probe single-flight leaks

This PR was generated by the pr-bug-scan automation and reviewed by an agent reviewer. Human approval required before merge.

Flip parentFieldRetried inside the probe IIFE before resolveProbe() runs, eliminating the race where siblings wake between resolve and flag flip and issue duplicate with-parent probes.
@nwparker

nwparker commented May 6, 2026

Copy link
Copy Markdown
Contributor

Closing in favor of #1514, which re-lands this fix on current main.

Why this PR can't be merged as-is: it branched from 70ffa0a7 (pre-#1465). Its effective diff against current main reverts #1465's owner-keyed parent-field caches (parentFieldRetriedByOwner Set, parentFieldWarningLoggedByOwner Set, parentFieldProbeInFlight Map, ownerScopeKey()) back to global flags, hidden inside ~700 lines of unrelated formatting churn. GitHub flagged it mergeStateStatus: DIRTY for that reason.

The race itself is real on current main (siblings wake between resolveProbe() and the deferred flag flip in the outer block), so #1514 carries forward only the fix — flip parentFieldRetriedByOwner.add(scopeKey) inside the probe IIFE, before resolveProbe().

cc @nwparker — closing as superseded.

@nwparker nwparker closed this May 6, 2026
nwparker added a commit that referenced this pull request May 6, 2026
…1514)

Closes the race where siblings awaiting parentFieldProbeInFlight wake
between resolveProbe() and the deferred parentFieldRetriedByOwner.add()
in the outer block, see parentFieldProbeInFlight=null +
parentFieldRetriedByOwner without scopeKey, and issue duplicate
with-parent probes.

Originally raised in #1456, but that PR branched off pre-#1465 main and
its diff against current main reverted #1465's owner-keyed parent-field
caches back to global flags. This re-applies the fix on current main.

Refs #1456

Co-authored-by: nwparker <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…tablyai#1514)

Closes the race where siblings awaiting parentFieldProbeInFlight wake
between resolveProbe() and the deferred parentFieldRetriedByOwner.add()
in the outer block, see parentFieldProbeInFlight=null +
parentFieldRetriedByOwner without scopeKey, and issue duplicate
with-parent probes.

Originally raised in stablyai#1456, but that PR branched off pre-stablyai#1465 main and
its diff against current main reverted stablyai#1465's owner-keyed parent-field
caches back to global flags. This re-applies the fix on current main.

Refs stablyai#1456

Co-authored-by: nwparker <[email protected]>
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.

1 participant