Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.0
node-version: 24.21.0
- run: node --test scripts/ci/*.test.mjs
- name: Classify changed paths
id: classify
Expand Down Expand Up @@ -65,15 +65,15 @@ jobs:
echo "PROTOC_INCLUDE=/usr/include" >> "$GITHUB_ENV"
- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
with:
toolchain: 1.97.1
toolchain: 1.99.0
components: rustfmt, clippy
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace --all-targets --locked -- -D warnings
- run: cargo test --workspace --locked
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.0
node-version: 24.21.0
- name: Exercise embedded migration ledger
env:
LIGHTSPEED_TEST_POSTGRES_URL: postgres://lightspeed:lightspeed@127.0.0.1:55432/lightspeed
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.0
node-version: 24.21.0
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
Expand All @@ -122,10 +122,10 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.0
node-version: 24.21.0
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci --workspace @lightspeed/docs --include-workspace-root
- run: npm ci --workspace @lightspeed-ai/docs --include-workspace-root
- run: npm run check:docs

required:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
ref: ${{ inputs.ref }}
- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
with:
toolchain: 1.97.1
toolchain: 1.99.0
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- name: Compile and smoke-test native Apple Silicon executables
run: |
cargo build --locked \
-p temporal-server -p environment-provider-incus \
-p temporal-runtime -p environment-provider-incus \
-p environment-daemon -p cli
target/debug/lightspeed-server --version | grep -F "$(git rev-parse HEAD)"
target/debug/lightspeed-runtime --version | grep -F "$(git rev-parse HEAD)"
target/debug/lightspeed-provider-incus --version | grep -F "$(git rev-parse HEAD)"
target/debug/lightspeed-envd --version | grep -F "$(git rev-parse HEAD)"
target/debug/lightspeed --version | grep -F "$(git rev-parse HEAD)"
20 changes: 10 additions & 10 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ jobs:
echo "PROTOC_INCLUDE=${{ steps.protoc.outputs.path }}/include" >> "$GITHUB_ENV"
- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
with:
toolchain: 1.97.1
toolchain: 1.99.0
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.0
node-version: 24.21.0
cache: npm
cache-dependency-path: package-lock.json
- name: Test the exact tagged source
Expand Down Expand Up @@ -182,14 +182,14 @@ jobs:
run: |
set -euo pipefail
declare -A files=(
[server]="$(find dist/archives -name '*-server-*' -print -quit)"
[runtime]="$(find dist/archives -name '*-runtime-*' -print -quit)"
[provider-incus]="$(find dist/archives -name '*-provider-incus-*' -print -quit)"
[envd]="$(find dist/archives -name '*-envd-*' -print -quit)"
[cli]="$(find dist/archives -name '*-cli-*' -print -quit)"
[demo]="$(find dist/archives -name '*-demo-*' -print -quit)"
[docs]="$(find dist/archives -name '*-docs-*' -print -quit)"
)
for name in server provider-incus envd cli demo docs; do
for name in runtime provider-incus envd cli demo docs; do
test -n "${files[$name]}"
ref="$GHCR_ROOT/${name}-bundle:$STAGING_TAG"
oras push "$ref" "${files[$name]}:application/gzip"
Expand All @@ -207,7 +207,7 @@ jobs:
LIGHTSPEED_PLATFORM_IMAGE: ghcr.io/${{ github.repository }}/platform@${{ steps.platform.outputs.digest }}
LIGHTSPEED_PLATFORM_WORKERS_IMAGE: ghcr.io/${{ github.repository }}/platform-workers@${{ steps.platform_workers.outputs.digest }}
LIGHTSPEED_RELEASE_BUILD_IMAGE: ghcr.io/${{ github.repository }}/build-env@${{ steps.build_environment.outputs.digest }}
LIGHTSPEED_BINARY_URL_SERVER: ${{ steps.archives.outputs.SERVER_URL }}
LIGHTSPEED_BINARY_URL_RUNTIME: ${{ steps.archives.outputs.RUNTIME_URL }}
LIGHTSPEED_BINARY_URL_PROVIDER_INCUS: ${{ steps.archives.outputs.PROVIDER_INCUS_URL }}
LIGHTSPEED_BINARY_URL_ENVD: ${{ steps.archives.outputs.ENVD_URL }}
LIGHTSPEED_BINARY_URL_CLI: ${{ steps.archives.outputs.CLI_URL }}
Expand Down Expand Up @@ -245,8 +245,8 @@ jobs:
container_id="$(docker create "$RUNTIME_IMAGE" --version)"
trap 'docker rm -f "$container_id" >/dev/null 2>&1 || true' EXIT
mkdir image-check
docker cp "$container_id:/usr/local/bin/lightspeed-server" image-check/lightspeed-server
cmp dist/bin/lightspeed-server image-check/lightspeed-server
docker cp "$container_id:/usr/local/bin/lightspeed-runtime" image-check/lightspeed-runtime
cmp dist/bin/lightspeed-runtime image-check/lightspeed-runtime
docker run --rm "$RUNTIME_IMAGE" --version | grep -F "$EXPECTED_SHA"
scripts/release/smoke-images.sh
- uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
Expand Down Expand Up @@ -289,7 +289,7 @@ jobs:
- uses: imjasonh/setup-crane@31b88efe9de28ae0ffa220711af4b60be9435f6e # v0.4
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.0
node-version: 24.21.0
registry-url: https://registry.npmjs.org
- name: Retrieve and verify this build's bundle by digest
run: |
Expand Down Expand Up @@ -325,15 +325,15 @@ jobs:
const digest = crypto.createHash("sha512").update(fs.readFileSync(process.argv[1])).digest("base64");
process.stdout.write(`sha512-${digest}`);
' "$package_file")"
if published_integrity="$(npm view "@lightspeed-ai/agent-client@$VERSION" dist.integrity 2>/dev/null)"; then
if published_integrity="$(npm view "@lightspeed-ai/sdk@$VERSION" dist.integrity 2>/dev/null)"; then
test "$published_integrity" = "$expected_integrity" || {
echo "npm version $VERSION already exists with different bytes" >&2
exit 1
}
else
npm publish "$package_file" --access public --tag latest
fi
npm dist-tag add "@lightspeed-ai/agent-client@$VERSION" latest
npm dist-tag add "@lightspeed-ai/sdk@$VERSION" latest
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/snapshot-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
toolchain: ${{ steps.identity.outputs.rust_version }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.0
node-version: 24.21.0
- name: Fetch locked dependencies for offline metadata verification
run: cargo fetch --locked
- name: Verify release metadata
Expand Down Expand Up @@ -156,14 +156,14 @@ jobs:
run: |
set -euo pipefail
declare -A files=(
[server]="$(find dist/archives -name '*-server-*' -print -quit)"
[runtime]="$(find dist/archives -name '*-runtime-*' -print -quit)"
[provider-incus]="$(find dist/archives -name '*-provider-incus-*' -print -quit)"
[envd]="$(find dist/archives -name '*-envd-*' -print -quit)"
[cli]="$(find dist/archives -name '*-cli-*' -print -quit)"
[demo]="$(find dist/archives -name '*-demo-*' -print -quit)"
[docs]="$(find dist/archives -name '*-docs-*' -print -quit)"
)
for name in server provider-incus envd cli demo docs; do
for name in runtime provider-incus envd cli demo docs; do
test -n "${files[$name]}"
ref="$GHCR_ROOT/${name}-bundle:$STAGING_TAG"
oras push "$ref" "${files[$name]}:application/gzip"
Expand All @@ -181,7 +181,7 @@ jobs:
LIGHTSPEED_PLATFORM_IMAGE: ghcr.io/${{ github.repository }}/platform@${{ steps.platform.outputs.digest }}
LIGHTSPEED_PLATFORM_WORKERS_IMAGE: ghcr.io/${{ github.repository }}/platform-workers@${{ steps.platform_workers.outputs.digest }}
LIGHTSPEED_RELEASE_BUILD_IMAGE: ghcr.io/${{ github.repository }}/build-env@${{ steps.build_environment.outputs.digest }}
LIGHTSPEED_BINARY_URL_SERVER: ${{ steps.archives.outputs.SERVER_URL }}
LIGHTSPEED_BINARY_URL_RUNTIME: ${{ steps.archives.outputs.RUNTIME_URL }}
LIGHTSPEED_BINARY_URL_PROVIDER_INCUS: ${{ steps.archives.outputs.PROVIDER_INCUS_URL }}
LIGHTSPEED_BINARY_URL_ENVD: ${{ steps.archives.outputs.ENVD_URL }}
LIGHTSPEED_BINARY_URL_CLI: ${{ steps.archives.outputs.CLI_URL }}
Expand Down Expand Up @@ -218,8 +218,8 @@ jobs:
container_id="$(docker create "$RUNTIME_IMAGE" --version)"
trap 'docker rm -f "$container_id" >/dev/null 2>&1 || true' EXIT
mkdir image-check
docker cp "$container_id:/usr/local/bin/lightspeed-server" image-check/lightspeed-server
cmp dist/bin/lightspeed-server image-check/lightspeed-server
docker cp "$container_id:/usr/local/bin/lightspeed-runtime" image-check/lightspeed-runtime
cmp dist/bin/lightspeed-runtime image-check/lightspeed-runtime
docker run --rm "$RUNTIME_IMAGE" --version | grep -F "$EXPECTED_SHA"
scripts/release/smoke-images.sh
- name: Confirm this is still the current main commit
Expand Down
18 changes: 11 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ change (see Maintenance for sign-off).

## Architecture Boundaries

- `crates/engine` is deterministic and event-sourced. It must not perform
- `crates/harness` is deterministic and event-sourced. It must not perform
network, provider, shell, filesystem, database, or workflow I/O. It emits
intents that effectful adapters execute.
- Keep provider request and response structures native to each provider. The
engine may retain only the provider-neutral facts needed for deterministic
harness may retain only the provider-neutral facts needed for deterministic
branching; wire materialization and transport configuration belong outside
the engine and outside durable session state.
the harness and outside durable session state.
- Public clients depend on `crates/api`, never reducer internals. Keep public
wire documentation on the Rust manifest and DTOs so generated consumers stay
aligned.
- Side effects belong in runtime adapters, Temporal activities, stores, or tool
packages. Domain crates such as `bots`, `channels`, and `environments` define
records, validation, and policy without taking on infrastructure I/O.
- The Incus environment provider depends only on the environment protocol
boundary. It must not depend on Lightspeed stores, API internals, the engine,
boundary. It must not depend on Lightspeed stores, API internals, the harness,
or Temporal runtime.
- The hosted runtime remains one binary with selectable roles. Cross-subsystem
work uses workflow starts and signals, not activities dispatched onto another
Expand Down Expand Up @@ -90,7 +90,7 @@ environment and always serialize them, including filtered runs:

```bash
source scripts/dev/env.sh
cargo test -p temporal-server --test <suite> [test_name] -- --ignored --test-threads=1
cargo test -p temporal-runtime --test <suite> [test_name] -- --ignored --test-threads=1
```

Avoid running `runs_live_slow`: it waits out production activity budgets and
Expand Down Expand Up @@ -118,7 +118,7 @@ Use `./dev.sh` as the supported local entry point; profiles and lifecycle
commands are in `docs/documentation/development/local-development.md`.

The Rust server never migrates PostgreSQL implicitly. Before manual startup
against a new or upgraded database, run `cargo run -p temporal-server -- migrate`.
against a new or upgraded database, run `cargo run -p temporal-runtime -- migrate`.

When adding, removing, or renumbering Rust schema migrations, keep
`crates/store-pg`'s `REQUIRED_SCHEMA_REVISION` and
Expand All @@ -128,6 +128,10 @@ release boundary with `scripts/release/verify-metadata.sh`.
## Maintenance

- Keep changes focused and preserve unrelated work in a dirty worktree.
- Preserve concise Cargo dependency ranges such as `"1"` and `"0.1"`;
`Cargo.lock` records the exact tested versions. Change manifest ranges for
breaking upgrades or when a required API or fix needs a higher minimum,
rather than expanding every range to the latest full version.
- Edit the root `README.md` only with explicit user permission. General requests
to update documentation do not authorize changes to that file.
- Never cite letter-P numeric roadmap identifiers in source comments, symbols,
Expand All @@ -141,6 +145,6 @@ release boundary with `scripts/release/verify-metadata.sh`.
change.
- Record implementation progress in an active roadmap document, but do not
promote completed roadmap detail into this file.
- Add or update tests for behavioral changes. For deterministic engine changes,
- Add or update tests for behavioral changes. For deterministic harness changes,
include replay coverage or vectors where appropriate.
- When asked for repository line counts, use `cloc $(git ls-files)`.
Loading
Loading