290 Commits

Author SHA1 Message Date
clockwork-labs-bot eb5b287c95 Restore CLA Gate status publishing (#5329)
# Description of Changes

Restores `CLA Gate` as a repository-owned commit status on the actual
target SHA.

The merged workflow tried to use the Actions job result for `status`
events. Those runs are attached to the default-branch SHA, so a
`license/cla` status on a PR head can trigger the workflow without
creating any required context on the PR commit. This change mirrors the
`license/cla` result back to `CLA Gate` on the PR or merge-group SHA.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1. This is a narrow workflow fix for the required CLA check context.

# Testing

- [x] Ruby YAML parse for `.github/workflows/cla-gate.yml`
- [x] `git diff --check`
- [ ] Confirm a new `license/cla` status posts `CLA Gate` on the same PR
head SHA

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-06-15 20:03:33 +00:00
clockwork-labs-bot b0a8070c95 Simplify CLA gate workflow (#5316)
## Summary
- keep the CLA Gate workflow using `cargo ci cla-assistant status` for
CLA Assistant lookups
- stop mirroring pull request/status `license/cla` results into a custom
`CLA Gate` commit status
- use a plain `pull_request` trigger for PR checks, and keep merge-group
status publishing for synthetic queue SHAs
- let the Actions job pass when `license/cla` is success and fail when
it is missing or non-success

## Notes
Merge-group handling is left as-is. This PR intentionally keeps the
helper command and only changes the workflow behavior needed to avoid
the custom status mirror on PR/status events.

## Testing
- `cargo fmt --all`
- `cargo check -p ci`
- `cargo ci self-docs --check`
- Ruby YAML parse
- `git diff --check`

`actionlint` unavailable locally.

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-06-15 01:26:58 +00:00
clockwork-labs-bot 0306826613 Announce GitHub releases in Discord (#5314)
## Summary
- Add a Discord announcement job for published GitHub releases.
- Use `DISCORD_WEBHOOK_RELEASE_CHANNEL_URL` so the target channel can be
configured as a GitHub secret.
- Run the announcement job even if Docker `latest` retagging fails, and
include the retag result in the message.

## Verification
- `ruby -e 'require "yaml";
YAML.load_file(".github/workflows/tag-release.yml")'`
- `git diff --check`

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2026-06-14 22:55:03 +00:00
clockwork-labs-bot d93b381719 Add CLA gate status wrapper (#5299)
## Summary
- Add a CLA Gate workflow that publishes a repository-owned commit
status.
- Mirror CLA Assistant license/cla status on pull requests and status
events.
- Publish CLA Gate=success on merge_group runs, because entries have
already passed PR checks before entering the queue.

## Required settings change after merge
 - Remove license/cla from required checks.
 - Add CLA Gate as the required CLA check.

This keeps CLA enforcement before merge queue while removing CLA
Assistant from the merge-group critical path.

## Test plan
 - Parsed .github/workflows/cla-gate.yml with Ruby YAML loader.
 - Ran git diff --check.

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2026-06-14 22:26:28 +00:00
clockwork-labs-bot 11276aa839 Nest CLA Assistant retry command (#5313)
## Summary
- Move `cargo ci retry-cla-assistant` under `cargo ci cla-assistant
retry`.
- Rename the helper module to `cla_assistant.rs`.
- Update the Retry CLA Assistant workflow and generated `cargo ci` docs.

## Verification
- `cargo fmt --all`
- `cargo check -p ci`
- `cargo ci self-docs --check`
- `git diff --check`

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-06-14 20:08:59 +00:00
joshua-spacetime b53d3afc70 Move index scan tests into benchmark job (#5298)
# Description of Changes

Moves `test_index_scans` to its own job that uses the same runner as the
keynote benchmark.

This test had several issues:
1. It was a performance regression test that didn't run in an isolated
environment because it was just a test.
2. It measured timings by search the module log for `ns`(nanosecond) and
`us`(microsecond) suffixes

As a result it would occasionally flake.

Now it runs on dedicated hardware in an isolated environment, so we
shouldn't see anymore flakes.

# API and ABI breaking changes

N/A

# Expected complexity level and risk

1

# Testing

N/A
2026-06-13 02:56:06 +00:00
John Detter 99bc436fe0 Cross compile CLI binaries for ARM (#5176)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

The objective here is to get rid of the arm runner that we have deployed
which is very much underutilized and sometimes during the release is the
bottleneck because it can only run a small amount of jobs at any given
time. Instead, we will cross compile to ARM on our existing x86 github
runner fleet.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None - CI only change.

# Expected complexity level and risk

1 - CI only change

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

https://github.com/clockworklabs/SpacetimeDB/actions/runs/26833018052
2026-06-11 14:14:08 +00:00
Zeke Foppa 4ca987e250 Remove cargo bump-versions (#5157)
# Description of Changes

(Moving this to a tools repo)

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-06-10 19:07:22 +00:00
clockwork-labs-bot edfab0febd Add CLA Assistant retry workflow (#5234)
## Summary
- Add a small `Retry CLA Assistant` workflow for cases where
`license/cla` is missing or pending after the normal PR checks have gone
green.
- Keep the workflow thin: it checks out trusted default-branch code,
determines the PR number from the GitHub event, and runs `cargo ci
retry-cla-assistant --pr-number <number>`.
- Put the retry gate and CLA Assistant recheck call in the existing Rust
`tools/ci` crate.
- Trigger it from PR updates, any workflow completion, manual dispatch
with a PR number, and a 15-minute scheduled fallback sweep.

## Behavior
The workflow passes explicit PR numbers into the Rust command. For
scheduled runs, it enumerates open `master` PRs in the workflow and
invokes the Rust command for each one.

The `cargo ci retry-cla-assistant --pr-number <number>` command only
calls CLA Assistant's recheck endpoint when the PR is open, non-draft,
targets `master`, the head SHA is at least 10 minutes old, at least one
check run exists, all reported check runs are green, no non-CLA commit
status is non-green, and `license/cla` is missing/pending/failing.

The `workflow_run` trigger is intentionally unfiltered, so adding or
renaming CI workflows does not require changing this workflow.

It calls
`https://cla-assistant.io/check/{owner}/{repo}?pullRequest={number}` and
polls `license/cla` for up to 3 minutes.

## Safety
- The workflow uses `pull_request_target`, but it does not check out or
execute PR code. It checks out the trusted default branch before running
the CI tool.
- It ignores completion of the `Retry CLA Assistant` workflow itself.
- It intentionally does not forge a `license/cla` status.

## Validation
- Parsed the workflow YAML locally with Ruby/Psych.
- Ran `cargo fmt --package ci`.
- Ran `cargo check -p ci`.
- Ran `cargo ci retry-cla-assistant --help` and verified `--pr-number`
is required.
- Tested the first Rust version against live PR #5164 metadata and
caught that a hard-coded required-check list was too strict; replaced
that list with a reported-checks-all-green gate.

Addresses #5215.

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2026-06-08 17:15:13 +00:00
bradleyshep 7a2a697ee4 CI - fix LLM benchmark workflows (#5181)
# Description of Changes

Updates `llm-benchmark-periodic.yml` and
`llm-benchmark-validate-goldens.yml` to new CI infrastructure.

- Switch to the current runner (`spacetimedb-new-runner-2`)
- Drop the dead `localhost:5000` container + `--privileged`
- Build the local SpacetimeDB server the benchmark harness needs, and
use that
  same local CLI for publishing

# API and ABI breaking changes

None. CI-only.

# Expected complexity level and risk

1 — workflow-only, no production code.

# Testing

- [ ] Run both workflows via `workflow_dispatch` and confirm they pass
2026-06-05 13:01:21 +00:00
Zeke Foppa 4f61901d0e CI - RUST_BACKTRACE=full (#5146)
# Description of Changes

Set `RUST_BACKTRACE=full` for the CI jobs.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-06-03 04:14:12 +00:00
Lisandro Crespo 50c821810a Godot Blackholio completion (#5030)
# Description of Changes
- Completes the Blackholio demo with username selection, leader board,
split mechanic, improved visuals...
- Add Godot tests

# API and ABI breaking changes
- Nothing

# Expected complexity level and risk
1. It just updates the Blackholio demo project

# Testing
- [X] Play the updated demo
- [X] Run the tests locally
2026-06-02 13:33:49 +00:00
Zeke Foppa d31301a8f6 Move Internal Tests to its own workflow (#5147)
# Description of Changes

Moving `Internal Tests` to its own workflow so it can be canceled and
re-run independently from the rest of CI.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

1

# Testing
- [x] `Internal Tests` succeed on this PR and appear to have run
properly

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-29 20:49:12 +00:00
Tyler Cloutier 13a2ffd10f CI: skip Internal Tests dispatch for docs-only changes (#4995)
## Summary

- Add a `dorny/paths-filter` step to the `internal-tests` job that
checks for any changed file outside `docs/`.
- Gate the private-repo dispatch and the wait-for-completion steps on
that filter, so a docs-only PR no longer fires off the private CI
workflow.
- The job itself still runs and completes successfully, so any branch
protection requiring the `Internal Tests` check continues to be
satisfied.

## Test plan

- [ ] Open a docs-only follow-up PR and confirm `Internal Tests` reports
success without dispatching a private run.
- [ ] Open a PR touching `crates/` (or anything non-docs) and confirm
the private dispatch still fires as before.
2026-05-29 13:29:03 +00:00
joshua-spacetime 4cf01ed964 Add required ci check for keynote-2 benchmark (#5078)
# Description of Changes

Adds a new required ci check for keynote-2 benchmark regressions. The
test runs for 60s and fails if throughput < 300K TPS.

Note, this check will be flaky as long as it's running concurrently with
other CI jobs. It may need a dedicated runner/host machine. Although it
may be sufficient to only schedule one runner/VM to a single host
machine at a time. I'll need to sync with @jdetter to determine the best
way forward here.

UPDATE: We're using a dedicated runner. See the **Testing** section.

# API and ABI breaking changes

N/A

# Expected complexity level and risk

2

Mainly copy-paste from the other CI workflows.

# Testing

This job now uses `spacetimedb-benchmark-runner` which is entirely
dedicated to this one CI job. I've tested this at different times of the
day when the CI runners are under load and not. The performance is
consistent and the test isn't flaky. It has passed every time.
2026-05-28 19:16:45 +00:00
Lisandro Crespo b955d39a83 Godot SDK and Blackholio tutorial (#4920)
# Description of Changes
Very small additions to the C# SDK specific for Godot.
I wrote the Godot Blackholio tutorial and updated the Unity one.
I added the image assets necessary for the tutorial.
I added the files for the Godot demo.

# API and ABI breaking changes
No breaking changes.

# Expected complexity level and risk
1. There's really no risk for current systems or projects, it's all new
additions to support nicely(-ish) Godot, new Blackholio demo for Godot
and updates to the tutorials.

# Testing
- [X] Follow the tutorial and verify everything works.
- [X] Build for Windows and verify it works.
- [x] Build for Linux and verify it works.
- [x] Build SDK
- [x] Publish to Nuget

---------

Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-22 17:58:47 +00:00
Zeke Foppa f4a9819d7d CI - DOCKERHUB_PASSWORD -> DOCKERHUB_TOKEN (#5096)
# Description of Changes

Updating workflows to use a new secret

# API and ABI breaking changes
None. CI only.

# Expected complexity level and risk

1

# Testing

- [x] the `unity-testsuite` CI still passes
- [x] a test release successfully pushed an image
(<https://github.com/clockworklabs/SpacetimeDB/actions/runs/26262521745>)

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-22 12:24:54 +00:00
Zeke Foppa 8641c17e4e Client binaries from DigitalOcean -> AWS (#5077)
# Description of Changes

Use an AWS bucket for client binaries instead of DigitalOcean.

Note that this will effectively hamstring the DigitalOcean mirror for
any old clients (i.e. ones before this change is released). But it's
only a mirror, and they can "fix" it by upgrading to a version with this
change.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

- [x] Manually ran the package job on this PR and confirmed that some of
the resulting URLs are indeed downloadable from the AWS urls

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-20 18:57:20 +00:00
Zeke Foppa fead68c308 CI - enforce minimum pnpm package age (#5032)
# Description of Changes

Due to the relatively frequent supply chain attacks on especially npm
packages, we're instituting a minimum package age in the whole repo.

- Globally set a minimum npm package age in CI
- Best-effort set npm package age using `.npmrc` beside any
`package.json`
- Add CI checks that pnpm version and minimum package age values are the
same everywhere

# API and ABI breaking changes

None

# Expected complexity level and risk

2

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] CI passes
- [x] if I remove a `.npmrc` then `cargo ci lint` fails
- [x] if I change a value in `.npmrc` then `cargo ci lint` fails

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-16 12:47:56 -07:00
bradleyshep be86a512f2 LLM Benchmark Improvements + More Evals (#4740)
# Description of Changes

LLM benchmark infrastructure improvements and new benchmark tasks.

**Runner & scoring:**
- Add retry logic with backoff for LLM API calls (rate limits,
502/503/504, timeouts)
- Fix `generation_duration_ms` to only time the successful attempt, not
retries+sleep delays
- Add `--dry-run` flag to run benchmarks without saving results
- Add OpenRouter client as unified fallback when direct vendor keys
aren't set
- Add web search mode via OpenRouter `:online` suffix
- Extract shared OpenAI-compatible response types into `oa_compat.rs`
- Add `ReducerCallBothScorer` for calling reducers on both golden and
LLM databases
- Set `max_tokens` on OpenRouter and Meta clients to prevent silent
truncation

**Model routing:**
- Add `ModelRoute` with display name, vendor, API model, and OpenRouter
model ID
- Support ad-hoc model IDs via `--models vendor:model` without static
registration
- Add model name normalization (OpenRouter IDs, case variants →
canonical display names)

**Context modes:**
- Add `guidelines`, `cursor_rules`, `search`, `no_context` modes with
`is_empty_context_mode()` helper
- Add mode-specific prompt preambles
- Consolidate mode alias normalization (`none`/`no_guidelines` →
`no_context`)

**CI workflows:**
- Add `llm-benchmark-periodic.yml` for scheduled nightly runs with
per-language failure tracking
- **Note**: The periodic workflow requires `OPENROUTER_API_KEY`,
`LLM_BENCHMARK_UPLOAD_URL`, and `LLM_BENCHMARK_API_KEY` as GitHub
secrets.
- Add `llm-benchmark-validate-goldens.yml` for validating golden answers
still compile

**Results & summary:**
- Add `cmd_status` to show incomplete benchmark combinations with rerun
commands
- Add `cmd_analyze` for LLM-powered failure analysis
- Split `normalize_details_file` from `write_summary_from_details_file`
- Derive task categories from filesystem for summary generation
- Add timestamp tracking (`started_at`/`finished_at`) and token usage

**New benchmark tasks:**
- 30 new tasks across auth, data_modeling, queries, basics, and schema
categories
- Updated/fixed existing task prompts and golden answers

# API and ABI breaking changes

None. Internal tooling only.

# Expected complexity level and risk

2 — Changes are scoped to the LLM benchmark CLI tool
(`xtask-llm-benchmark`) and CI workflows. No impact on SpacetimeDB core.

# Testing

- [x] `cargo check -p xtask-llm-benchmark` — zero errors, zero warnings
- [x] Dry run: `llm_benchmark run --lang typescript --modes no_context
--tasks t_001 --models openai:gpt-5-mini --dry-run` — ran end-to-end,
confirmed no results saved to disk
- [ ] Verify periodic workflow runs successfully on next scheduled
trigger

---------

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2026-05-11 22:53:24 +00:00
Zeke Foppa 6108b791e9 CI - Fix gen-quickstart check (#4977)
# Description of Changes

CI was running `gen-quickstart.sh` and then checking for a diff.. but it
was checking in the wrong directory.

I have also regenerated the files because the fixed check was failing.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

- [x] CI passes
- [x] updated CI failed without the changes to the other files

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-08 12:51:05 +00:00
Zeke Foppa 8df7df3270 cargo ci dlls -> cargo regen csharp dlls (#4972)
# Description of Changes

Just moving this command in preparation to create a lot more `cargo
regen` commands.

- `master`
  - **[This PR] `cargo ci dlls` -> `cargo regen csharp dlls`**
- [#4971 Translate some bash scripts to
Rust](https://github.com/clockworklabs/SpacetimeDB/pull/4971)
- [#4921 CI - `cargo test` runs C# and TypeScript
tests](https://github.com/clockworklabs/SpacetimeDB/pull/4921)
- [#4948 CI - Run unity tests through `cargo
test`](https://github.com/clockworklabs/SpacetimeDB/pull/4948)

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

- [x] CI still passes

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-08 12:48:22 +00:00
Zeke Foppa 0e8973c306 CI - version upgrade check happens in ci.yml (#4950)
# Description of Changes

Merged the `upgrade-version-check.yml` into `ci.yml`, and moved the
business logic under `cargo ci`.

I would also be very open to just removing this test until we choose to
define a better suite of tests for `cargo bump-version`.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1

# Testing

- [x] Ran it locally. It made a diff

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-05 20:05:33 +00:00
Zeke Foppa 06fa5e311c CI - Try to fix Internal Tests on master (#4942)
# Description of Changes

https://github.com/clockworklabs/SpacetimeDB/pull/4231 changed our CI to
always pass a parameter corresponding to the PR number, which.. broke on
`master` commits since they don't have a PR number.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1.

# Testing

I think I don't know how to test this. But it's basically the old
behavior on `master` commits, so it should work fine? One hopes?

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-04 23:51:43 +00:00
Ryan 8b8a42fa35 Windows Binary Signing through DigiCert (#4906)
# Description of Changes

Add EV code signing for Windows CLI binaries using DigiCert KeyLocker.
The workflow now signs `spacetimedb-update.exe`, `spacetimedb-cli.exe`,
and `spacetimedb-standalone.exe` on tag pushes using `smctl sign` with a
cloud HSM-backed certificate.

These changes reflect the updated DigiCert guidance for code signing
through GitHub found here:
https://github.com/marketplace/actions/digicert-binary-signing

# API and ABI breaking changes

No API or ABI changes. This change only affects the CI/CD packaging
workflow.

# Expected complexity level and risk

1 - This PR only adds code signing to existing CI packaging. Risk is
limited to the Windows packaging step failing on tags; Linux and macOS
builds are unaffected.

# Testing

- [X] Tested via workflow dispatch on tag `test-signing-v0.0.1`
- [X] All three executables signed and verified successfully
- [X] Signature verification confirms certificate chain
- [X] Signed artifacts uploaded successfully
2026-04-30 15:43:59 +00:00
Zeke Foppa 9e2946b2c0 Remove Python smoketests (#4896)
# Description of Changes

Remove the Python smoketests and the CI check that tests for edits.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1

# Testing

- [ ] All CI passes

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-28 04:34:24 +00:00
Zeke Foppa 6fc591e4d5 CI - Use new internal test inputs (#4231)
# Description of Changes

Flipping on some new inputs to `Internal Tests` to get new
functionality.

I'll follow-up with a more detailed description in discord.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

2

# Testing
- [x] public PR without private PR just uses master
- [x] public PR with private PR uses that one
  - [x] fails if private PR is not approved
  - [x] fails if private PR does not pass its CI
  - [x] passes if private PR is ready to go

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-24 22:54:14 +00:00
Zeke Foppa 70db721c3a Revert breaking PRs (#4881)
# Description of Changes

Revert the following PRs that have caused some breakage:
```
a32cffa76 Finish refactoring out replay (#4850)
d639be0af Replay: some code motion & reuse `ReplayCommittedState` (#4849)
78d6b6f7d Update NativeAOT-LLVM infrastructure to current ABI (#4515)
d5c1738c1 Better module backtraces for panics and whatnot (#577)
6f23b19f3 Wait for database update to become durable (#4846)
81c9eab86 Add `spacetime lock/unlock` to prevent accidental database deletion (#4502)
809aebd7c Move field `replay_table_updated` to `ReplayCommittedState` (#4807)
21b58ef99 Update axum (#2713)
b5cadff7a Extract replay stuff out of `CommittedState`, part 1 (#4804)
```

I also updated the Python smoketests for breakage introduced in
https://github.com/clockworklabs/SpacetimeDB/pull/4502. Reverting that
PR caused conflicts, so this fix is more straightforward.

# API and ABI breaking changes

Maybe kind of, but we haven't released any of these.

# Expected complexity level and risk

1

# Testing

Ask @bfops about testing

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-23 14:54:23 -07:00
Zeke Foppa 604bb3e649 CI - Move simple jobs into cargo ci (#4871)
# Description of Changes

Migrate these checks into `cargo ci`:
- Check that packages are publishable
- Docs test
- TypeScript - Tests

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

2

# Testing

- [ ] CI passes

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-23 01:13:25 +00:00
Zeke Foppa 0a08879e8a CI - cargo ci update-flow runs on Windows (#4874)
# Description of Changes

Removed some "if we're on windows" checks in the CI so that we're always
running through `cargo ci update-flow`.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1.

# Testing

- [x] Upgrade flow tests pass

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-22 23:51:53 +00:00
Zeke Foppa 943ed7c0c7 CI - Merge workflow files (#4869)
# Description of Changes

Merged `typescript-test.yml` and `docs-test.yml` into `ci.yml`.

Note: The required checks will need to be updated when this PR is ready
to merge.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1

# Testing

- [x] CI passes

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-22 22:16:13 +00:00
Zeke Foppa 2d67d76189 CI - Merge hooks (#4224)
# Description of Changes

Invoke a private workflow when a PR merges, so that we can do extra
follow-up actions.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

2

# Testing
- [x] When a PR merged with a corresponding private PR, I got a discord
notification:
<img width="543" height="70" alt="image"
src="https://github.com/user-attachments/assets/209347c3-57be-47d7-8d75-6154c9e222cb"
/>

- [x] When a PR merged without a corresponding private PR, no discord
notification

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-22 18:24:50 +00:00
Zeke Foppa a7729f7dab CI - Fold typescript lint into cargo ci lint (#4856)
# Description of Changes

Merge the `TypeScript - Lint` CI job into `cargo ci lint`.

Note that this removes the custom caching for the pnpm store, but we're
planning to overhaul our CI cache approach anyway.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1

# Testing

- [x] Lint step passes on this PR

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-22 16:24:00 +00:00
Tyler Cloutier 78d6b6f7dd Update NativeAOT-LLVM infrastructure to current ABI (#4515)
## Summary

- Update the experimental NativeAOT-LLVM build path
(`EXPERIMENTAL_WASM_AOT=1`) to include all host function imports from
ABI versions 10.0 through 10.4
- Fix the compiler package reference to work on both Windows x64 and
Linux x64 (was hardcoded to Windows only)
- Add a CI smoketest to verify AOT builds work on Linux x64

## Context

See #4514 for the full writeup on the C# AOT situation. The
`wasi-experimental` workload that all C# module builds depend on is
deprecated and removed from .NET 9+. NativeAOT-LLVM is the recommended
path forward for ahead-of-time compilation of C# to WebAssembly.

The existing NativeAOT-LLVM support (added by RReverser in #713) was
stale: missing imports added since then and a Windows-only package
reference.

## Changes

**`SpacetimeDB.Runtime.targets`:**
- Add 10 missing `WasmImport` declarations across spacetime_10.0 through
10.4
- Replace `runtime.win-x64.Microsoft.DotNet.ILCompiler.LLVM` with
`runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM`
so it resolves correctly on Linux x64 as well
- Use explicit version strings instead of the `$(SpacetimeNamespace)`
variable

**`ci.yml`:**
- Add AOT build smoketest step in the `csharp-testsuite` job

## Test plan

- [x] CI smoketest passes: `EXPERIMENTAL_WASM_AOT=1 dotnet publish -c
Release` builds successfully on Linux x64
- [ ] Existing C# tests continue to pass (no changes to the default
interpreter path)

---------

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: Jason Larabie <jason@clockworklabs.io>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-04-21 21:47:16 +00:00
Zeke Foppa ea834acb79 CI - move pnpm build into cargo ci test (#4855)
# Description of Changes

To make `cargo ci test` more properly include the full test logic.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

1

# Testing

honestly none

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-21 20:23:07 +00:00
Zeke Foppa 1c10afea0b CI - Move the git diff check under cargo ci smoketests (#4854)
# Description of Changes

To make `cargo ci` more properly the full test logic.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

1

# Testing

honestly none

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-04-21 20:10:40 +00:00
John Detter db2df60dcc Windows VM runner test (#4278)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

This enables the use of the self hosted windows runners.

|CI Job|Before|After|Change|
|---|---|---|---|
|CI/Smoketests (Windows)|79m|31m|154% faster|

This is *before* we do any work with caching.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None, this is just a CI change.

# Expected complexity level and risk

1 - this is just a CI change.

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] Ran the windows smoketest several times. Each time it is passing,
although several runs I was making performance changes so some runs are
faster than others.

Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2026-04-17 02:43:34 +00:00
Zeke Foppa 10a4779b13 wasm support for Rust SDK (#4183)
# Description of Changes

This PR adapts the Rust SDK test suite to work with the wasm version
added in https://github.com/clockworklabs/SpacetimeDB/pull/4089 (which
I've closed in favor of this PR).

Most of the changes revolve around wasm's different async semantics -
everything runs in one thread, so things that relied on background
threads didn't work directly. Several tests would lock up because
something in them blocked synchronously, which blocked any background
work from progressing.

We moved the test-clients contents into a `test_handlers.rs` so that it
could be called from both `main` (for native tests) and `lib` (for wasm
tests). To show what actually changed, use:
```bash
git diff --no-index -- <(git show origin/master:sdks/rust/tests/procedure-client/src/main.rs) sdks/rust/tests/procedure-client/src/test_handlers.rs
```
(or similar for other test-clients)

# API and ABI breaking changes

None, I think/hope.

# Expected complexity level and risk

2

# Testing

- [x] I've augmented the CI to also run the test suite with the `web`
feature

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Thales R <thlsrmsdev@gmail.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-23 01:27:51 +00:00
Zeke Foppa bf0c3b6d19 CI - Disable PR approval check (#4683)
# Description of Changes

Disabling this for now since it's buggy and I'm about to be out for a
while.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

This can't be tested since it runs using the version in the base branch.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-20 20:09:40 +00:00
clockwork-labs-bot 3c60481d82 CI: Use pull_request_target for PR approval check (#4615)
The PR approval check workflow uses `pull_request`, which does not grant
the `GITHUB_TOKEN` write permissions for commit statuses on fork PRs.
This causes the check to silently fail on external contributions.

Switches to `pull_request_target`, which runs in the context of the base
branch and has the necessary permissions.

**Security notes** (also documented as comments in the workflow file):
- `pull_request_target` grants write access to the repository. This is
safe here because the workflow **only reads PR metadata via the GitHub
API** and never checks out, builds, or executes code from the PR branch.
- A clear `SECURITY` comment block at the top of the file explains why
`pull_request_target` is used and warns against adding a checkout step.
- An additional inline comment on the job warns against adding checkout
steps.

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-03-11 19:57:19 +00:00
Zeke Foppa 4d7db102fc CI - PR approval check skips for external PRs (properly this time) (#4611)
# Description of Changes

https://github.com/clockworklabs/SpacetimeDB/pull/4604 skipped the check
run for external PRs, but because it needs to post a separate commit
status (see https://github.com/clockworklabs/SpacetimeDB/pull/4578),
this was not the right solution. We need to _run_ the check but
trivially post a success on external PRs. Sigh.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

I don't know how to test github workflows.

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-11 17:08:19 +00:00
Zeke Foppa b1c158d1b0 CI - Skip PR approval check on external PRs (#4604)
# Description of Changes

It doesn't have permission to run on external PRs, but that's kinda okay
since external PRs are rarely authored by clockwork-labs-bot anyway.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

None

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-11 13:00:41 +00:00
Zeke Foppa 0a70eb9ed7 CI - Fix package job (#4552)
# Description of Changes

We were unable to test
https://github.com/clockworklabs/SpacetimeDB/pull/4473 because
#githubworkflowthings, and it turns out we broke the job.

Here I fixed the job and merge the two jobs into one.

**Signing still doesn't work so I've disabled the signing part for
now.**

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1

# Testing

I ran a test job:
https://github.com/clockworklabs/SpacetimeDB/actions/runs/22691343426/job/65787327828

- [x] Package job succeeds for non-windows
- [x] Package job succeeds on windows

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-11 09:29:40 +00:00
Zeke Foppa c665f39b01 CI - Label check runs on synchronize events (#4602)
# Description of Changes

This shouldn't actually be required in the long-term, because it runs on
new PRs and any label changes, but the case where it _is_ required? PRs
that are currently already open and merge in `master`. That triggers a
`synchronize` event but not any of the events that this check runs on.
Sigh.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

None

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-10 18:07:23 +00:00
Zeke Foppa de9505c333 CI - Label check always runs (#4594)
# Description of Changes

The CI check for the Do Not Merge label was only running on label-change
events, so if a PR never received a label (any label), the check would
never run. This meant that the check couldn't be marked required because
it was missing on PRs that were never labeled anything.

Additionally, the check was not configured to run properly in the merge
queue, so it would have blocked the merge queue if it were a required
check.

This PR fixes those issues by making the check run on more pull request
events, and by trivially succeeding in the merge queue.

This enables the check to be made required.

# API and ABI breaking changes

None. CI only.

# Expected complexity level and risk

1

# Testing
- [x] The check is now showing as run on this PR
- [x] The check still fails if I add a "do not merge" label

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-10 05:31:42 +00:00
Zeke Foppa f38c0565d8 CI - Stop running Python smoketests (#4376)
# Description of Changes

These have been running alongside the Rust smoketests for a while, and
we feel fairly confident that the Rust ones are doing a good job.

(However, I leave them in the repo because we still use them elsewhere).

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

1

# Testing

None

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-03-07 08:07:06 +00:00
Zeke Foppa 154287c52f CI - Simplify PR approval check (#4578)
# Description of Changes

The previous version ended up incurring two different entries on the PR
(one for the `pull_request` event and one for the `pull_request_review`
event). Both versions were marked "required", so PRs could end up in an
unmergeable state if one check had succeeded but the other had failed
(e.g. if you submitted a PR approval, the previous `pull_request`
version of the check would still be failed since it didn't refresh).

See the entries at top and bottom here:
<img width="481" height="225" alt="image"
src="https://github.com/user-attachments/assets/5b7a4302-6bc2-47e9-93c8-812cb9ece60b"
/>

This PR fixes it by only allowing the `pull_request_review` events. I
_think_ this covers all the cases, but I'm not sure.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

I don't know how to test it really 🤷

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-07 03:12:49 +00:00
Zeke Foppa 41ab8f3c68 CI - clockwork-labs-bot needs 2 approvals (#4568)
# Description of Changes

PRs created by `clockwork-labs-bot` require 2 approvals.

After merging, we would need to make this check required.

# API and ABI breaking changes

CI only.

# Expected complexity level and risk

1. This is copy-pasted and simplified from another repo that has the
same workflow.

# Testing

None

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-06 00:44:27 +00:00
Zeke Foppa 5e2dda9764 CI - Reduce when package job runs (#4539)
# Description of Changes

We run the "package CLI" job for every `master` commit, but I think we
basically never use those. Instead I added the work flow dispatch option
which can run as a one off if needed. (I didn't test it, but now that
it's added, we'll be able to fix it in a PR if needed).

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-03-04 19:55:39 +00:00
Ryan 9a1ea26e25 Adds code signing to tagged windows builds (#4473)
**Note**: This change requires the addition of new entries in the
secrets to work properly. These should be added prior to this merging.

# Description of Changes

* Add a tag-only Windows signing job that runs on a self-hosted signing
runner.
* This is an alternative/separate code-path just for the signing job.
See **Alternatives Considered** for details.
* Skip the unsigned Windows matrix build on tags so signed artifacts are
the only Windows release outputs.
* Sign `spacetimedb-update.exe`, `spacetimedb-cli.exe`, and
`spacetimedb-standalone.exe` before packaging, then upload the signed
artifacts as usual.

# Alternatives Considered
**Inline signing in the existing Windows packaging step**. This was
rejected because it would require all Windows builds (including non-tag
builds) to run on the signing-capable runner or to install/signing
tooling on GitHub-hosted runners. The chosen approach isolates signing
to tag releases, avoids exposing credentials in standard builds, and
keeps routine CI behavior unchanged.

# API and ABI breaking changes

None

# Expected complexity level and risk

2 – low risk. CI-only change that adds a new signing job and preserves
existing artifact layout.

# Testing

- [X] None (Not running, workflow change only)

---------

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2026-03-03 23:21:09 +00:00