Skip to content

fleet(github): WS-02 add runner prerequisites for fleet pipeline#6

Merged
Esity merged 2 commits intomainfrom
fleet/ws-02-github-prereqs
Apr 14, 2026
Merged

fleet(github): WS-02 add runner prerequisites for fleet pipeline#6
Esity merged 2 commits intomainfrom
fleet/ws-02-github-prereqs

Conversation

@Esity
Copy link
Copy Markdown
Contributor

@Esity Esity commented Apr 14, 2026

Summary

  • Adds 6 new runner methods to lex-github required by the fleet pipeline (WS-02 from docs/work/ideas/fleet-plans/03-lex-github-prereqs.md)
  • 259 specs pass, 0 rubocop offenses

New Methods

Method Module API
mark_pr_ready PullRequests GraphQL markPullRequestAsReady mutation
get_tree Repositories GET /repos/{owner}/{repo}/git/trees/{sha}
get_file_content Contents GET /repos/{owner}/{repo}/contents/{path}
list_all_pull_request_files PullRequests Paginated GET /pulls/{n}/files (100/page, all pages)
list_pull_request_review_comments PullRequests GET /pulls/{n}/comments (inline review comments)
list_pull_request_commits PullRequests GET /pulls/{n}/commits (per_page: 100, no cache)

Note: list_pull_request_commits replaces the previous cached/paged variant with a simpler version suitable for the fleet validator's stale diff guard (needs fresh data). The original list_pull_request_files (single-page, cached) is preserved alongside the new list_all_pull_request_files.

Design Amendments

Includes the Design Amendment from R3-R7 adversarial review: list_pull_request_review_comments for the fleet validator to check for unresolved human/Copilot review comments.

Also adds fleet contract verification specs to labels_spec.rb confirming add_labels_to_issue(issue_number:) is the correct call site (not add_labels(number:)).

Test Plan

  • Each method has failing spec written before implementation
  • All 259 examples pass (bundle exec rspec)
  • Zero rubocop offenses (bundle exec rubocop)

Add 6 new runner methods required by the fleet pipeline:

- mark_pr_ready: GraphQL mutation to remove draft status from a PR;
  REST has no endpoint for this, so a private graphql_connection
  helper builds a separate Faraday connection to /graphql
- get_tree: fetch recursive repo file tree via Git Trees API
- get_file_content: fetch a single file via Contents API with optional ref
- list_all_pull_request_files: paginated replacement that collects all
  pages (100/page) until exhausted; existing list_pull_request_files
  (single-page, cached) is preserved for backward compat
- list_pull_request_review_comments: GET /pulls/{n}/comments for inline
  code review feedback (distinct from issue comments)
- list_pull_request_commits: simplified version (per_page: 100, no
  cache) replacing the cached/paged variant; fleet validator needs
  fresh data to verify head SHA before review

Also adds fleet contract verification specs to labels_spec confirming
add_labels_to_issue(issue_number:) as the correct fleet call site.

259 examples, 0 failures. 0 rubocop offenses.
@Esity Esity requested a review from a team as a code owner April 14, 2026 01:57
@Esity Esity merged commit 8547a82 into main Apr 14, 2026
11 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