Repository navigation
chore(repo): restructure into packages/ monorepo layout - #93
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
grdsdev
approved these changes
Aug 26, 2026
spydon
force-pushed
the
chore/monorepo-restructure
branch
from
August 26, 2026 14:10
5f5452f to
f4fdb82
Compare
Merged
spydon
added a commit
that referenced
this pull request
Aug 27, 2026
## What Empty commit carrying a `Release-As: 1.3.0` footer, to force release-please to cut a `v1.3.0` tag. ## Why Two commits have landed since `v1.2.0`, and neither is releasable by release-please: | Commit | Subject | Why no bump | |---|---|---| | `32e39e9` | Compliance checking tooling and infrastructure for Go (#92) | no conventional commit prefix | | `2097c67` | `chore(repo):` restructure into packages/ monorepo layout (#93) | `chore` does not bump | So no release PR was opened and there is no post-restructure tag. That blocks the SDK repos: `supabase-flutter` and `supabase-swift` pin `v1.2.0`, `supabase-js` and `supabase-py` pin `v1.1.1`, all pre-restructure. Their pinned workflow bodies hardcode `_sdk-spec/scripts/...` while the composite actions they call are `@main` and check out this repo at `main`, so the transitional `scripts/` symlinks are currently load-bearing. A `v1.3.0` tag gives those repos something to bump to, after which `scripts/` can be deleted. Minor rather than patch because #92 added the Go compliance tooling, a new feature. The externally consumed interface (reusable workflow names, composite action names and inputs) did not change in #93. ## Note The generated changelog entry for 1.3.0 will be thin, since the two underlying commits are not changelog-eligible. Worth hand-editing the release notes afterwards to mention the Go tooling and the `packages/` restructure. Release-As: 1.3.0
This was referenced Aug 27, 2026
spydon
added a commit
to supabase/supabase-flutter
that referenced
this pull request
Aug 28, 2026
## What Bumps the pinned `supabase/sdk` reusable workflow ref from `v1.2.0` to `v1.3.0`, in both `validate-capabilities.yml` and `sync-compliance.yml`. ## Why `supabase/sdk` was restructured into a `packages/` monorepo layout ([supabase/sdk#93](supabase/sdk#93)), moving `scripts/capability-matrix` to `packages/capability-matrix` and `scripts/dart_symbol_extractor` to `packages/dart-symbol-extractor`. Pinning there is not fully hermetic: the pinned workflow body comes from the tag, but the composite actions it calls are referenced `@main` and check out `supabase/sdk` at `main`. So on `v1.2.0` we get a post-restructure checkout combined with a workflow body that still hardcodes `_sdk-spec/scripts/...`. That only works today because `supabase/sdk` carries transitional `scripts/` → `packages/` symlinks, which are there purely for pinned callers like this one and are meant to be deleted. Bumping to `v1.3.0` puts the workflow body and the checked-out layout back in agreement, and lets those symlinks be removed upstream. ## Risk Low. Between `v1.2.0` and `v1.3.0` the reusable workflows changed **only** in these `scripts/` → `packages/` paths. No input was added, removed, renamed, or given a new default, so this is a pure ref bump with no call-site changes needed. Worth confirming the compliance check job goes green here before merge, since that is the actual thing being verified. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated automated compliance and capability validation workflows to use the latest validation standards. * Improved consistency and reliability of ongoing project checks. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
spydon
added a commit
that referenced
this pull request
Aug 28, 2026
##⚠️ Do not merge until all four caller bump PRs are merged This PR removes the compatibility layer that pinned callers depend on. Merging it early breaks the compliance check on any SDK repo that has not yet bumped. | Repo | Bump PR | Status | | --- | --- | --- | | supabase-flutter | supabase/supabase-flutter#1780 | open, CI green | | supabase-swift | supabase/supabase-swift#1297 | open, CI green | | supabase-js | supabase/supabase-js#2636 | open, CI green | | supabase-py | supabase/supabase-py#1595 | open, CI green | `supabase-go` already tracks `@main` and needs nothing. ## What Removes the two transitional symlinks left behind by the `packages/` restructure (#93): ``` scripts/capability-matrix -> ../packages/capability-matrix scripts/dart_symbol_extractor -> ../packages/dart-symbol-extractor ``` With both gone, `scripts/` is empty and disappears. Follow-on cleanup of the same concept: - **`README.md`** — drops the `scripts/` entry from the repository layout block. - **`CLAUDE.md`** — drops the paragraph explaining the symlinks and when to remove them. - **`sdk-ref` input descriptions** (5 reusable workflows + 2 composite actions) — reworded from "Ref to checkout from supabase/sdk for scripts" to "... for tooling", since `scripts` no longer names anything. Description-only, not part of the call contract. Easy to drop from this PR if you would rather keep the diff to the symlinks alone. ## Why the symlinks existed Pinning to these reusable workflows is not fully hermetic: the pinned workflow body comes from the tag, but the composite actions it calls are referenced `@main` and check out this repo at `main`. After the restructure, a caller pinned to `v1.2.0` therefore combined a post-restructure checkout with a workflow body still hardcoding `_sdk-spec/scripts/...`. The symlinks bridged exactly that gap. `v1.3.0` was cut (#97, #98) to give callers a post-restructure ref to pin to, which is what the four PRs above do. ## Verification - `npm run validate` — OK - `npm test` — 195 passed (14 files) - `npm run typecheck` — clean - `git grep "scripts/"` — no matches anywhere in the repo The four caller PRs are the real proof: each one's own compliance run resolves the `packages/` paths against a `main` checkout, and all four passed. ## Note for later This class of breakage recurs whenever a path referenced by a pinned workflow body moves, because the composite actions float on `@main`. Pinning the `sdk-compliance-*` action refs alongside the workflow ref, or having the workflows resolve tooling paths dynamically, would make pinning actually hermetic. Out of scope here.
spydon
added a commit
that referenced
this pull request
Aug 28, 2026
… SHA (#107) ## What Restructures the five reusable `validate-sdk-compliance-*` workflows so that the composite actions and the capability spec are resolved from the single supabase/sdk commit the caller pinned the workflow at (`job.workflow_sha`), instead of being referenced remotely by a hardcoded SHA or `@main`. Each job now checks out supabase/sdk once into `_sdk-spec` at `inputs.sdk-ref || job.workflow_sha` and references the actions locally (`./_sdk-spec/.github/actions/...`). The actions' own spec checkouts become transitional no-ops when `sdk-ref` is empty. ## Why The supabase-go compliance job broke on every PR ([example run](https://github.com/supabase/supabase-go/actions/runs/33156922333/job/98801800438?pr=55)): ``` An error occurred trying to start process '/usr/bin/bash' with working directory '.../_sdk-spec/scripts/capability-matrix'. No such file or directory ``` Root cause: `validate-sdk-compliance-go.yml` pins its composite actions to the v1.2.0 SHA (`29e402da`), whose steps still use the pre-monorepo `scripts/capability-matrix` paths, while the actions check out the spec at `sdk-ref` defaulting to `main`. #93 restructured the repo into `packages/` with compatibility symlinks, and #102 removed the symlinks, so the frozen action code and the floating spec checkout diverged. `uses:` cannot carry an expression, so a reusable workflow cannot remotely reference its sibling actions at its own SHA. The Go workflow worked around that with a hardcoded previous-release SHA that #93 forgot to bump; the other language workflows used `@main`, which hides the same skew and defeats the callers' SHA pins. Checking the repo out at `job.workflow_sha` (the pattern `sync-sdk-compliance.yml` already uses) and referencing the actions locally removes the entire failure class: workflow, action code, and spec always come from one immutable commit. ## Compatibility - Consumers pinned to v1.3.0 and earlier keep working: those workflow versions reference the actions remotely and always pass a non-empty `sdk-ref`, which now triggers the actions' transitional self-checkout path (against `main`, whose layout matches). The transitional steps and the actions' `sdk-ref` inputs can be deleted once every consumer is on the new release. - `sdk-ref` on the workflows remains as an explicit override for pre-merge testing; its default changes from `main` to the called workflow's SHA. - supabase-go stays broken until it bumps: its pinned v1.3.0 Go workflow references the actions at the v1.2.0 SHA, which no ref can fix from the caller side alone. Pinning `sdk-ref: v1.3.0` there is the only stopgap. ## Follow-up after merge 1. Cut a release (v1.4.0) including this change. 2. Bump the reusable-workflow pins in supabase-go (dropping its `sdk-ref: main` override), then supabase-flutter, supabase-js, supabase-py, supabase-swift. 3. Once all consumers are bumped, remove the transitional `sdk-ref` handling from the two composite actions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Restructures the repository into a lightweight monorepo (no Nx or similar tooling): one
packages/directory of flat sibling packages, each with a single toolchain.All moves use
git mv, so history follows the files. The capability data (capabilities/,specs/,schema/,docs/) now lives inside the package that consumes it, and the TypeScript root-resolution helpers (repoRoot()incli.ts,compliance-cli.ts,aggregate.ts,generate-site.ts,sync-compliance-cli.ts) were changed to apackageRoot()that resolves one level up fromsrc/. GitHub blob URLs emitted by the tools (spec links in the site, the drift-check docs link) were updated to the new paths. The Go extractor'sgo.modmodule path was updated togithub.com/supabase/sdk/packages/go-symbol-extractor.Rationale
packages/directory keeps the repository ready to host more projects (the postgrest-typegen scaffold is the first addition) without adopting workspace or monorepo build tooling.External interface: unchanged
.github/workflows/and.github/actions/did not move, and no externally consumed name changed:validate-sdk-compliance-{dart,javascript,python,swift,go}.ymlandsync-sdk-compliance.ymlkeep their exact names and locations (called by supabase-flutter/js/py/swift assupabase/sdk/.github/workflows/<name>@<ref>).sdk-compliance-{validate,check-setup,check-symbols,check-drift}composite actions keep their exact names and locations (referenced assupabase/sdk/.github/actions/<name>@main).working-directory/path reference flipped from_sdk-spec/scripts/...to_sdk-spec/packages/...in this same commit, so the composite actions and the scripts they check out flip together atomically.grep -r "scripts/" .github/returns nothing.Compatibility symlinks: the SDK repos pin the reusable workflows to release SHAs (v1.1.x/v1.2.0) while the
sdk-refinput for the_sdk-speccheckout defaults tomain. Those pinned workflow definitions reference_sdk-spec/scripts/...inline, so the old paths must keep resolving in amaincheckout.scripts/capability-matrixandscripts/dart_symbol_extractorare therefore kept as symlinks intopackages/. They can be removed once every caller has bumped past the restructure release (Dependabot picks up the next tag). No symlink is needed for the Go extractor:validate-sdk-compliance-go.ymlis newer than the latest release, so no caller pins a pre-monorepo revision of it (verified by code search).Internal workflow renames
Two workflows are only triggered inside this repo and were renamed with a project prefix (verified via code search that no external repository references them):
validate-capabilities.yml→capability-matrix-validate.yml(display nameValidate Capabilitieskept, sincerelease.ymltriggers on it viaworkflow_run)deploy-pages.yml→capability-matrix-deploy-pages.ymlPath filters and
working-directoryvalues in both now usepackages/capability-matrix/**,packages/dart-symbol-extractor/**, andpackages/go-symbol-extractor/**. The Pages build now aggregates and uploads frompackages/capability-matrix/site/.Docs were updated accordingly: the root README is now a repository overview with a package index (the capability-matrix content moved to
packages/capability-matrix/README.md), plus path updates in CONTRIBUTING.md, CLAUDE.md, CODEOWNERS (per-directory package ownership),.gitignore, and the capability-matrix project skill. Action pins are untouched.Test results
packages/capability-matrix:npm ci,npm test(14 files, 195 tests passed),npm run typecheck,npm run validateall pass.packages/dart-symbol-extractor:dart pub get,dart test(14 tests passed),dart format(no changes),dart analyze(no issues).packages/go-symbol-extractor:gofmt(no changes),go vet,go test ./...all pass.npm run validate,npm run report, andnpm run validate-complianceagainst supabase-flutter'ssdk-compliance.yamlfromscripts/capability-matrix, anddart run bin/extract.dartagainst a local supabase-flutter checkout fromscripts/dart_symbol_extractor, all work.npm run build-siterenders topackages/capability-matrix/site/index.html(gitignored).Post-merge verification
After merge, trigger one caller repository's compliance workflow (for example supabase-flutter's
validate-capabilities.ymlviaworkflow_dispatch) to confirm the cross-repository paths: the pinned reusable workflow should resolve the oldscripts/paths through the symlinks, and the@maincomposite actions should resolve the newpackages/paths.