Prove that the commits of the head branch reached the base branch. A closed pull request is not a merged one, and merge_commit_sha holds a test merge commit while the pull request is open.

Contract identity.
FactValue
Contract idgithub.pull_request.merged
Version1.0.0
Hashf33214b55e725170
Completion levelmerged
CertificationCommunity
SkillGitHub REST API 0.1.0
Valid for provider API versions2022-11-28

What is the intent?

Get the commits of the head branch into the base branch.

What is the subject and the action?

MemberValue
Subject typegithub.pull_request
Subject identitypull_request_number = $action.result.number
Canonical effectcode.pull_request_open
Provider operationPOST /repos/{owner}/{repo}/pulls
Idempotencynone, retry is not safe

How does the evidence correlate with this operation?

StrategyAssuranceKeysRequired
resource_idstrongpull_request_number from $action.result.numberyes
fingerprintweakhead from $input.head; base from $input.baseno

Which evidence does the contract require?

Minimum evidence level E2. An independent channel is required. Minimum channels: 1.

ChannelLevelIndependenceVerifierDescription
pull_request_readbackE2provider readbackhttpRead the pull request from the provider. A condition path is $observed.pull_request_readback.merged.
pull_request_merged_eventsE3provider eventwebhookThe pull_request.closed events of this pull request that carry merged true. The webhook verifier returns {events, count, latest, earliest, types, duplicates_dropped}. A condition reads $observed.pull_request_merged_events.count.
pull_request_opened_eventsE3provider eventwebhookThe pull_request.opened events for the head branch since the operation started. The webhook verifier returns {events, count, latest, earliest, types, duplicates_dropped}. A count above one shows a second pull request, and the REST API has no idempotency key to stop it.

Which conditions must all hold for VERIFIED?

ConditionMeaningPathOperatorExpectedEvidence
pull_request_mergedThe pull request resource states merged true. The state member alone does not separate a merge from a close.$observed.pull_request_readback.mergedeqtruepull_request_readback
pull_request_merged_in_windowThe provider merged the pull request after the operation started.$observed.pull_request_readback.merged_attime_after$operation.created_atpull_request_readback
pull_request_base_matchesThe commits went into the base branch that the intent named.$observed.pull_request_readback.base.refeq$input.basepull_request_readback
pull_request_merge_eventAt least one pull_request.closed event of this pull request carries merged true.$observed.pull_request_merged_events.countgte1pull_request_merged_events

Which conditions give CONTRADICTED?

ConditionClassReasonPathOperatorExpected
pull_request_on_wrong_basewrong subjectThe pull request targets a different base branch than the intent named.$observed.pull_request_readback.base.refne$input.base
pull_request_from_wrong_headwrong subjectThe pull request carries a different head branch than the intent named.$observed.pull_request_readback.head.refne$input.head
pull_request_predates_operationpre existing stateThe pull request is older than the operation. It proves nothing.$observed.pull_request_readback.created_attime_before$operation.created_at
duplicate_pull_request_presentduplicate side effectGitHub opened more than one pull request for the head branch since the operation started. Do not retry.$observed.pull_request_opened_events.countgt1

Which observed states map to a verdict before completion?

RuleMatchVerdictReason
still_open$observed.pull_request_readback.state eq "open"PENDINGThe pull request is still open. The runtime observes again later.

How long does the runtime observe?

Timing memberValue
Initial delay1000 ms
Poll interval5000 ms
Backoffexponential factor 2, max 60000 ms
Maximum attempts40
Timeout604800000 ms
Stale read window20000 ms
On timeoutUNVERIFIABLE (evidence_unavailable_before_timeout), escalated to a person

Where do these rules come from?

  • github.openapi#/components/schemas/pull-request/properties/merged: github.openapi, retrieved 2026-09-08
  • github.openapi#/components/schemas/pull-request/properties/merged_at: github.openapi, retrieved 2026-09-08
  • github.docs.pulls#pull-requests/the-test-merge-commit: github.docs.pulls, retrieved 2026-09-08
  • github.docs.pulls#pull-requests/merge-a-pull-request: github.docs.pulls, retrieved 2026-09-08
  • github.docs.pulls#pull-requests/the-state-of-a-pull-request: github.docs.pulls, retrieved 2026-09-08
  • github.openapi#/components/schemas/pull-request/properties/base: github.openapi, retrieved 2026-09-08
  • github.events#/events/pull_request.closed: github.events, retrieved 2026-09-08
  • github.docs.pulls#pull-requests/events: github.docs.pulls, retrieved 2026-09-08

Can github.pull_request.merged return VERIFIED from the action response alone?

No. The minimum evidence level is E2. The action response is E1. The completion conditions read pull_request_readback and pull_request_merged_events.

What happens after the timeout?

The verdict is UNVERIFIABLE with the reason evidence_unavailable_before_timeout. The operation goes to a person for review.