Skip to content

Commit c9b8bb6

Browse files
committed
ci(plugins): gate PluginKit ABI changes against a committed baseline
1 parent bf57b10 commit c9b8bb6

4 files changed

Lines changed: 1994 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: PluginKit ABI Gate
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "Plugins/TableProPluginKit/**"
7+
- "scripts/check-pluginkit-abi.sh"
8+
- ".github/workflows/pluginkit-abi.yml"
9+
10+
jobs:
11+
abi-gate:
12+
name: PluginKit ABI Gate
13+
runs-on: macos-26
14+
timeout-minutes: 20
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Select Xcode
21+
uses: maxim-lobanov/setup-xcode@v1
22+
with:
23+
xcode-version: "26.4.1"
24+
25+
- name: Create Secrets.xcconfig
26+
run: touch Secrets.xcconfig
27+
28+
- name: Check PluginKit ABI against baseline
29+
run: scripts/check-pluginkit-abi.sh

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ When adding a new method to the driver protocol: add to `PluginDatabaseDriver` (
102102

103103
**Bump `currentPluginKitVersion` (in `PluginManager.swift`) and `TableProPluginKitVersion` in every plugin `Info.plist` ONLY for a breaking change**: changing or removing an existing requirement's signature, adding a requirement without a default, adding a case to a `@frozen` enum, or changing a frozen type's layout. Closed value enums in PluginKit are `@frozen` (committed layout, fast, switch-exhaustive without `@unknown default`); the driver protocols and transfer structs stay non-frozen so they can grow. The strict version gate in `validateBundleVersions` still rejects a stale plugin cleanly after a breaking bump (no `EXC_BAD_INSTRUCTION`).
104104

105+
**ABI gate**: `scripts/check-pluginkit-abi.sh` builds TableProPluginKit and diffs its public interface against `Plugins/TableProPluginKit/ABI-Baseline.swiftinterface`. CI runs it on every PR that touches `Plugins/TableProPluginKit/**`. Any ABI change fails the gate until you regenerate the baseline (`scripts/check-pluginkit-abi.sh --update`) and commit it, so the change is visible in review and a breaking one cannot merge without the version bump above.
106+
105107
**Post-ABI-bump checklist (mandatory, breaking bumps only)**: Bumps are now rare (only the breaking changes listed above). After one, every registry-published plugin must be rebuilt against the new ABI. App auto-update reconciliation handles the user-facing recovery, but the registry has to carry binaries for the new PluginKit version first.
106108

107109
1. Commit the bump (updates `PluginManager.swift` and every bundled plugin's `Info.plist`). Bundled plugins ship with the next app release. Do not tag them.

0 commit comments

Comments
 (0)