Skip to content

chore(release): v0.6.0 - #88

Merged
lanfermann-release-bot[bot] merged 2 commits into
mainfrom
release/v0.6.0
Jul 6, 2026
Merged

chore(release): v0.6.0#88
lanfermann-release-bot[bot] merged 2 commits into
mainfrom
release/v0.6.0

Conversation

@lanfermann-release-bot

Copy link
Copy Markdown
Contributor

Promotion PR for v0.6.0.

Merging this releases it: release.yml tags v0.6.0, builds + signs + notarizes the DMG, uploads it to the GitHub release, updates the Homebrew cask, and syncs stage back from main.

jaylann and others added 2 commits July 6, 2026 17:08
#86)

## What

Lands the structural fix for #83: one batched **GraphQL** query per
account replaces the per-PR REST hydration N+1.

Each poll hydrated every distinct open PR with up to 3 REST calls (`GET
pulls/{n}` + `commits/{sha}/check-runs` + `pulls/{n}/reviews`) plus a
per-repo permission fetch — on a large inbox (measured ~193 req for one
cold refresh of a 76-PR inbox) this could exhaust the core 5000-req/hr
limit. A new `pullRequestBatch` on the `GitHubAPI` protocol fetches
detail + reviews + check-runs **+ the viewer's repo merge signals** for
all PRs in one query.

## Design principle: transport swap, not a logic rewrite

The GraphQL client maps the response back onto the existing decoded
value types (`PullRequestDetail` / `PullRequestReview` / `CheckRun` /
`RepoMergeInfo`), so the store's unchanged `deriveGate` / `ciRollup` /
`checkRowModel` derivation consumes a batched result identically.
Everything downstream (gates, CI banners, hydration marks,
notifications) is untouched.

## Fallback (GHE + robustness)

- **On by default**; any GraphQL failure (a GHE server missing
`mergeStateStatus`, a transport error) auto-falls-back to the per-PR
REST path **per account**.
- Per-node nulls (a repo/PR the viewer can't resolve) degrade to a REST
retry for that one PR.
- The REST path (incl. `hydrateRepoPermissions` and the `updated_at`
short-circuit) is retained verbatim as the fallback.

## Files

- `GitHubGraphQLQuery.swift` *(new)* — aliased batch query builder +
internal chunking (25 PRs/query).
- `GraphQLPRMapping.swift` *(new)* — response decode + mapping (incl.
legacy `StatusContext` → `CheckRun`, `mergeStateStatus` →
`mergeable_state`, `viewerPermission` → `canMerge`).
- `AppConfig.graphQLURL(forAPI:)` — public + GHE endpoint derivation.
- `AppStoreHydration.swift` — GraphQL fast path in the drain with REST
fallback; folds each bundle's repo merge info into `repoMergeInfo` so a
later gate-only refresh after approve still finds it.
- `AppStore.useGraphQLBatch` flag (default true; tests flip it to
exercise the REST short-circuit).

## Tests

- `GraphQLPRMappingTests` — decode/map a canned response: bundle fields,
`mergeStateStatus` mapping table, CheckRun + StatusContext → rollup,
per-node null tolerance, top-level `errors` → throw, query builder +
chunking + slug split.
- `AppConfigWebHostTests` — GraphQL endpoint (public + GHE + port +
fallback).
- `AppStoreTests` — batch path hydrates via one round-trip (no per-PR
REST), and `batchError` → REST fallback still hydrates.
- Existing REST short-circuit tests pinned to `useGraphQLBatch = false`.
- Full suite: **280 tests, 0 failures**; `just check` clean.

Closes #83
@lanfermann-release-bot
lanfermann-release-bot Bot requested a review from jaylann as a code owner July 6, 2026 15:08
@lanfermann-release-bot lanfermann-release-bot Bot added this to the v0.6.0 milestone Jul 6, 2026
@lanfermann-release-bot
lanfermann-release-bot Bot merged commit 16e2cab into main Jul 6, 2026
7 checks passed
@lanfermann-release-bot
lanfermann-release-bot Bot deleted the release/v0.6.0 branch July 6, 2026 15:10
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