GH-81: feat(github): export Poller.MarkProcessed for host-side cross-poller skip wiring#82
Merged
Conversation
…skip wiring Hosts that create and execute sub-issues themselves (e.g. epic executors) need to mark issue numbers processed in every poller from outside, to prevent independent re-dispatch and duplicate concurrent executions. MarkProcessed delegates to the existing unexported markProcessed with no behavior change (in-memory map insert + write-through ProcessedStore.Mark).
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
Automated PR created by Pilot for task GH-81.
Closes #81
Changes
GitHub Issue #81: feat(github): export Poller.MarkProcessed for host-side cross-poller skip wiring
Context
The github integration
Pollerkeeps a processed-issues set (in-memory map + write-throughProcessedStore.Mark,sdk/integrations/github/poller.go:1043) sofindOldestUnprocessedIssueskips already-handled issues. The exported surface currently offersClearProcessed,IsProcessed,ProcessedCount, andReset(poller.go:~1510-1547) — but NOTMarkProcessed. The unexportedmarkProcessedexists and is used internally on dispatch.Host applications need to mark issues processed from OUTSIDE the poller: when a host-side epic executor creates sub-issues and runs them sequentially itself, it must mark those issue numbers in every poller so they are not independently dispatched for parallel execution. The in-tree Pilot poller exposes exactly this as a one-line exported wrapper, and its absence in the SDK poller has caused live duplicate concurrent executions of epic children.
Change
Export
MarkProcessedon*Pollerinsdk/integrations/github/poller.go, placed next toClearProcessed:Semantics identical to the internal path: in-memory map insert + write-through
processedStore.Mark("github", p.repoKey(), strconv.Itoa(number))when a store is configured. No other behavior changes.Acceptance Criteria
Poller.MarkProcessed(number int)exported, delegating to the existing unexportedmarkProcessed.MarkProcessed(n):IsProcessed(n) == true, and a poll cycle does not dispatch issuen.ProcessedStore,Markis called with the poller's own repo key (verify via a fake store in a table-driven test).ClearProcessed(n)afterMarkProcessed(n)restores dispatchability (round-trip test).go test ./...green.Out of Scope
ProcessedStoreinterface orcore.PollerDeps.Planned Steps (execute all in sequence)