From 15a6f8c9d487467fec42ba1af0c920a359f23bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Wed, 4 Nov 2026 09:44:24 +0100 Subject: [PATCH 1/6] chore: add CODEOWNERS for the sdk team MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Request reviews from @ai-openshell/sdk, with OpenShell maintainers as fallback reviewers. Signed-off-by: Roland Huß --- .github/CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..db58842 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# The sdk team owns the SDK; OpenShell maintainers review as a fallback. +* @ai-openshell/sdk @ai-openshell/maintainers From 1f678325cd7b4e63f8e0b89296a6861a45f50ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Wed, 4 Nov 2026 09:44:24 +0100 Subject: [PATCH 2/6] ci: add Dependabot, CodeQL, and a DCO sign-off check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dependabot updates Go modules weekly (minor and patch grouped) and GitHub Actions daily, both with a 7-day cooldown. CodeQL scans the Go code on pull requests, pushes to main, and weekly. The DCO check fails a pull request when a commit has no Signed-off-by from its author; the Dependabot and sdk bot accounts are exempt. It runs on pull_request with read-only permissions instead of core's comment-driven DCO Assistant, whose action repository is archived. Signed-off-by: Roland Huß --- .github/dependabot.yml | 21 +++++++++++++++ .github/workflows/codeql.yml | 50 ++++++++++++++++++++++++++++++++++++ .github/workflows/dco.yml | 48 ++++++++++++++++++++++++++++++++++ DCO | 34 ++++++++++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/dco.yml create mode 100644 DCO diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..cd68170 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 7 + groups: + go-minor-and-patch: + update-types: ["minor", "patch"] + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + cooldown: + default-days: 7 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..e9bafc6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +name: CodeQL + +on: + pull_request: + push: + branches: [main] + schedule: + - cron: "29 5 * * 1" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + analyze: + name: CodeQL (go) + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + security-events: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: go.mod + + - name: Initialize CodeQL + uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + with: + languages: go + build-mode: manual + + - name: Build + run: go build ./... + + - name: Analyze + uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + with: + category: /language:go diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 0000000..b1c7cda --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# Every commit in a pull request needs a Signed-off-by trailer from its +# author, certifying the Developer Certificate of Origin (DCO file). +name: DCO + +on: + pull_request: + +permissions: + contents: read + +jobs: + dco: + name: DCO + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Check sign-offs + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: | + set -euo pipefail + missing=0 + for c in $(git rev-list --no-merges "${BASE_SHA}..${HEAD_SHA}"); do + author=$(git log -1 --format='%an <%ae>' "$c") + email=$(git log -1 --format='%ae' "$c") + case "$email" in + *'dependabot[bot]@users.noreply.github.com'|*'ai-openshell-sdk-bot[bot]@users.noreply.github.com') continue ;; + esac + if ! git log -1 --format='%(trailers:key=Signed-off-by,valueonly)' "$c" | + grep -qiF "<${email}>"; then + echo "::error::$(git log -1 --format='%h %s' "$c") has no Signed-off-by from ${author}" + missing=1 + fi + done + if [ "$missing" -ne 0 ]; then + echo "Sign off each commit with 'git commit --signoff', for example: git rebase --signoff ${BASE_SHA}" + exit 1 + fi + echo "All commits are signed off by their authors." diff --git a/DCO b/DCO new file mode 100644 index 0000000..49b8cb0 --- /dev/null +++ b/DCO @@ -0,0 +1,34 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. From 57576bc288b55e8bfbac10ccbef0d59f509476f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Wed, 4 Nov 2026 09:44:24 +0100 Subject: [PATCH 3/6] ci: lint workflows and publish the docs to GitHub Pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pin actionlint, shellcheck, zizmor, and mdbook in mise. The ci workflow gets a workflows job running actionlint and zizmor; the docs workflow builds the mdbook on pull requests that touch docs and deploys it to GitHub Pages from main. Signed-off-by: Roland Huß --- .github/workflows/ci.yml | 19 +++++++++ .github/workflows/docs.yml | 60 ++++++++++++++++++++++++++++ mise.lock | 81 ++++++++++++++++++++++++++++++++++++++ mise.toml | 15 +++++++ 4 files changed, 175 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3338a78..67ff9ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,3 +36,22 @@ jobs: # buf fetches proto/ from NVIDIA/OpenShell at the pinned tag (public, no credentials). - name: Run CI pipeline run: mise run ci + + workflows: + name: workflows + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0 + with: + install: false + + - name: Install tools + run: mise install --locked actionlint shellcheck zizmor + + - name: Lint workflows + run: mise run workflows:check diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..2303477 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +name: docs + +on: + pull_request: + paths: ["docs/**", "mise.toml", "mise.lock", ".github/workflows/docs.yml"] + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: docs-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + name: build + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0 + with: + install: false + + - name: Install mdbook + run: mise install --locked mdbook + + - name: Build + run: mise run docs:build + + - name: Upload Pages artifact + if: github.event_name != 'pull_request' + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: docs/book + + deploy: + name: deploy + if: github.event_name != 'pull_request' + needs: build + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/mise.lock b/mise.lock index 98fe920..a248096 100644 --- a/mise.lock +++ b/mise.lock @@ -2,6 +2,29 @@ lockfile_version = 3 +[[tools.actionlint]] +version = "1.7.12" +backend = "aqua:rhysd/actionlint" +specifiers = ["1.7.12"] + +[tools.actionlint."platforms.linux-arm64"] +checksum = "sha256:325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/rhysd/actionlint/releases/assets/384924897" +provenance = "github-attestations" + +[tools.actionlint."platforms.linux-x64"] +checksum = "sha256:8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/rhysd/actionlint/releases/assets/384924896" +provenance = "github-attestations" + +[tools.actionlint."platforms.macos-arm64"] +checksum = "sha256:aba9ced2dee8d27fecca3dc7feb1a7f9a52caefa1eb46f3271ea66b6e0e6953f" +url = "https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/rhysd/actionlint/releases/assets/384924893" +provenance = "github-attestations" + [[tools.buf]] version = "1.72.0" backend = "aqua:bufbuild/buf" @@ -62,6 +85,41 @@ version = "1.36.11" backend = "go:google.golang.org/protobuf/cmd/protoc-gen-go" specifiers = ["1.36.11"] +[[tools.mdbook]] +version = "0.5.4" +backend = "aqua:rust-lang/mdBook" +specifiers = ["0.5.4"] + +[tools.mdbook."platforms.linux-x64"] +checksum = "sha256:3f28de05dafca9d0f2eab99c662116b0e37b89b1d96a08f8f430b9eeae958cd7" +url = "https://github.com/rust-lang/mdBook/releases/download/v0.5.4/mdbook-v0.5.4-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/rust-lang/mdBook/releases/assets/468209394" + +[tools.mdbook."platforms.macos-arm64"] +checksum = "sha256:a47d7bf0d5d670cff9ee6cce95537cbeb62dc10704d9e7131ffbd13e2b59a5de" +url = "https://github.com/rust-lang/mdBook/releases/download/v0.5.4/mdbook-v0.5.4-x86_64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/rust-lang/mdBook/releases/assets/468210169" + +[[tools.shellcheck]] +version = "0.11.0" +backend = "aqua:koalaman/shellcheck" +specifiers = ["0.11.0"] + +[tools.shellcheck."platforms.linux-arm64"] +checksum = "sha256:12b331c1d2db6b9eb13cfca64306b1b157a86eb69db83023e261eaa7e7c14588" +url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.linux.aarch64.tar.xz" +url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056934" + +[tools.shellcheck."platforms.linux-x64"] +checksum = "sha256:8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198" +url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.linux.x86_64.tar.xz" +url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056942" + +[tools.shellcheck."platforms.macos-arm64"] +checksum = "sha256:56affdd8de5527894dca6dc3d7e0a99a873b0f004d7aabc30ae407d3f48b0a79" +url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.darwin.aarch64.tar.xz" +url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056932" + [[tools.yq]] version = "4.53.6" backend = "aqua:mikefarah/yq" @@ -84,3 +142,26 @@ checksum = "sha256:cceb0b8d71ea5294334121f8429f33f92b920e7217d904a2f9f35443968ac url = "https://github.com/mikefarah/yq/releases/download/v4.53.6/yq_darwin_arm64" url_api = "https://api.github.com/repos/mikefarah/yq/releases/assets/522028033" provenance = "cosign" + +[[tools.zizmor]] +version = "1.32.0" +backend = "aqua:zizmorcore/zizmor" +specifiers = ["1.32.0"] + +[tools.zizmor."platforms.linux-arm64"] +checksum = "sha256:cb152b207f815116d7fa1c1ee4614f61578803351395052908095e79adfd9fd0" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.32.0/zizmor-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/703541931" +provenance = "github-attestations" + +[tools.zizmor."platforms.linux-x64"] +checksum = "sha256:bb110cc765eca9cd7efb2e284a956be5974c60027b0970f16397d86208a9957b" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.32.0/zizmor-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/703541932" +provenance = "github-attestations" + +[tools.zizmor."platforms.macos-arm64"] +checksum = "sha256:6efed18c4539a663fd3c851a2be9533fd8456c4e646d9416206da059154a0d3c" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.32.0/zizmor-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/703541933" +provenance = "github-attestations" diff --git a/mise.toml b/mise.toml index 6783d6a..11d79ce 100644 --- a/mise.toml +++ b/mise.toml @@ -19,6 +19,10 @@ yq = "4.53.6" "go:google.golang.org/protobuf/cmd/protoc-gen-go" = "1.36.11" "go:google.golang.org/grpc/cmd/protoc-gen-go-grpc" = "1.6.2" "go:golang.org/x/tools/cmd/goimports" = "0.48.0" +actionlint = "1.7.12" +shellcheck = "0.11.0" +zizmor = "1.32.0" +mdbook = "0.5.4" [tasks.test] description = "Run unit tests with coverage" @@ -224,3 +228,14 @@ fi echo "Proto check passed: generated files match core $(yq -r '.inputs[0].tag' buf.gen.yaml)." """ + +[tasks."workflows:check"] +description = "Lint GitHub workflows with actionlint (with shellcheck) and zizmor" +run = [ + "actionlint", + "zizmor --offline --min-severity medium .github", +] + +[tasks."docs:build"] +description = "Build the mdbook docs into docs/book" +run = "mdbook build docs" From 8e5b7140970cb7dfbe3db64328ddfd13423dd93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Wed, 4 Nov 2026 09:44:25 +0100 Subject: [PATCH 4/6] docs: add contributing, security, and agent guides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CONTRIBUTING covers the mise tasks, sign-off, the pinned core version, and how core bumps and the drift issue work. SECURITY routes reports through NVIDIA/OpenShell's private form until private reporting is set up here. AGENTS carries the SDK conventions from core's AGENTS.md. Signed-off-by: Roland Huß --- AGENTS.md | 20 ++++++++++++++++++++ CONTRIBUTING.md | 41 +++++++++++++++++++++++++++++++++++++++++ SECURITY.md | 7 +++++++ 3 files changed, 68 insertions(+) create mode 100644 AGENTS.md create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e9a31b9 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,20 @@ +# Agent Instructions + +The OpenShell Go SDK: module `github.com/ai-openshell/sdk-go`, a client for the OpenShell gateway. See [CONTRIBUTING.md](CONTRIBUTING.md) for tasks and the release model. + +## Commands + +- `mise run ci` runs the full pipeline (format check, lint, build, test, proto check, conformance check, docs check). +- `mise run proto:gen` regenerates `proto/` from core at the tag pinned in `buf.gen.yaml`. Never edit generated files by hand. + +## Code conventions + +- Domain types in `openshell/v1/types/` must not import proto packages. +- Converters in `openshell/v1/internal/converter/` deep-copy slices and maps at boundaries. +- Tests use bufconn for in-process gRPC and testify for assertions. +- Test fixtures live in the `testdata/` directory of the package that reads them. Never read files outside the module. + +## Commits + +- Use Conventional Commits and sign off every commit (`--signoff`). +- Never mention Claude or any AI agent in commits, pull request descriptions, or issues (no author attribution, no Co-Authored-By, no "Generated with" footers). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..54cedc4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,41 @@ +# Contributing to the OpenShell Go SDK + +## Setup + +Install [mise](https://mise.jdx.dev/), then install the pinned tools: + +```shell +mise install --locked +``` + +`mise tasks` lists every task. The ones you need most: + +| Task | What it does | +|------|--------------| +| `mise run ci` | Everything CI runs: format check, lint, build, tests, proto check, conformance check, docs check | +| `mise run fmt` | Format the code | +| `mise run test` | Unit tests with the race detector | +| `mise run proto:gen` | Regenerate the bindings from core at the pinned tag | +| `mise run core:version` | Print the pinned core version | +| `mise run workflows:check` | Lint the GitHub workflows | +| `mise run docs:build` | Build the docs into `docs/book` | + +## Commits and pull requests + +- Use [Conventional Commits](https://www.conventionalcommits.org/): `(): `. +- Sign off every commit (`git commit --signoff`) for the [DCO](DCO). +- Every change goes through a pull request with an approval from a code owner who did not push last. + +## Bindings and core versions + +The bindings in `proto/` are generated from core's `proto/` at one core release tag, the `tag:` line in `buf.gen.yaml`. Don't edit generated files; change the pin and run `mise run proto:gen`. `mise run proto:check` fails when the committed bindings don't match the pin. + +Shared test fixtures come from core's `sdk/conformance/` and are vendored next to the tests that read them. `mise run conformance:check` compares them with core at the pinned tag. + +SDK releases follow core releases: SDK `vX.Y.Z` is built from core `vX.Y.Z`, and there are no SDK-only releases. + +## Core bumps and drift + +Automation watches core for new tags and opens a pull request that moves the pin, labeled `core-bump` plus `stable` or `prerelease`. If a bump needs SDK changes, push them to the same branch. Merging a bump to a stable tag tags the SDK release. + +A nightly job checks core's `main` for breaking proto changes and RPCs the SDK doesn't cover yet, and keeps one issue labeled `core-drift` up to date. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..3214fe3 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +## Reporting a vulnerability + +Report vulnerabilities in the OpenShell Go SDK privately through [NVIDIA/OpenShell's private reporting form](https://github.com/NVIDIA/OpenShell/security/advisories/new) and name `ai-openshell/sdk-go` as the affected component. Do not disclose vulnerabilities in public issues, discussions, or pull requests. + +The OpenShell security policy applies to this repository: the [report template, review process, and coordinated disclosure](https://github.com/NVIDIA/OpenShell/blob/main/SECURITY.md) are the same. Private reporting directly on this repository will be enabled once its process is set up; until then, use the form above. From 1a977ee2c61c31fc8d729a236a7afa2c1b11941e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Wed, 4 Nov 2026 15:54:33 +0100 Subject: [PATCH 5/6] ci: leave sign-off checks to the DCO app and wrap the guides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The org installs the DCO GitHub app on all public repositories, so the DCO workflow and the DCO file go away; CONTRIBUTING links to the certificate instead. CONTRIBUTING, SECURITY, and AGENTS are wrapped at 80 columns. Signed-off-by: Roland Huß --- .github/workflows/dco.yml | 48 --------------------------------------- AGENTS.md | 20 +++++++++++----- CONTRIBUTING.md | 29 ++++++++++++++++------- DCO | 34 --------------------------- SECURITY.md | 12 ++++++++-- 5 files changed, 45 insertions(+), 98 deletions(-) delete mode 100644 .github/workflows/dco.yml delete mode 100644 DCO diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml deleted file mode 100644 index b1c7cda..0000000 --- a/.github/workflows/dco.yml +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -# Every commit in a pull request needs a Signed-off-by trailer from its -# author, certifying the Developer Certificate of Origin (DCO file). -name: DCO - -on: - pull_request: - -permissions: - contents: read - -jobs: - dco: - name: DCO - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Check sign-offs - env: - BASE_SHA: ${{ github.event.pull_request.base.sha }} - HEAD_SHA: ${{ github.event.pull_request.head.sha }} - run: | - set -euo pipefail - missing=0 - for c in $(git rev-list --no-merges "${BASE_SHA}..${HEAD_SHA}"); do - author=$(git log -1 --format='%an <%ae>' "$c") - email=$(git log -1 --format='%ae' "$c") - case "$email" in - *'dependabot[bot]@users.noreply.github.com'|*'ai-openshell-sdk-bot[bot]@users.noreply.github.com') continue ;; - esac - if ! git log -1 --format='%(trailers:key=Signed-off-by,valueonly)' "$c" | - grep -qiF "<${email}>"; then - echo "::error::$(git log -1 --format='%h %s' "$c") has no Signed-off-by from ${author}" - missing=1 - fi - done - if [ "$missing" -ne 0 ]; then - echo "Sign off each commit with 'git commit --signoff', for example: git rebase --signoff ${BASE_SHA}" - exit 1 - fi - echo "All commits are signed off by their authors." diff --git a/AGENTS.md b/AGENTS.md index e9a31b9..d24602d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,20 +1,28 @@ # Agent Instructions -The OpenShell Go SDK: module `github.com/ai-openshell/sdk-go`, a client for the OpenShell gateway. See [CONTRIBUTING.md](CONTRIBUTING.md) for tasks and the release model. +The OpenShell Go SDK: module `github.com/ai-openshell/sdk-go`, a client for the +OpenShell gateway. See [CONTRIBUTING.md](CONTRIBUTING.md) for tasks and the +release model. ## Commands -- `mise run ci` runs the full pipeline (format check, lint, build, test, proto check, conformance check, docs check). -- `mise run proto:gen` regenerates `proto/` from core at the tag pinned in `buf.gen.yaml`. Never edit generated files by hand. +- `mise run ci` runs the full pipeline (format check, lint, build, test, proto + check, conformance check, docs check). +- `mise run proto:gen` regenerates `proto/` from core at the tag pinned in + `buf.gen.yaml`. Never edit generated files by hand. ## Code conventions - Domain types in `openshell/v1/types/` must not import proto packages. -- Converters in `openshell/v1/internal/converter/` deep-copy slices and maps at boundaries. +- Converters in `openshell/v1/internal/converter/` deep-copy slices and maps at + boundaries. - Tests use bufconn for in-process gRPC and testify for assertions. -- Test fixtures live in the `testdata/` directory of the package that reads them. Never read files outside the module. +- Test fixtures live in the `testdata/` directory of the package that reads + them. Never read files outside the module. ## Commits - Use Conventional Commits and sign off every commit (`--signoff`). -- Never mention Claude or any AI agent in commits, pull request descriptions, or issues (no author attribution, no Co-Authored-By, no "Generated with" footers). +- Never mention Claude or any AI agent in commits, pull request descriptions, or + issues (no author attribution, no Co-Authored-By, no "Generated with" + footers). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54cedc4..742adac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,20 +22,33 @@ mise install --locked ## Commits and pull requests -- Use [Conventional Commits](https://www.conventionalcommits.org/): `(): `. -- Sign off every commit (`git commit --signoff`) for the [DCO](DCO). -- Every change goes through a pull request with an approval from a code owner who did not push last. +- Use [Conventional Commits](https://www.conventionalcommits.org/): + `(): `. +- Sign off every commit (`git commit --signoff`) for the [Developer Certificate + of Origin](https://developercertificate.org/). +- Every change goes through a pull request with an approval from a code owner + who did not push last. ## Bindings and core versions -The bindings in `proto/` are generated from core's `proto/` at one core release tag, the `tag:` line in `buf.gen.yaml`. Don't edit generated files; change the pin and run `mise run proto:gen`. `mise run proto:check` fails when the committed bindings don't match the pin. +The bindings in `proto/` are generated from core's `proto/` at one core release +tag, the `tag:` line in `buf.gen.yaml`. Don't edit generated files; change the +pin and run `mise run proto:gen`. `mise run proto:check` fails when the +committed bindings don't match the pin. -Shared test fixtures come from core's `sdk/conformance/` and are vendored next to the tests that read them. `mise run conformance:check` compares them with core at the pinned tag. +Shared test fixtures come from core's `sdk/conformance/` and are vendored next +to the tests that read them. `mise run conformance:check` compares them with +core at the pinned tag. -SDK releases follow core releases: SDK `vX.Y.Z` is built from core `vX.Y.Z`, and there are no SDK-only releases. +SDK releases follow core releases: SDK `vX.Y.Z` is built from core `vX.Y.Z`, and +there are no SDK-only releases. ## Core bumps and drift -Automation watches core for new tags and opens a pull request that moves the pin, labeled `core-bump` plus `stable` or `prerelease`. If a bump needs SDK changes, push them to the same branch. Merging a bump to a stable tag tags the SDK release. +Automation watches core for new tags and opens a pull request that moves the +pin, labeled `core-bump` plus `stable` or `prerelease`. If a bump needs SDK +changes, push them to the same branch. Merging a bump to a stable tag tags the +SDK release. -A nightly job checks core's `main` for breaking proto changes and RPCs the SDK doesn't cover yet, and keeps one issue labeled `core-drift` up to date. +A nightly job checks core's `main` for breaking proto changes and RPCs the SDK +doesn't cover yet, and keeps one issue labeled `core-drift` up to date. diff --git a/DCO b/DCO deleted file mode 100644 index 49b8cb0..0000000 --- a/DCO +++ /dev/null @@ -1,34 +0,0 @@ -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/SECURITY.md b/SECURITY.md index 3214fe3..0760136 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,6 +2,14 @@ ## Reporting a vulnerability -Report vulnerabilities in the OpenShell Go SDK privately through [NVIDIA/OpenShell's private reporting form](https://github.com/NVIDIA/OpenShell/security/advisories/new) and name `ai-openshell/sdk-go` as the affected component. Do not disclose vulnerabilities in public issues, discussions, or pull requests. +Report vulnerabilities in the OpenShell Go SDK privately through +[NVIDIA/OpenShell's private reporting +form](https://github.com/NVIDIA/OpenShell/security/advisories/new) and name +`ai-openshell/sdk-go` as the affected component. Do not disclose vulnerabilities +in public issues, discussions, or pull requests. -The OpenShell security policy applies to this repository: the [report template, review process, and coordinated disclosure](https://github.com/NVIDIA/OpenShell/blob/main/SECURITY.md) are the same. Private reporting directly on this repository will be enabled once its process is set up; until then, use the form above. +The OpenShell security policy applies to this repository: the [report template, +review process, and coordinated +disclosure](https://github.com/NVIDIA/OpenShell/blob/main/SECURITY.md) are the +same. Private reporting directly on this repository will be enabled once its +process is set up; until then, use the form above. From 73fe4813fbdb3cf0e485c6b57980a7df591219f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Wed, 4 Nov 2026 16:12:49 +0100 Subject: [PATCH 6/6] chore: require an infra review for CI changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CODEOWNERS assigns .github/ and hack/automation/ (the scripts the workflows run with the bot token) to @ai-openshell/infra alone, so a change there needs an infra approval. Signed-off-by: Roland Huß --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index db58842..1de1cc1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,3 +3,7 @@ # The sdk team owns the SDK; OpenShell maintainers review as a fallback. * @ai-openshell/sdk @ai-openshell/maintainers + +# CI and the scripts it runs with the bot token need an infra review. +/.github/ @ai-openshell/infra +/hack/automation/ @ai-openshell/infra