sdk-quality-gate
Use before declaring any Supabase C# SDK change done or opening a PR, and as the Verify step of every flow. Runs scripts/quality-gate/gate.sh and reports its verdict. Do not report a change as done without a PASS.
Skill: SDK quality gate
Run the gate and report what it says. CI runs the same script; its stages are listed in scripts/quality-gate/README.md.
scripts/quality-gate/gate.sh packages/<Name> # full gate, before a PR
scripts/quality-gate/gate.sh packages/<Name> --fast # build, format, unit tests, public API
scripts/quality-gate/gate.sh packages/<Name> --mutation # surviving mutants on changed lines
Use packages for every package. The full gate needs a local Supabase (supabase start).
To check mutation before pushing:
(cd packages/<Name>/<Name>.Tests && STRYKER_MUTATION=true dotnet stryker --since:origin/master)
scripts/quality-gate/gate.sh packages/<Name> --mutation
In a git worktree, --since finds no changes: name the files with -m '**/<File>.cs'. A run that tested no mutant is not a pass.
Verdicts
| Verdict | Exit | Meaning |
|---|---|---|
PASS | 0 | Every blocking stage passed. Report done. |
PARTIAL | 0 | --fast, --unit or --e2e: a subset. Not enough to say done. |
INCOMPLETE | 2 | A blocking stage couldn't run. Not done. |
FAIL | 1 | A blocking stage failed. |
Reporting
Paste the gate's summary as printed. Never report a SKIP as a pass. A WARN is a non-blocking stage's finding: report it, it doesn't stop a PASS. Details are in <dir>/.gate/report.json and <dir>/.gate/logs/.
For a public API change, say whether it's additive or a break; a break needs sign-off, [Obsolete] on the old member and an entry under docs/migrations/.
On failure, fix the cause
Not acceptable:
#pragma warning disable, or a lower severity in.editorconfig- changing a test's category so a filter skips it
- deleting a red test, or marking it
[Ignore] - retrying or quarantining a flaky E2E test
- editing
.gate-baseline.jsonto allow more warnings
If a stage fails for a reason outside the change, stop and report it.
Baselines
<package>/.gate-baseline.json holds warnings by code. A change can't add warnings. A change that removes warnings lowers the baseline in the same PR: run the gate with --overwrite-baseline and commit the file.
Every changed production line must be covered by unit tests (Diff coverage). In CI, a PR also fails when a package's line coverage falls more than 0.5 point below master's: a deleted or weakened test. Code that isn't worth testing gets [ExcludeFromCodeCoverage].
What the gate can't check
- Tests assert behavior through the public surface; hard-to-test code gets a better design, not exposed internals.
- Approved wire-shape snapshots are right, not only unchanged.
-
CancellationTokenis honored along the call path. - Code reads as named steps; failures surface as the package's typed exception (CONVENTIONS §9).
- The public surface is minimal and documented; entry points have an
<example>. - Differences from supabase-js are noted in the PR description.
- Commits follow
type(scope): description, scope amongauth,storage,postgrest,realtime,functions,core,supabase, omitted for cross-cutting changes;!before the colon for a break. CI, gate and test-only changes useciortests, neverperforfix: those publish a release.
이 스킬의 파일
이 스킬에는 보조 파일이 없습니다.