diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ff88112..2f05f72 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,7 +9,7 @@ Closes # ## Checklist - [ ] Branch is named `feat/`, `fix/`, `docs/`, `chore/` or `test/` and commits are signed off (`git commit -s`) -- [ ] `scripts/ci-local.sh` passes (`TOOLCHAIN=1.94 scripts/ci-local.sh`) +- [ ] `scripts/ci-local.sh` passes (`TOOLCHAIN=1.95 scripts/ci-local.sh`) - [ ] `scripts/security-local.sh` passes if workflows, dependencies or the OpenShell pin changed - [ ] Tests added or updated (`tests/cli.rs`, fixtures, golden files) - [ ] Docs regenerated if directives or flags changed (`scripts/gen-docs.sh`) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e927fa..711502a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Rust - run: rustup toolchain install 1.94 --profile minimal --component rustfmt,clippy && rustup default 1.94 + run: rustup toolchain install 1.95 --profile minimal --component rustfmt,clippy && rustup default 1.95 - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee277ba..dce1c00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,8 +94,8 @@ jobs: env: TARGET: ${{ matrix.target }} run: | - rustup toolchain install 1.94 --profile minimal --target "$TARGET" - rustup default 1.94 + rustup toolchain install 1.95 --profile minimal --target "$TARGET" + rustup default 1.95 - name: Build env: TARGET: ${{ matrix.target }} diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index aff912a..2f148d8 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -59,7 +59,7 @@ jobs: with: persist-credentials: false - name: Install Rust - run: rustup toolchain install 1.94 --profile minimal && rustup default 1.94 + run: rustup toolchain install 1.95 --profile minimal && rustup default 1.95 - name: Install cargo-deny (pinned, sha256) run: scripts/ci-tools.sh install cargo-deny --dir "$RUNNER_TEMP/bin" - name: cargo deny check diff --git a/.github/workflows/upstream-compat.yml b/.github/workflows/upstream-compat.yml index 888dbfb..9879df5 100644 --- a/.github/workflows/upstream-compat.yml +++ b/.github/workflows/upstream-compat.yml @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Rust - run: rustup toolchain install 1.94 --profile minimal && rustup default 1.94 + run: rustup toolchain install 1.95 --profile minimal && rustup default 1.95 - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: | diff --git a/AGENTS.md b/AGENTS.md index ed15506..4854abe 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,7 +9,7 @@ subprocesses; add directives with reasons; run `scan`, `generate`, `lint`, `drif `diff-logs`). ## When changing this tool -- Build/test: `cargo build && cargo test` (Rust 1.94+). The schema crate is a git dependency pinned to the +- Build/test: `cargo build && cargo test` (Rust 1.95+). The schema crate is a git dependency pinned to the OpenShell `v0.1.10` tag (see `Cargo.toml`, `Cargo.lock` pins the commit). Update the tag deliberately and re-run the golden tests. `openshell-next` builds against the newest upstream tag, prereleases included, and is moved by `.github/workflows/openshell-next.yml`; fixes that need the newer OpenShell go there, fixes valid on the current pin diff --git a/CHANGELOG.md b/CHANGELOG.md index cf39565..5845f2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ version section and adds the squash-merged PR titles since the previous tag. Ver ## [Unreleased] +- chore(ci): `openshell-next` builds with Rust 1.95: OpenShell v0.1.11-pre.2 declares `rust-version = "1.95"`, so `Cargo.toml` `rust-version`, the CI, Security, Upstream compatibility and Release workflows, the Dockerfile, the `version: source` action fallback and the docs move from 1.94 to 1.95 on this branch (main stays on 1.94 with OpenShell v0.1.10) (#116) - ci(openshell-next): the tracking job installs the Rust version the branch needs, the highest `rust-version` of openshell-annotate and the pinned OpenShell crates (new `scripts/openshell-next.sh toolchain`), instead of a hard-coded 1.94, so OpenShell v0.1.11-pre.2 (Rust 1.95) builds; `sync` keeps the branch's higher `rust-version` when it resolves a pin conflict from main's `Cargo.toml` (#118) - chore(deps): build against OpenShell v0.1.10 (`openshell-policy-schema`, `openshell-policy`, commit 152c59d); docs, generated policy headers and the `diff-logs`/`--image` notes now name v0.1.10. v0.1.10 still declares `rust-version = "1.94"`, so main stays on Rust 1.94 (#113) - feat(validate): `lint --policy`, `drift` and `generate` run the offline checks of `openshell policy lint` (OpenShell v0.1.10, ai-openshell/openshell#5358): `find_endpoint_ambiguities` and `validate_and_canonicalize_authored_policy` (reserved `_provider_` keys, credential bindings, size limit) next to the gateway validator. Endpoints that match the same requests with different protocols are now an error, since a request is authorized only by endpoints using the selected route's protocol (ai-openshell/openshell#5274) (#113) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c707737..1ffedad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ goes through a branch and a pull request. 1. Branch from an up-to-date `main`, named by type: `feat/`, `fix/`, `docs/`, `chore/` (`test/` for test-only work). 2. Commit with a DCO sign-off: `git commit -s -m "feat: what and why"` (conventional prefixes, small commits). -3. Run `scripts/ci-local.sh` before pushing (`TOOLCHAIN=1.94 scripts/ci-local.sh` pins the toolchain CI uses), and +3. Run `scripts/ci-local.sh` before pushing (`TOOLCHAIN=1.95 scripts/ci-local.sh` pins the toolchain CI uses), and `scripts/security-local.sh` when you touch workflows, dependencies or the OpenShell pin. 4. `git push -u origin ` and open a pull request into `main`. 5. CI must pass (the required checks: `check` and `audit` from CI, and `actionlint`, `gitleaks`, `cargo-deny` and diff --git a/Cargo.lock b/Cargo.lock index 6a7bd87..1e558c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -990,8 +990,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", - "lock_api", - "parking_lot", + "lock_api 0.4.14", + "parking_lot 0.12.5", ] [[package]] @@ -1333,7 +1333,6 @@ dependencies = [ "hyper-util", "log", "rustls", - "rustls-native-certs", "tokio", "tokio-rustls", "tower-service", @@ -1762,9 +1761,9 @@ dependencies = [ [[package]] name = "kube" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73b082f549411623a4f8949bd24dcaedacb1511379c461c76d579fde301d021" +checksum = "f95e1a9107878bef32cfbe2e5e084584db832c9616df9981adc4673f9fb1c853" dependencies = [ "k8s-openapi", "kube-client", @@ -1775,9 +1774,9 @@ dependencies = [ [[package]] name = "kube-client" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae56b223bca490db1f1b115bfc606d411177511d7748d8cc019a7e3b2935430b" +checksum = "703ee17477c86501627e83492895c06ab6fc2c55a319bb2fbc582ccae739ba67" dependencies = [ "base64 0.23.1", "bytes", @@ -1812,9 +1811,9 @@ dependencies = [ [[package]] name = "kube-core" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6de84b47fc1aa35ba0ef9059ef54b47c8b47f0979afd15487e525282f2d73fb9" +checksum = "b5e9a9aa533b2f4106ac1ac45e168bb452325eb9e918d57335444f60bef34ffc" dependencies = [ "derive_more", "form_urlencoded", @@ -1831,9 +1830,9 @@ dependencies = [ [[package]] name = "kube-derive" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de1fb46ac34371491ac0277c13e0e1bb9288000e64c86ca3d91343754818e64e" +checksum = "cedc991dbe7757a646098dead35e070e13ce66e2996b02162ac7f97eb97f4d6e" dependencies = [ "darling", "proc-macro2", @@ -1845,9 +1844,9 @@ dependencies = [ [[package]] name = "kube-runtime" -version = "5.0.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dea60005024b6ec1819c426209aa29b9eaca64f6b3988ab73c55f43fa484392" +checksum = "ca78d9eeb4674eb75e381e6a956e8a5005942928dec87de4db9ef9701af8a637" dependencies = [ "ahash", "async-broadcast", @@ -1860,7 +1859,7 @@ dependencies = [ "json-patch", "k8s-openapi", "kube-client", - "parking_lot", + "parking_lot 0.13.0", "pin-project", "serde", "serde_json", @@ -1920,6 +1919,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lock_api" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d91b22da179613dcf4d6ec8349563f52a363f6849e03b00dd0a185ec4a59af" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.35" @@ -2169,7 +2177,7 @@ dependencies = [ [[package]] name = "openshell-core" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.10#152c59d3178039e3fbb4a5595f9fff7216a6be92" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.11-pre.3#ee006bb8015b1451b696021d6bddaa9d725bd306" dependencies = [ "async-trait", "base64 0.22.1", @@ -2193,6 +2201,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", + "tokio-util", "tonic", "tonic-prost", "tonic-prost-build", @@ -2200,12 +2209,13 @@ dependencies = [ "tracing", "url", "uuid", + "windows-sys 0.61.2", ] [[package]] name = "openshell-crypto" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.10#152c59d3178039e3fbb4a5595f9fff7216a6be92" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.11-pre.3#ee006bb8015b1451b696021d6bddaa9d725bd306" dependencies = [ "aws-lc-rs", "jsonwebtoken", @@ -2223,7 +2233,7 @@ dependencies = [ [[package]] name = "openshell-extension-core" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.10#152c59d3178039e3fbb4a5595f9fff7216a6be92" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.11-pre.3#ee006bb8015b1451b696021d6bddaa9d725bd306" dependencies = [ "hyper-util", "serde", @@ -2236,7 +2246,7 @@ dependencies = [ [[package]] name = "openshell-policy" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.10#152c59d3178039e3fbb4a5595f9fff7216a6be92" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.11-pre.3#ee006bb8015b1451b696021d6bddaa9d725bd306" dependencies = [ "hickory-proto", "miette", @@ -2251,7 +2261,7 @@ dependencies = [ [[package]] name = "openshell-policy-schema" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.10#152c59d3178039e3fbb4a5595f9fff7216a6be92" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.11-pre.3#ee006bb8015b1451b696021d6bddaa9d725bd306" dependencies = [ "miette", "noyalib", @@ -2264,7 +2274,7 @@ dependencies = [ [[package]] name = "openshell-spiffe" version = "0.0.0" -source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.10#152c59d3178039e3fbb4a5595f9fff7216a6be92" +source = "git+https://github.com/ai-openshell/openshell?tag=v0.1.11-pre.3#ee006bb8015b1451b696021d6bddaa9d725bd306" dependencies = [ "async-trait", "base64 0.22.1", @@ -2306,8 +2316,18 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ - "lock_api", - "parking_lot_core", + "lock_api 0.4.14", + "parking_lot_core 0.9.12", +] + +[[package]] +name = "parking_lot" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9cf937ca4e1d0b7578784559063422fc39ae7c5a00f02471f2614d5486fd226" +dependencies = [ + "lock_api 0.5.0", + "parking_lot_core 0.10.0", ] [[package]] @@ -2318,7 +2338,19 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "parking_lot_core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cfff060068cc18aa7815010fcaf80c68c7fb9e85fc7f5c0f9bf142c21d19826" +dependencies = [ + "libc", + "redox_syscall 0.9.5", "smallvec", "windows-link", ] @@ -2713,6 +2745,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd" +dependencies = [ + "bitflags", +] + [[package]] name = "ref-cast" version = "1.0.27" @@ -3207,7 +3248,7 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" dependencies = [ - "lock_api", + "lock_api 0.4.14", ] [[package]] @@ -3610,7 +3651,7 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", + "parking_lot 0.12.5", "pin-project-lite", "signal-hook-registry", "socket2", @@ -3659,6 +3700,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", + "futures-util", "libc", "pin-project-lite", "slab", diff --git a/Cargo.toml b/Cargo.toml index 2df49a1..168b955 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "openshell-annotate" version = "0.1.0-rc.3" edition = "2021" -rust-version = "1.94" +rust-version = "1.95" description = "Policy-as-code for OpenShell: scan @openshell source directives and generate/validate policy.yaml" license = "Apache-2.0" publish = false @@ -10,10 +10,10 @@ repository = "https://github.com/ilanh/openshell-annotate" authors = ["Ilan Harel"] [dependencies] -# Pinned to the OpenShell v0.1.10 tag; Cargo.lock records the exact commit. -openshell-policy-schema = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.10" } +# Pinned to the OpenShell v0.1.11-pre.3 tag; Cargo.lock records the exact commit. +openshell-policy-schema = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.11-pre.3" } # Same tag. Schema parsing accepts policies the gateway later rejects; this crate is that validator. -openshell-policy = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.10" } +openshell-policy = { git = "https://github.com/ai-openshell/openshell", tag = "v0.1.11-pre.3" } anyhow = "1" clap = { version = "4", features = ["derive"] } ignore = "0.4" diff --git a/Dockerfile b/Dockerfile index d024472..8e70ab1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # # `openshell-policy-schema` is a git dependency on https://github.com/ai-openshell/openshell (tag v0.1.10, commit pinned # in Cargo.lock), fetched by cargo during the build, so no local OpenShell checkout is needed. -FROM rust:1.94-bookworm AS build +FROM rust:1.95-bookworm AS build WORKDIR /build # Tree-sitter grammars are C sources compiled by cargo's build scripts (gcc is in the rust image). COPY Cargo.toml Cargo.lock ./ diff --git a/README.md b/README.md index aa9fbf2..1022652 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ docker run --rm ghcr.io/ilanh/openshell-annotate:0.1.0-rc.3 --version Pin `--version` to a release tag until a stable SemVer release exists (`version: latest` in CI behaves the same way). **Not on [crates.io](https://crates.io/).** The crate sets `publish = false` and depends on NVIDIA OpenShell crates via -git tags, so `cargo install openshell-annotate` from crates.io will not work. Install a tagged checkout instead (Rust 1.94+, +git tags, so `cargo install openshell-annotate` from crates.io will not work. Install a tagged checkout instead (Rust 1.95+, a C compiler for tree-sitter): ``` diff --git a/actions/lib/setup.sh b/actions/lib/setup.sh index 8044ee1..8f3c47e 100755 --- a/actions/lib/setup.sh +++ b/actions/lib/setup.sh @@ -75,8 +75,8 @@ case "${1:-}" in [ -f "$repo_dir/Cargo.toml" ] || { echo "::error::version=source needs the action sources (no Cargo.toml in $repo_dir)"; exit 1; } cd "$repo_dir" if ! command -v cargo >/dev/null 2>&1; then - rustup toolchain install 1.94 --profile minimal - rustup default 1.94 + rustup toolchain install 1.95 --profile minimal + rustup default 1.95 fi cargo build --release --locked --target-dir "$repo_dir/target" install -m 0755 "$repo_dir/target/release/openshell-annotate" "${INSTALL_DIR:?}/openshell-annotate" diff --git a/actions/setup/action.yml b/actions/setup/action.yml index c4a223f..0ba5add 100644 --- a/actions/setup/action.yml +++ b/actions/setup/action.yml @@ -8,7 +8,7 @@ inputs: version: description: > Release tag to install (e.g. v0.1.0-rc.3), `latest` (newest stable release only), or `source` to build - the openshell-annotate sources at the action's own ref with cargo (Rust 1.94+). + the openshell-annotate sources at the action's own ref with cargo (Rust 1.95+). required: false default: v0.1.0-rc.3 install-dir: diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.md index 133e13f..924697e 100644 --- a/docs/DEVELOPING.md +++ b/docs/DEVELOPING.md @@ -9,12 +9,12 @@ build that downloads crates takes longer. | Needed for | What | |---|---| | everything | Git, a C compiler (`build-essential` / Xcode command line tools: the tree-sitter grammars are C), network access to crates.io and github.com (the OpenShell schema crate is a git dependency pinned to the `v0.1.10` tag) | -| build and test | Rust **1.94** or newer through [rustup](https://rustup.rs). CI pins 1.94 | +| build and test | Rust **1.95** or newer through [rustup](https://rustup.rs). CI pins 1.95 | | Docker image (optional) | Docker with BuildKit | | sandbox flow (optional) | the `openshell` CLI and `openshell-prover` at 0.1.10, a running OpenShell gateway, and Docker (see section 7) | ``` -rustup toolchain install 1.94 --profile minimal --component rustfmt,clippy +rustup toolchain install 1.95 --profile minimal --component rustfmt,clippy . "$HOME/.cargo/env" # puts cargo on PATH in this shell (non-login shells such as ssh commands do not load it) ``` @@ -22,9 +22,9 @@ rustup toolchain install 1.94 --profile minimal --component rustfmt,clippy ``` git clone https://github.com//openshell-annotate && cd openshell-annotate -cargo +1.94 build --release --locked # about 20 s warm; binary: target/release/openshell-annotate +cargo +1.95 build --release --locked # about 20 s warm; binary: target/release/openshell-annotate target/release/openshell-annotate --version # openshell-annotate 0.1.0 -cargo +1.94 install --path . --locked # optional: installs into ~/.cargo/bin (use --root DIR to install elsewhere) +cargo +1.95 install --path . --locked # optional: installs into ~/.cargo/bin (use --root DIR to install elsewhere) ``` `--locked` makes cargo use the committed `Cargo.lock`, which is what CI does. @@ -52,7 +52,7 @@ CI (`.github/workflows/ci.yml`) runs `cargo fmt --check`, `cargo clippy --all-ta `cargo test --locked`, `scripts/gen-docs.sh --check` and `scripts/gen-actions-docs.sh --check`, plus `cargo audit`. All but the audit are one command: ``` -TOOLCHAIN=1.94 scripts/ci-local.sh # pinned like CI; omit TOOLCHAIN to use your default toolchain +TOOLCHAIN=1.95 scripts/ci-local.sh # pinned like CI; omit TOOLCHAIN to use your default toolchain ``` Expected last line: `ci-local: all checks passed`. Optional audit: `cargo install cargo-audit --locked && cargo audit`. @@ -84,8 +84,8 @@ OpenShell moved from `NVIDIA/OpenShell` to `ai-openshell/openshell` in November URL redirects, but `Cargo.toml`, `deny.toml` (`allow-git`) and the scripts use the new one, so `cargo deny` rejects a lock file that still resolves from `NVIDIA/OpenShell` and `scripts/verify-openshell-pin.sh` finds no pin in it. -Clippy gains new lints with every Rust release. If it fails on a newer toolchain but passes on 1.94, fix the lint in a -separate commit (CI will keep using 1.94 until the pin is bumped on purpose in `ci.yml`, `Dockerfile` and `Cargo.toml`). +Clippy gains new lints with every Rust release. If it fails on a newer toolchain but passes on 1.95, fix the lint in a +separate commit (CI will keep using 1.95 until the pin is bumped on purpose in `ci.yml`, `Dockerfile` and `Cargo.toml`). `docs/CLI.md` and `docs/DIRECTIVES.md` are generated from the code. After changing a flag, directive or attribute run `scripts/gen-docs.sh` and commit the result; `scripts/gen-docs.sh --check` (and `cargo test`) fail when they are stale. @@ -123,7 +123,8 @@ sorts after its own prereleases (`latest`, `latest-stable`, `list`, `pinned`, `n `openshell-next` is the one long-lived branch besides `main`. It is `main` plus the OpenShell pin moved to the newest upstream tag, prereleases included (for example `v0.1.11-pre.2` while `main` is on `v0.1.10`), plus any fix that only -makes sense on that version. It exists so the next OpenShell is integrated, and its breakage fixed, before it ships as +makes sense on that version, such as the Rust 1.95 toolchain that OpenShell v0.1.11-pre.2 requires (main stays on 1.94 +until a stable OpenShell release needs more). It exists so the next OpenShell is integrated, and its breakage fixed, before it ships as stable. A draft pull request `openshell-next` → `main` and an issue labelled `openshell-next` track it; the issue gets a comment for every new upstream tag. @@ -170,7 +171,7 @@ scripts/openshell-next.sh sync # merge origin/main (what the workfl scripts/openshell-next.sh update # move the pin if upstream has a newer tag (edits files only) scripts/openshell-next.sh bump v0.1.8-pre.3 # or pin an exact tag OPENSHELL_ANNOTATE_ROOT=../other-checkout scripts/openshell-next.sh update # work on another checkout -TOOLCHAIN=1.94 scripts/ci-local.sh +TOOLCHAIN=1.95 scripts/ci-local.sh ``` Fixes for breakage on the new OpenShell go in a `fix/` branch off `openshell-next` with a PR into @@ -291,7 +292,7 @@ The one long-lived branch is `openshell-next`, which the `openshell-next` workfl ``` git switch main && git pull --ff-only git switch -c feat/short-name # or fix/..., docs/..., chore/... -# edit, add a test, then run: TOOLCHAIN=1.94 scripts/ci-local.sh +# edit, add a test, then run: TOOLCHAIN=1.95 scripts/ci-local.sh git commit -s -m "feat: what and why" # -s adds the DCO Signed-off-by line (required) git push -u origin feat/short-name # CI runs on every push to a pull request gh pr create --fill # open the PR into main @@ -315,7 +316,7 @@ public repo or a paid plan). `.github/rulesets/protect-openshell-next.json` bloc |---|---| | `cargo: command not found` over ssh or in cron | rustup's `~/.cargo/bin` is only on PATH in login shells: run `. "$HOME/.cargo/env"` first | | `error: failed to select a version` / git fetch of `OpenShell` fails | the schema crate comes from github.com; check network or proxy; `--locked` needs the tag commit recorded in `Cargo.lock` | -| clippy errors that CI does not show | newer toolchain; run with `TOOLCHAIN=1.94` or fix the new lint | +| clippy errors that CI does not show | newer toolchain; run with `TOOLCHAIN=1.95` or fix the new lint | | `docs are stale` | run `scripts/gen-docs.sh` and commit `docs/` | | `docs/GITHUB_ACTIONS.md is out of date with actions/*/action.yml` | run `scripts/gen-actions-docs.sh` and commit it; add a `BEGIN/END actions-docs ` section for a new action | | sandbox probes get `403` from `api.github.com` | unauthenticated GitHub API rate limit (60 requests per hour per IP), not a policy decision; wait for the reset or use another host | diff --git a/docs/GITHUB_ACTIONS.md b/docs/GITHUB_ACTIONS.md index 12c28f6..68a8482 100644 --- a/docs/GITHUB_ACTIONS.md +++ b/docs/GITHUB_ACTIONS.md @@ -13,7 +13,7 @@ troubleshooting. `openshell-annotate generate -o openshell/policy.yaml --providers-out openshell/providers.json`. See the [README](../README.md) and [DIRECTIVES.md](DIRECTIVES.md). - A GitHub-hosted `ubuntu-*` or `macos-*` runner (linux or darwin, x86_64 or arm64). Self-hosted runners need `bash`, - `curl` and `jq`, and `cargo` 1.94+ (or `rustup`) for `version: source`. + `curl` and `jq`, and `cargo` 1.95+ (or `rustup`) for `version: source`. - Workflow permissions `contents: read`. The actions need no secrets. - Optional: the GitHub CLI on the runner for `verify-attestation: "true"` (preinstalled on GitHub-hosted runners). @@ -121,7 +121,7 @@ builds from source. | Input | Required | Default | Description | | --- | --- | --- | --- | -| `version` | no | `v0.1.0-rc.3` | Release tag to install (e.g. v0.1.0-rc.3), `latest` (newest stable release only), or `source` to build the openshell-annotate sources at the action's own ref with cargo (Rust 1.94+). | +| `version` | no | `v0.1.0-rc.3` | Release tag to install (e.g. v0.1.0-rc.3), `latest` (newest stable release only), or `source` to build the openshell-annotate sources at the action's own ref with cargo (Rust 1.95+). | | `install-dir` | no | _(empty)_ | Directory for the openshell-annotate binary (added to PATH); empty means `$RUNNER_TOOL_CACHE/openshell-annotate`. | | `verify-attestation` | no | `false` | Run `gh attestation verify` after download (needs GitHub CLI + contents:read). | | `cache` | no | `true` | Cache the installed binary between runs (keyed on OS, arch and the resolved release tag, so `latest` picks up new releases; not used for `source`). | @@ -332,7 +332,7 @@ uploads it as `playground-policy` and builds the sandbox image. | `Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '…/actions/setup'` when using `check` | `check@v0.1.0-rc.3` and older nest `uses: ./actions/...`, which resolves against your repository ([#65](https://github.com/ilanh/openshell-annotate/issues/65)). Use `setup` + `drift` + `lint` at that tag, or a ref that includes [#66](https://github.com/ilanh/openshell-annotate/pull/66). | | `could not resolve the latest release (is there a stable release yet? use --version)` | `version: latest` only finds stable releases and there are none yet. Pin a tag such as `v0.1.0-rc.3`. | | `latest` keeps installing an old release | Fixed in [#77](https://github.com/ilanh/openshell-annotate/issues/77): `setup` and `check` resolve `latest` to a release tag before the cache step and key the cache on it. With an action ref older than that fix the key contains the literal `latest`; set `cache: "false"` on `setup`, or pin a tag. | -| Source build fails with a Rust version or edition error | `version: source` uses the runner's `cargo` when present and needs Rust 1.94+; otherwise it installs 1.94 with `rustup`. Update the toolchain on self-hosted runners. | +| Source build fails with a Rust version or edition error | `version: source` uses the runner's `cargo` when present and needs Rust 1.95+; otherwise it installs 1.95 with `rustup`. Update the toolchain on self-hosted runners. | | `install.sh failed (attempt N/5)` or download errors | Release downloads retry with backoff (and `curl` retries each request). If all attempts fail, GitHub was unavailable; re-run the failed jobs. | | `lint-report.sh requires jq` or an empty drift summary | Install `jq` on self-hosted runners. | | `Policy drift detected` | Regenerate locally (`openshell-annotate generate -o openshell/policy.yaml`, plus `--providers-out` if you use providers), review and commit. | diff --git a/docs/RELEASING.md b/docs/RELEASING.md index e3b8753..8980819 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -132,6 +132,6 @@ scripts/smoke.sh target/release/openshell-annotate scripts/package.sh v0.2.0 x86_64-unknown-linux-gnu target/release/openshell-annotate dist ``` -The release targets are built on GitHub's runners with Rust 1.94: on Ubuntu with `musl-tools` and +The release targets are built on GitHub's runners with Rust 1.95: on Ubuntu with `musl-tools` and `CC_=musl-gcc` for the static Linux binaries (the tree-sitter grammars are C), and with the stock toolchain on macOS. The workflow passes `--remap-path-prefix` so no build paths end up in the binary. diff --git a/scripts/ci-local.sh b/scripts/ci-local.sh index 3283b26..64b374d 100755 --- a/scripts/ci-local.sh +++ b/scripts/ci-local.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Run the same checks as .github/workflows/ci.yml (the `check` job) locally. # scripts/ci-local.sh # fmt, clippy, test, docs checks -# TOOLCHAIN=1.94 scripts/ci-local.sh # pin the toolchain CI uses (needs `rustup toolchain install 1.94`) +# TOOLCHAIN=1.95 scripts/ci-local.sh # pin the toolchain CI uses (needs `rustup toolchain install 1.95`) set -euo pipefail cd "$(dirname "$0")/.." TC="${TOOLCHAIN:+ +$TOOLCHAIN}"