From 080f330a6391069bb312d7af0cd0e21e2623266c Mon Sep 17 00:00:00 2001 From: Piotr Mlocek Date: Tue, 17 Nov 2026 16:54:20 -0800 Subject: [PATCH] ci(sdk): freeze TypeScript SDK changes in core Signed-off-by: Piotr Mlocek --- .agents/skills/test-release-canary/SKILL.md | 5 +-- .agents/skills/watch-github-actions/SKILL.md | 4 ++ .github/workflows/branch-checks.yml | 43 +++++++++----------- AGENTS.md | 11 +++-- CI.md | 6 +++ CONTRIBUTING.md | 8 +++- tasks/ci.toml | 5 +-- tasks/proto.toml | 6 +++ tasks/test.toml | 5 +-- tasks/typescript.toml | 10 ----- 10 files changed, 53 insertions(+), 50 deletions(-) create mode 100644 tasks/proto.toml diff --git a/.agents/skills/test-release-canary/SKILL.md b/.agents/skills/test-release-canary/SKILL.md index 7be722c3f8..f7324d3d21 100644 --- a/.agents/skills/test-release-canary/SKILL.md +++ b/.agents/skills/test-release-canary/SKILL.md @@ -43,10 +43,7 @@ The host-package jobs exercise fresh installs, not upgrades from a persisted schema-v1 gateway config. Validate Homebrew and RPM exact-default migration with the release-tooling and package lifecycle tests before relying on the canary. -The canary does not install or import `@nvidia/openshell-sdk`. TypeScript SDK -validation lives in the `TypeScript SDK` branch check, including a publish -dry-run. The tagged release workflow publishes the package to GitHub Packages; -verify that job directly when diagnosing SDK publication failures. +The canary does not install or import `@nvidia/openshell-sdk`. Core's `TypeScript SDK Freeze` branch check rejects added or modified SDK files and directs SDK development to [ai-openshell/sdk-typescript](https://github.com/ai-openshell/sdk-typescript). Core no longer runs SDK build checks or publish dry-runs on PRs. The tagged release workflow still publishes the package to GitHub Packages until the publishing cutover; inspect that job when diagnosing publication failures. ## Trigger paths diff --git a/.agents/skills/watch-github-actions/SKILL.md b/.agents/skills/watch-github-actions/SKILL.md index bf0aed3b35..8778cc156b 100644 --- a/.agents/skills/watch-github-actions/SKILL.md +++ b/.agents/skills/watch-github-actions/SKILL.md @@ -14,6 +14,10 @@ Monitor GitHub Actions workflow runs using the `gh` CLI. - The `gh` CLI must be authenticated (`gh auth status`) - You must be in a git repository with a GitHub remote +## SDK migration failures + +`TypeScript SDK Freeze` rejects additions and modifications under `sdk/typescript/` on PR mirrors. Move those changes to [ai-openshell/sdk-typescript](https://github.com/ai-openshell/sdk-typescript). Core proto changes need no regenerated TypeScript bindings. Deletions are allowed for removal. The job skips merge groups, matching `Python SDK Freeze`. + ## Quick Status Check List recent workflow runs for the current branch: diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index e2c31ffa61..576407c9fe 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -726,35 +726,32 @@ jobs: - name: Lint run: mise run markdown:lint - sdk-typescript: - name: TypeScript SDK + typescript-sdk-freeze: + name: TypeScript SDK Freeze needs: pr_metadata - if: needs.pr_metadata.outputs.should_run == 'true' - runs-on: linux-amd64-cpu8 - timeout-minutes: 30 - container: - image: ghcr.io/nvidia/openshell/ci:9cb72baa2e61a1b5f12407e6e82da7fdba0aa722@sha256:67a9a0c32cb99825e6d3e9d9eec45d67149ea1ff7c11a1b1e1b3480d2d3df684 - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + if: needs.pr_metadata.outputs.should_run == 'true' && github.event_name == 'push' + runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false - - name: Install tools - run: mise install --locked - - - name: Check TypeScript SDK - run: mise run sdk:ts:ci - - # Exercise the full release publish path (version stamp, dist-tag, - # prepublishOnly, tarball) without uploading. Uses the off-tag dev - # version, which validates the prerelease dist-tag branch too. - - name: Verify publishable artifact (dry-run) + - name: Reject changes to the TypeScript SDK env: - OPENSHELL_NPM_PUBLISH_ARGS: --dry-run + BASE_SHA: ${{ needs.pr_metadata.outputs.base_sha }} run: | - OPENSHELL_NPM_VERSION="$(uv run python tasks/scripts/release.py get-version --npm)" \ - mise run sdk:ts:publish + set -euo pipefail + changed=$(git diff --no-renames --name-only --diff-filter=d "${BASE_SHA}...HEAD" -- sdk/typescript) + if [ -z "$changed" ]; then + echo "No added or changed TypeScript SDK files." + exit 0 + fi + echo "::error title=TypeScript SDK moved::Open TypeScript SDK changes at https://github.com/ai-openshell/sdk-typescript. Drop sdk/typescript changes from this PR. Core proto changes need no TypeScript bindings here; sdk-typescript generates them from core releases." + echo "Changed TypeScript SDK files:" + echo "$changed" + exit 1 install-script: name: install.sh diff --git a/AGENTS.md b/AGENTS.md index 0ed5902932..9b9f30575d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -62,7 +62,7 @@ Do not rely on this file for a full inventory. The detailed public and contribut | `crates/openshell-supervisor-process/` | Process supervisor | Process lifecycle, namespace, and bypass monitoring | | `crates/openshell-vfio/` | VFIO support | PCI and GPU passthrough preparation and lifecycle | | `python/openshell/` | Python SDK (frozen) | Moved to ai-openshell/sdk-python; kept until removal | -| `sdk/typescript/` | TypeScript SDK | Native Connect client, curated sandbox API, and generated protobuf types | +| `sdk/typescript/` | TypeScript SDK (frozen) | Development moved to ai-openshell/sdk-typescript; kept until removal | | `proto/` | Protobuf definitions | gRPC service contracts | | `tests/testkit/` | E2E testkit | Support library and `#[testkit::test]` attribute for SDK-driven E2E suites | | `tests/suites/` | E2E suites | One directory per test family, such as `conformance` | @@ -207,11 +207,10 @@ Follow `CONTRIBUTING.md` and `create-github-pr`. Authors without target-reposito ## TypeScript SDK (`sdk/typescript/`) -- Run `mise run sdk:ts:ci` for codegen, proto lint, Biome lint, type checking, unit tests, coverage, and build validation. -- Proto bindings are generated with `mise run sdk:ts:proto` from the files selected in `sdk/typescript/buf.gen.yaml`. -- Generated files under `sdk/typescript/src/gen/` are build outputs and must not be committed. -- Keep the curated API free of generated wire types; expose full generated messages and RPCs through `@nvidia/openshell-sdk/raw`. -- The release workflow publishes the package to GitHub Packages. Branch checks exercise the publish path with `npm publish --dry-run`. +- Open TypeScript SDK changes in [ai-openshell/sdk-typescript](https://github.com/ai-openshell/sdk-typescript). +- `sdk/typescript/` is frozen at core `v0.1.9`. Branch Checks rejects additions and modifications, including dependency updates. Deletions remain allowed for removal. +- Core proto changes need no TypeScript bindings here. The standalone SDK generates bindings from its pinned core release. +- Core retains the SDK files and release publisher until the separate publishing cutover. ## Python diff --git a/CI.md b/CI.md index 3bd47ef4bf..1c1f58a3a4 100644 --- a/CI.md +++ b/CI.md @@ -17,6 +17,12 @@ Manual admission does not change the bot's automatic trust policy for ready PRs. Merge queue validation is a second integration gate for `main`. After a PR has passed the required PR-head statuses, a maintainer adds it to the merge queue. GitHub creates a temporary merge-group branch that combines the latest `main`, the queued PR, and any earlier queued PRs. The same required `OpenShell / ...` status contexts are then published against the merge-group SHA before GitHub merges it. +### TypeScript SDK freeze + +The `TypeScript SDK Freeze` job rejects additions and modifications under `sdk/typescript/` on PR mirror pushes. It permits deletions for removal and skips merge groups, matching the Python freeze check. A failure blocks the required `OpenShell / Branch Checks` status and directs SDK PRs to [ai-openshell/sdk-typescript](https://github.com/ai-openshell/sdk-typescript). Core proto changes need no TypeScript bindings here. + +The freeze replaces the `TypeScript SDK` build and publish dry-run job. Core's aggregate checks no longer run SDK tasks, and `proto:lint` uses the core-owned Buf tool. Core retains release publication until the separate publishing cutover. + ### Monitoring dashboards `Monitoring Mixin` runs in Branch Checks when files under diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1bf50b4a4..88fdabdbb4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -422,6 +422,12 @@ These are the primary `mise` tasks for day-to-day development: | `mise run monitoring:check` | Check and render the monitoring mixin | | `mise run clean` | Clean build artifacts | +## TypeScript SDK contributions + +Open TypeScript SDK PRs in [ai-openshell/sdk-typescript](https://github.com/ai-openshell/sdk-typescript), including dependency and security updates. Core's `sdk/typescript/` is frozen at `v0.1.9`. Branch Checks rejects added or modified files there; deletions remain allowed for removal. Core proto changes need no TypeScript bindings here because the standalone SDK generates bindings from its pinned release. + +Core retains its TypeScript SDK files and release publisher until the publishing cutover. Core's aggregate checks no longer build, format, lint, or test the SDK. `proto:lint` uses the core-owned Buf tool. + ## Project Structure | Path | Purpose | @@ -430,7 +436,7 @@ These are the primary `mise` tasks for day-to-day development: | `crates/openshell-policy-schema/` | Canonical authored policy DTOs and bounded YAML/JSON parser | | `crates/openshell-prover-cli/` | Standalone local policy boundary checker | | `python/` | Python SDK (frozen, moved to ai-openshell/sdk-python) | -| `sdk/typescript/` | TypeScript SDK (Connect client and generated protobuf bindings) | +| `sdk/typescript/` | TypeScript SDK (frozen, development moved to ai-openshell/sdk-typescript) | | `proto/` | Protocol buffer definitions and [public API conventions](proto/README.md) | | `tasks/` | `mise` task definitions and build scripts | | `tests/testkit/` | Support library for SDK-driven end-to-end suites | diff --git a/tasks/ci.toml b/tasks/ci.toml index c4835ac24c..4311191ad1 100644 --- a/tasks/ci.toml +++ b/tasks/ci.toml @@ -37,7 +37,7 @@ run = [ [check] description = "Run fast compile and type checks" -depends = ["rust:check", "python:typecheck", "sdk:ts:typecheck"] +depends = ["rust:check", "python:typecheck"] hide = true [clean] @@ -46,7 +46,7 @@ run = "cargo clean" [fmt] description = "Format code" -depends = ["rust:format", "python:format", "markdown:format", "sdk:ts:format"] +depends = ["rust:format", "python:format", "markdown:format"] hide = true [lint] @@ -62,7 +62,6 @@ depends = [ "helm:docs:check", "markdown:lint", "proto:lint", - "sdk:ts:lint", ] hide = true diff --git a/tasks/proto.toml b/tasks/proto.toml new file mode 100644 index 0000000000..76f693463d --- /dev/null +++ b/tasks/proto.toml @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +["proto:lint"] +description = "Lint proto/ with buf (repo-level buf.yaml)" +run = "buf lint" diff --git a/tasks/test.toml b/tasks/test.toml index 26c2ddd6a5..7aea36afee 100644 --- a/tasks/test.toml +++ b/tasks/test.toml @@ -1,15 +1,14 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# Test tasks (Rust + Python + TypeScript SDK) +# Test tasks (Rust + Python) [test] -description = "Run all tests (Rust + Python + TypeScript SDK)" +description = "Run all tests (Rust + Python)" depends = [ "test:rust", "test:python", "test:python-scripts", - "sdk:ts:test", "test:sbom", "test:install-sh", "test:build-env", diff --git a/tasks/typescript.toml b/tasks/typescript.toml index ed07379c63..101657be88 100644 --- a/tasks/typescript.toml +++ b/tasks/typescript.toml @@ -19,16 +19,6 @@ dir = "sdk/typescript" run = "npm run gen" run_windows = "powershell -NoProfile -ExecutionPolicy Bypass -File ../../tasks/scripts/typescript-proto.ps1" -# Lints the repo-level proto module (buf.yaml at the root) against STANDARD. -# buf ships only in the SDK's devDependencies today, so this depends on the -# SDK install and runs buf from there; the target is all of proto/, not just -# the SDK's client-surface subset. -["proto:lint"] -description = "Lint proto/ with buf (repo-level buf.yaml)" -depends = ["sdk:ts:install"] -run = "./sdk/typescript/node_modules/.bin/buf lint" -run_windows = "sdk\\typescript\\node_modules\\.bin\\buf.cmd lint" - ["sdk:ts:typecheck"] description = "Type-check the TypeScript SDK" depends = ["sdk:ts:proto"]