Repository navigation
ci: add repository governance and checks #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
15a6f8c
chore: add CODEOWNERS for the sdk team
rhuss 1f67832
ci: add Dependabot, CodeQL, and a DCO sign-off check
rhuss 57576bc
ci: lint workflows and publish the docs to GitHub Pages
rhuss 8e5b714
docs: add contributing, security, and agent guides
rhuss 1a977ee
ci: leave sign-off checks to the DCO app and wrap the guides
rhuss 73fe481
chore: require an infra review for CI changes
rhuss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # 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 | ||
|
|
||
| # CI and the scripts it runs with the bot token need an infra review. | ||
| /.github/ @ai-openshell/infra | ||
| /hack/automation/ @ai-openshell/infra | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
rhuss marked this conversation as resolved.
Resolved
|
||
|
|
||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +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. | ||
|
|
||
| ## 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # 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/): | ||
| `<type>(<scope>): <description>`. | ||
| - 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. | ||
|
|
||
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # 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. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.