Skip to content

feat(audit): audit credential disclosure reads #10325

feat(audit): audit credential disclosure reads

feat(audit): audit credential disclosure reads #10325

Workflow file for this run

name: Branch Checks
on:
merge_group:
types: [checks_requested]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
packages: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
reviewer-roster:
name: Reviewer Roster
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Validate reviewer collaborator membership
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
run: python3 tasks/scripts/check_reviewer_collaborators.py --repo "$GH_REPO"
compatibility-review:
name: Compatibility Review (advisory)
permissions:
contents: read
pull-requests: read
uses: ./.github/workflows/codex-compatibility.yml
with:
candidate_ref: ${{ github.sha }}
source_sha: ${{ github.sha }}
base_ref: >-
${{ github.event.merge_group.base_sha
|| github.event.pull_request.base.sha
|| format('refs/remotes/origin/{0}', github.event.repository.default_branch) }}
pr_number: ${{ github.event.pull_request.number || 0 }}
secrets:
CODEX_SECURITY_API_KEY: ${{ secrets.CODEX_SECURITY_API_KEY }}
compatibility-comment:
name: Comment on detected breaking changes
needs: compatibility-review
if: >-
${{ !cancelled() && github.event_name == 'pull_request'
&& needs.compatibility-review.outputs.has_findings == 'true'
&& needs.compatibility-review.outputs.report_artifact != '' }}
runs-on: ubuntu-latest
timeout-minutes: 5
continue-on-error: true
permissions:
actions: read
pull-requests: write
steps:
- name: Download compatibility report
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
artifact-ids: ${{ needs.compatibility-review.outputs.report_artifact }}
path: compatibility-report
- name: Post new or materially updated findings
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
SOURCE_SHA: ${{ github.event.pull_request.head.sha }}
with:
script: |
const fs = require('node:fs');
const report = JSON.parse(fs.readFileSync('compatibility-report/report.json', 'utf8'));
if (!report.review?.findings?.some(finding => !finding.previous_report_url)) return;
const number = Number(process.env.PR_NUMBER);
const { data: pr } = await github.rest.pulls.get({ ...context.repo, pull_number: number });
if (pr.state !== 'open' || pr.head.sha !== process.env.SOURCE_SHA) {
core.notice('Skipping a comment for a closed PR or an outdated head.');
return;
}
const markdown = fs.readFileSync('compatibility-report/comment.md', 'utf8');
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/attempts/${process.env.GITHUB_RUN_ATTEMPT}`;
await github.rest.issues.createComment({
...context.repo,
issue_number: number,
body: `${markdown}\n[Branch check run](${runUrl})`,
});
protobuf-compatibility:
name: Protobuf Compatibility
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: ./.github/actions/check-protobuf-compatibility
with:
ref: >-
${{ github.event_name == 'workflow_dispatch'
&& format('refs/remotes/origin/{0}', github.event.repository.default_branch)
|| github.event.merge_group.base_sha
|| github.event.pull_request.base.sha }}
monitoring-changes:
name: Detect monitoring mixin changes
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
changed: ${{ steps.changes.outputs.changed }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Check mixin paths
id: changes
shell: bash
env:
BASE_SHA: ${{ github.event.merge_group.base_sha || github.event.pull_request.base.sha }}
EVENT_NAME: ${{ github.event_name }}
run: |
set -euo pipefail
if [ "$EVENT_NAME" = workflow_dispatch ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
exit 0
fi
if [ -z "$BASE_SHA" ]; then
echo "::error::Missing base SHA for monitoring mixin change detection." >&2
exit 1
fi
changed=$(git diff --name-only "${BASE_SHA}...HEAD" -- deploy/openshell-mixin/)
if [ -n "$changed" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
monitoring:
name: Monitoring Mixin
needs: monitoring-changes
if: needs.monitoring-changes.outputs.changed == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 15
container:
image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install monitoring prerequisites
run: mise install --locked go@1.26.7 python uv
- name: Check monitoring mixin
env:
# Activate Go while mise 2026.9.9 installs the go: task tools.
MISE_GO_VERSION: "1.26.7"
run: mise run monitoring:check
mise-lockfile:
name: mise Lockfile
runs-on: ubuntu-24.04
timeout-minutes: 30
container:
image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Verify mise.lock is in sync with mise.toml
run: |
mise lock
if ! git diff --exit-code mise.lock; then
echo "::error::mise.lock is out of sync with mise.toml. Run 'mise lock' locally and commit the result." >&2
exit 1
fi
license-headers:
name: License Headers
runs-on: ubuntu-24.04
timeout-minutes: 30
container:
image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install tools
run: mise install --locked
- name: Check license headers
run: mise run license:check
cargo-deny:
name: Cargo Deny
runs-on: ubuntu-24.04
timeout-minutes: 30
defaults:
run:
shell: nix develop .#devShells.x86_64-linux.default -c bash -euo pipefail {0}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
prepare-shell: "true"
shell-installable: .#devShells.x86_64-linux.default
- name: Install pinned cargo-deny
run: mise install --locked github:EmbarkStudios/cargo-deny
# Enter mise inside the Nix shell so Nix's cargo-deny cannot shadow the pin.
# mise sets RUSTC_WRAPPER=sccache, but this metadata-only job does not
# install sccache. Clear wrappers after mise applies its environment.
- name: Verify crypto dependency guardrail
run: mise exec github:EmbarkStudios/cargo-deny -- env RUSTC_WRAPPER= RUSTC_WORKSPACE_WRAPPER= uv run --no-project python tasks/scripts/test-crypto-dependency-policy.py
- name: Check dependencies
run: mise exec github:EmbarkStudios/cargo-deny -- env RUSTC_WRAPPER= RUSTC_WORKSPACE_WRAPPER= cargo deny check licenses bans sources
rust-format:
name: Rust format
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Format
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo fmt --all -- --check
cargo fmt --manifest-path e2e/rust/Cargo.toml --all -- --check
cargo fmt --manifest-path examples/governance-interceptor/Cargo.toml --all -- --check
cargo fmt --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml --all -- --check
cargo fmt --manifest-path examples/isolation-backend-v8/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/testkit/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/tmachine/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/runner/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/conformance/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/continuity/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/drivers/podman/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/features/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/support/Cargo.toml --all -- --check
cargo-lockfiles:
name: Cargo lockfiles
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Verify Cargo lockfiles
shell: nix develop -c bash -euo pipefail {0}
run: |
tasks/scripts/check-cargo-lockfiles.sh
uv run tasks/scripts/check_cargo_lockfile_alignment.py
rust-lint:
name: Rust lint (${{ matrix.system }})
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
system: x86_64-linux
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-xlarge
system: aarch64-darwin
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/setup-rust
with:
cache-key: rust-checks-v2
save-cache: "false"
- name: Lint
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path e2e/rust/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path examples/governance-interceptor/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path examples/isolation-backend-v8/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/testkit/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/tmachine/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/runner/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/conformance/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/continuity/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/drivers/podman/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings
rust-test:
name: Rust test (${{ matrix.system }})
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
system: x86_64-linux
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-xlarge
system: aarch64-darwin
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/setup-rust
with:
cache-key: rust-checks-v2
save-cache: "true"
- name: Verify crypto backend independence
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo tree --locked -p openshell-crypto --no-default-features --edges normal,build,dev --target all --prefix none > /tmp/openshell-crypto-dependencies.txt
if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys) v' /tmp/openshell-crypto-dependencies.txt; then
echo "ERROR: backend-free crypto build includes Ring or AWS-LC" >&2
cat /tmp/openshell-crypto-dependencies.txt >&2
exit 1
fi
cargo test --locked -p openshell-crypto --no-default-features --test independent_backend
- name: Verify OpenSSL backend
shell: nix develop .#crypto -c bash -euo pipefail {0}
env:
OPENSSL_NO_VENDOR: "1"
OPENSSL_STATIC: "0"
run: |
cargo tree --locked -p openshell-crypto --no-default-features --features openssl --edges normal,build,dev --target all --prefix none > /tmp/openshell-openssl-dependencies.txt
if grep -Eq '^(ring|aws-lc-rs|aws-lc-sys|aws-lc-fips-sys|openssl-src) v' /tmp/openshell-openssl-dependencies.txt; then
echo "ERROR: OpenSSL-only crypto build includes another backend or vendored OpenSSL" >&2
cat /tmp/openshell-openssl-dependencies.txt >&2
exit 1
fi
cargo clippy --locked -p openshell-crypto --no-default-features --features openssl --all-targets -- -D warnings
cargo test --locked -p openshell-crypto --no-default-features --features openssl
for feature in tls-tonic tls-kube tls-sqlx; do
cargo check --locked -p openshell-crypto --no-default-features --features "openssl,$feature"
done
cargo clippy --locked -p openshell-crypto --features openssl --all-targets -- -D warnings
cargo test --locked -p openshell-crypto --features openssl
- name: Verify dynamic OpenSSL linkage on Linux
if: runner.os == 'Linux'
shell: nix develop .#crypto -c bash -euo pipefail {0}
env:
OPENSSL_NO_VENDOR: "1"
OPENSSL_STATIC: "0"
run: |
cargo test --locked -p openshell-crypto --no-default-features --features openssl --test openssl_tls --no-run --message-format=json > "$RUNNER_TEMP/openssl-artifacts.jsonl"
executable=$(uv run --no-project python -c 'import json, sys; artifacts = [json.loads(line) for line in sys.stdin]; paths = [a["executable"] for a in artifacts if a.get("reason") == "compiler-artifact" and a.get("target", {}).get("name") == "openssl_tls" and a.get("executable")]; assert len(paths) == 1, paths; print(paths[0])' < "$RUNNER_TEMP/openssl-artifacts.jsonl")
ldd "$executable" > "$RUNNER_TEMP/openssl-linkage.txt"
cat "$RUNNER_TEMP/openssl-linkage.txt"
for library in libssl libcrypto; do
if ! grep -Eq "^[[:space:]]*$library\\.so[^[:space:]]* => /" "$RUNNER_TEMP/openssl-linkage.txt"; then
echo "ERROR: $library did not resolve to a dynamic library" >&2
exit 1
fi
done
- name: Test
shell: nix develop -c bash -euo pipefail {0}
env:
OPENSHELL_TELEMETRY_ENABLED: "false"
run: |
cargo nextest run --locked --profile ci --workspace --features openshell-server/test-support
cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path examples/supervisor-middleware-content-guard/Cargo.toml
cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/testkit/Cargo.toml
cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/tmachine/Cargo.toml
cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/runner/Cargo.toml
cargo nextest run --locked --config-file .config/nextest.toml --profile ci --manifest-path tests/support/Cargo.toml
tasks/scripts/check-conformance-program.sh
rust-postgres-test:
name: Rust PostgreSQL tests
# Bare runner: the test script starts a disposable PostgreSQL container
# with the host's Docker.
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/setup-rust
with:
cache-key: rust-checks-v2
save-cache: "false"
- name: Test
shell: nix develop -c bash -euo pipefail {0}
env:
CONTAINER_ENGINE: docker
OPENSHELL_TELEMETRY_ENABLED: "false"
run: tasks/scripts/run-postgres-tests.sh --locked --profile ci
rust-build-modes:
name: Rust build modes (${{ matrix.system }})
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
system: x86_64-linux
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-xlarge
system: aarch64-darwin
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/setup-rust
with:
cache-key: rust-checks-v2
save-cache: "false"
- name: Verify build modes
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo build --locked -p openshell-gateway --bin openshell-gateway
tasks/scripts/verify-telemetry-compiled-out.sh present target/debug/openshell-gateway
cargo build --locked -p openshell-gateway --bin openshell-gateway --no-default-features --features defaults-without-telemetry
tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-gateway
cargo build --locked -p openshell-supervisor --bin openshell-supervisor --no-default-features --features defaults-without-telemetry
tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-supervisor
cargo check --locked -p openshell-supervisor --all-targets --no-default-features --features system-ca-roots
- name: Verify system CA roots dependency boundary
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo tree --locked -p openshell-supervisor --prefix none --no-default-features --features system-ca-roots > /tmp/openshell-supervisor-dependencies.txt
if grep -Eq '^(webpki-roots|webpki-root-certs) v' /tmp/openshell-supervisor-dependencies.txt; then
echo "ERROR: bundled Mozilla roots found in system CA roots build" >&2
cat /tmp/openshell-supervisor-dependencies.txt >&2
exit 1
fi
- name: Verify standalone prover dependency boundary
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo tree --locked -p openshell-prover-cli --edges normal --prefix none > /tmp/openshell-prover-dependencies.txt
if grep -Eq '^(openshell-(cli|server|sdk|bootstrap|tui|providers|core|policy)) v' /tmp/openshell-prover-dependencies.txt; then
echo "ERROR: standalone prover includes an OpenShell control-plane dependency" >&2
cat /tmp/openshell-prover-dependencies.txt >&2
exit 1
fi
rust-feature-alias:
name: Rust feature alias
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/setup-rust
with:
cache-key: rust-checks-v2
save-cache: "false"
- name: Verify defaults-without-telemetry feature alias
shell: nix develop -c bash -euo pipefail {0}
run: |
tasks/scripts/verify-defaults-without-telemetry.sh
git diff --exit-code HEAD -- ':(glob)**/Cargo.lock'
rust-gateway-core-features:
name: Rust gateway core features
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/setup-rust
with:
cache-key: rust-checks-v2
save-cache: "false"
- name: Verify core gateway compute-driver feature sets
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features
cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-docker
cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-kubernetes
cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-podman
rust-gateway-extended-features:
name: Rust gateway extended features
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/setup-rust
with:
cache-key: rust-checks-v2
save-cache: "false"
- name: Verify extended gateway compute-driver feature sets
shell: nix develop -c bash -euo pipefail {0}
run: |
cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-vm
cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-mxc
cargo nextest run --locked --profile ci -p openshell-gateway --all-targets --no-default-features --features compute-driver-docker,compute-driver-vm
python:
name: Python (${{ matrix.runner }})
strategy:
fail-fast: false
matrix:
runner: [ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
container:
image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install tools
run: mise install --locked
- name: Install dependencies
run: uv sync --frozen
- name: Format
run: mise run python:format:check
- name: Lint
run: mise run python:lint
- name: Typecheck
run: mise run python:typecheck
- name: Test
run: mise run test:python
- name: Test Python scripts
run: mise run test:python-scripts
- name: Test local gateway configuration helpers
run: |
bash tasks/scripts/test-gateway-pull-policy.sh
bash tasks/scripts/test-gateway-config.sh
- name: Test release qualification summary
run: mise run test:qualification-summary
- name: Test accepted-work library, review-readiness, and issue labeling
run: "mise run test:accepted-work ::: test:review-readiness ::: test:label-issue"
python-sdk-freeze:
# The Python SDK moved to ai-openshell/sdk-python (#5287), which imported it
# at v0.1.7. Its files stay only until core removes them, so PRs must not
# add or change them. Deleting files is allowed (the removal PR). The paths
# are the ones the import moved: all of python/ plus the two SDK build
# scripts. The shared root pyproject.toml and uv.lock stay editable.
# Merge queue runs skip this job; the PR already passed it.
name: Python SDK Freeze
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Reject changes to the Python SDK
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
set -euo pipefail
changed=$(git diff --name-only --diff-filter=d "${BASE_SHA}...HEAD" -- \
python \
tasks/scripts/generate_python_proto.py)
if [ -z "$changed" ]; then
echo "No added or changed Python SDK files."
exit 0
fi
echo "::error title=Python SDK moved::The Python SDK moved to https://github.com/ai-openshell/sdk-python. Drop the Python SDK changes from this PR and open SDK changes there. Regenerated bindings are not needed here; sdk-python regenerates them from core releases."
echo "Changed Python SDK files:"
echo "$changed"
exit 1
markdown:
name: Markdown
runs-on: ubuntu-24.04
timeout-minutes: 30
container:
image: ghcr.io/ai-openshell/openshell/ci:82e753ba3ffdfb40c118e7cb416ced7f350381d5@sha256:d816f3b4b2de675928e2ecfd26ec6b937be35fe9986542c87d440bc3de5a29de
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install tools
run: mise install --locked
- name: Lint
run: mise run markdown:lint
typescript-sdk-freeze:
name: TypeScript SDK Freeze
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Reject changes to the TypeScript SDK
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
set -euo pipefail
# The package is a stub that re-exports @ai-openshell/sdk. Its files stay
# editable so the stub and its moved notice can be maintained.
changed=$(git diff --no-renames --name-only --diff-filter=d "${BASE_SHA}...HEAD" -- sdk/typescript \
':(exclude)sdk/typescript/package.json' \
':(exclude)sdk/typescript/README.md' \
':(exclude)sdk/typescript/index.js' \
':(exclude)sdk/typescript/index.d.ts' \
':(exclude)sdk/typescript/raw.js' \
':(exclude)sdk/typescript/raw.d.ts')
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
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# The RPM lookup test uses gawk when present; gawk warns on bad escapes.
- name: Install gawk
run: sudo apt-get install -y --no-install-recommends gawk
- name: Test install.sh
run: tasks/scripts/test-install-sh.sh