Skip to content

feat: read_head_check_runs completion port method (Nexus-new #2068) - #513

Merged
James3014 merged 5 commits into
nexus/connector-host-v1from
nexus/head-check-runs-2068
Oct 13, 2026
Merged

James3014 merged 5 commits into
nexus/connector-host-v1from
nexus/head-check-runs-2068

Conversation

@James3014

@James3014 James3014 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Implements the read_head_check_runs(*, head_sha) port method required by Nexus-new #2068 (exact-head Exact-base impact gate before CAS).

  • Host: read_head_check_runs -> GET /repos/{repo}/commits/{sha}/check-runs?filter=latest&per_page=100&page=N, all pages, total_count cross-checked; requested SHA must be 40-hex lowercase; every run's head_sha must equal it; each run returns name/status/conclusion/head_sha/app_slug/app_id.
  • Fail closed: API error, malformed body, short/shifting pagination, SHA mismatch all throw (bridge -> host error). [] only if GitHub reports total_count 0.
  • Bridge: read_head_check_runs returns HeadCheckRunObservation (name,status,conclusion,head_sha). The model is extra=forbid so app slug/id are exposed on HostPort.last_head_check_run_apps; pinning in-loop needs an Nexus-new model change.
  • Tests: node tests + python unittest; typecheck clean. Not merged/deployed.

🤖 Generated with Claude Code

James3014 and others added 5 commits October 13, 2026 19:50
Host + bridge: paginated GET commits/{sha}/check-runs?filter=latest, 40-hex and per-run head_sha validation, app slug/id, fail closed on any error.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolve each GitHub Actions run's workflow file via actions/runs?head_sha (check_suite_id -> path), paginated, fail closed; non-Actions apps get workflow_path ''. Bridge passes app_id/workflow_path into the observation; drop last_head_check_run_apps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…est_target suite test

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@James3014
James3014 merged commit 8f1fe25 into nexus/connector-host-v1 Oct 13, 2026
0 of 7 checks passed
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