Skip to content

fix(ci): read the capability spec at the caller's pinned workflow ref - #87

Merged
spydon merged 2 commits into
mainfrom
fix/sync-spec-ref
Aug 18, 2026
Merged

spydon merged 2 commits into
mainfrom
fix/sync-spec-ref

Conversation

@spydon

@spydon spydon commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

sync-sdk-compliance.yml defaulted sdk-ref to a hardcoded commit, faba359a from 2026-07-20, so the sync always read the capability spec from that frozen snapshot. The matching validate workflows read the spec from main.

Any capability ID renamed or removed upstream after that snapshot therefore got re-inserted into every SDK's sdk-compliance.yaml on every weekly sync, and the validate check then rejected it as an unknown feature ID. The pin also meant capabilities added after 2026-07-20 were never synced at all.

This is what broke supabase/supabase-flutter#1726, which added five IDs that 9c53a702 (#74) had already renamed or split:

Synced ID (from the frozen snapshot) Current canonical
auth.sign_in.reset_password auth.sign_in.send_password_reset_email
realtime.channel.send realtime.channel.broadcast
storage.file_buckets.list_files_paginated removed
storage.analytics.iceberg_namespace split into create_namespace / list_namespaces / delete_namespace
storage.analytics.iceberg_table split into create_table / list_tables / load_table / update_table / rename_table / delete_table

Every repo calling this workflow was producing the same broken pull request.

Fix

Check the spec out at job.workflow_sha, the commit of this reusable workflow as the caller pinned it. The spec now tracks the workflow version, so bumping the @sha pin in a caller repo also bumps the spec, and the sync can never insert an ID that did not exist at that version.

The sdk-ref input is removed rather than re-defaulted. None of the three callers (supabase-js, supabase-swift, supabase-flutter) pass it, none of them expose a workflow_dispatch pass-through that could, and its only remaining purpose would be to reintroduce the skew this fixes. Removing a workflow_call input is breaking in principle, but with no caller using it there is nothing to break, and callers need a pin bump for this fix regardless.

The sdk-ref input on the validate-sdk-compliance-* workflows is untouched. Those default to main, which is the mirror image of this problem, and are a separate question.

Follow-up

Caller repos need a pin bump to pick this up, since the fix lives in the workflow they pin. Under the current fix: title this releases as a patch. The already-open sync pull requests carrying the stale IDs should be closed and re-run after the bump.

Worth confirming on that first run that the _sdk-spec checkout resolves to the pinned SHA rather than main. If job.workflow_sha ever came back empty, actions/checkout would silently take the default branch instead of failing.

…as called at

The sync workflow defaulted `sdk-ref` to a hardcoded commit from 2026-07-20,
so it inserted capability IDs from a spec snapshot that never moved, while the
validate workflow checks the same file against `main`. Any ID renamed or removed
upstream since that snapshot came back on every sync, and validation rejected it
as an unknown feature ID.

Default to `job.workflow_sha` instead, which is the commit of this reusable
workflow as the caller pinned it. Bumping the pin now also bumps the spec.
@spydon
spydon requested review from a team as code owners August 18, 2026 08:04
@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c5c3e48f-4e2f-44ed-a787-77b65497ff90


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

No caller passes it, and its only remaining purpose would be to
reintroduce the spec/workflow skew this branch fixes. Read the spec
directly at job.workflow_sha instead.
@spydon spydon changed the title fix(ci): check out the capability spec at the ref the sync workflow was called at fix(ci): read the capability spec at the caller's pinned workflow ref Aug 18, 2026
@spydon
spydon merged commit f51a1ec into main Aug 18, 2026
2 checks passed
@spydon
spydon deleted the fix/sync-spec-ref branch August 18, 2026 09:19
spydon pushed a commit that referenced this pull request Aug 18, 2026
🤖 I have created a release *beep* *boop*
---


## [1.1.1](v1.1.0...v1.1.1)
(2026-08-18)


### Bug Fixes

* **ci:** read the capability spec at the caller's pinned workflow ref
([#87](#87))
([f51a1ec](f51a1ec))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
spydon added a commit to supabase/supabase-flutter that referenced this pull request Aug 18, 2026
## What

Bumps both `supabase/sdk` reusable workflow pins from v1.0.0
(`93b52588`) to v1.1.1 (`63c1ac1d`):

- `.github/workflows/sync-compliance.yml` → `sync-sdk-compliance.yml`
- `.github/workflows/validate-capabilities.yml` →
`validate-sdk-compliance-dart.yml`

## Why

v1.0.0 of the sync workflow read the capability spec from a hardcoded
commit, `faba359a` from 2026-07-20. Every weekly run therefore
re-inserted capability IDs that had since been renamed, split, or
removed upstream, and the validate check then rejected them as unknown
feature IDs. That is what produced #1726. Capabilities added after that
date were never synced at all.

supabase/sdk#87 fixed this by checking the spec out at
`job.workflow_sha`, the commit of the reusable workflow as pinned here,
so the spec now tracks this pin. The fix only takes effect once the pin
is bumped, which is what this PR does.

## Notes

The only change to `.github/` between v1.0.0 and v1.1.1 is that sync
workflow fix, so the `validate-sdk-compliance-dart.yml` bump is a no-op
in behavior and just keeps both pins on the same version.

#1726 carries the stale IDs from the frozen snapshot and should be
closed once this lands, then the sync re-run to regenerate it against
the canonical spec.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated compliance and capability validation workflows to use the
latest validation workflow version.
  * Improved the reliability of automated SDK checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

2 participants