[AGT-04] GitHubEventResolver — concrete event-to-claim resolution adapter#8519
Open
an0mium wants to merge 6 commits into
Open
[AGT-04] GitHubEventResolver — concrete event-to-claim resolution adapter#8519an0mium wants to merge 6 commits into
an0mium wants to merge 6 commits into
Conversation
Concrete resolution adapter that turns pre-fetched GitHub event payloads (PR merge, issue close, CI pass/fail) into StakeableClaim resolutions. No live GitHub API calls; all logic is deterministic and testable offline. Advances issue #6065 (AGT-04), sub-deliverable 2 — GitHub event resolution. Flag-gated: ARAGORA_PREDICTION_MARKETS_ENABLED (default OFF). - aragora/prediction/github_event_resolver.py: GitHubEventPayload dataclass, ResolutionResult dataclass, GitHubEventResolver with can_resolve() and resolve_from_event() dispatching to per-type resolvers - tests/prediction/test_github_event_resolver.py: 19 tests covering flag gate, can_resolve semantics, all three question types, non-terminal actions, already-resolved skip, and a full roundtrip with InMemoryStore - aragora/prediction/__init__.py: export new symbols
CI lint check reported 1 file would be reformatted; apply it now.
This was referenced Jun 20, 2026
Contributor
Aragora Code ReviewAdvisory-only review. No issues found. |
prediction module now has py_files=3, test_file_count=2 after adding github_event_resolver.py and its test file. Also picks up concurrent main-branch drift (evaluation moved to integrated, metrics added to deprecated, Python file count 4219→4251, test counts updated).
Collaborator
Claude independent model reviewReviewer: claude (anthropic) — independent adversarial model review via the Aragora Claude reviewer, grounded on the exact PR head. Verdict: PASS
Note (non-finding): the dogfood: yes |
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.
Slice
Adds
GitHubEventResolver— the concrete resolution adapter that converts pre-fetched GitHub webhook event payloads (PR merge, issue close, CI check/workflow) intoStakeableClaimresolutions. This is sub-deliverable 2 of AGT-04; sub-deliverable 1 (StakeableClaimschema andGithubResolutionAdapterStub) is already onmain.Gating
ARAGORA_PREDICTION_MARKETS_ENABLED— same gate as the existing store)What this adds
GitHubEventPayload(frozen dataclass)event_type,action,target_ref,merged,conclusion,rawResolutionResult(frozen dataclass)claim_id,resolved,resolution_value,evidenceGitHubEventResolvercan_resolve(claim, event) → bool+resolve_from_event(claim, event) → ResolutionResult; dispatches to per-type resolvers forPR_MERGE,ISSUE_CLOSE,CI_PASSAll logic is deterministic; no live GitHub API calls. The adapter consumes pre-fetched payloads, making it testable offline and safe to compose with the existing
InMemoryStakeableClaimStore.Tests
TestCanResolve(7 tests) — matching/mismatching event types, target refs,DEPENDENCY_RELEASEunsupported typeTestFlagGate(2 tests) —resolve_from_eventraises when flag off;can_resolveis flag-freeTestPRMergeResolution(5 tests) — merged→YES, closed-no-merge→NO, non-terminal action, already-resolved skip, target-ref mismatchTestIssueCloseResolution(3 tests) — closed→YES, reopened/labeled non-terminalTestCIPassResolution(5 tests) — success/failure/cancelledcheck_run, successworkflow_run, queued non-terminalTestResolverWithStore(2 tests) — end-to-end roundtrips throughInMemoryStakeableClaimStoreValidation
pytest tests/prediction/test_github_event_resolver.py --noconftest— 24 passedast.parse)Out of scope
PyGithubor REST client behind an adapter interface)agt-04-jsonl-claim-storebranch)ResolutionResultis the feed point; wiring waits for AGT-05Generated by Claude Code