Skip to content

Commit 7f09efe

Browse files
committed
chore: merge main into HTTP session hooks
Signed-off-by: Piotr Mlocek <[email protected]>
2 parents 34984d9 + 0ccc6b9 commit 7f09efe

131 files changed

Lines changed: 7811 additions & 2029 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/helm-dev-environment/SKILL.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ cd ../../..
236236
KUBECONFIG=kubeconfig mise run helm:gateway:apply
237237
```
238238

239-
`values-gateway.yaml` creates a `Gateway` (listener on port 80, class `eg`) and
240-
`GRPCRoute` in the `openshell` namespace. The `high-availability` profile
239+
`values-gateway.yaml` creates the `openshell` `Gateway` (listener on port 80,
240+
class `eg`) and an `openshell` `GRPCRoute` in the `openshell` namespace. The
241+
`high-availability` profile
241242
installs the Envoy Gateway Helm chart and layers both
242243
`values-high-availability.yaml` and `values-gateway.yaml` onto the OpenShell
243244
release.

‎.agents/skills/test-release-canary/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Loopback registration auto-derives the gateway name to `openshell` if `--name` i
143143
| `macos`/`ubuntu-deb`/`fedora` job fails on `install.sh` | Dev release missing an asset, checksum mismatch, or `install.sh` regression on this branch. | Job log around the `curl … install.sh \| sh` step. |
144144
| Sandbox create or exec fails | Published sandbox and supervisor artifacts are missing, incompatible, or cannot establish the protected runtime channel. | Gateway logs plus Docker, Podman, VM, Snap, or Kubernetes runtime diagnostics for the job. |
145145
| `macos`/`ubuntu-deb`/`fedora` job fails on `openshell status` | Local gateway service did not start (systemd/brew/podman). Often a driver issue. | Service logs in the job log; `OPENSHELL_COMPUTE_DRIVER` env in the "Ensure …" step. |
146-
| `ubuntu-snap-system-docker` fails during `install.sh` | System Docker was unavailable, the edge revision or automatic interfaces were unavailable, or the gateway did not become reachable. | Failure diagnostics dump system Docker, snap service/connection/change state, gateway and snapd journals, snap logs, and port 17670 listeners. |
146+
| `ubuntu-snap-system-docker` fails during `install.sh` | System Docker was unavailable to the runner user, the edge revision or automatic interfaces were unavailable, or the user gateway did not become reachable. | Failure diagnostics dump system Docker, snap service/connection/change state, user and legacy gateway journals, snap logs, and port 17670 listeners. |
147147
| `ubuntu-snap-system-docker` fails during the prover checks | The prover artifact is missing or packaged for the wrong architecture, `openshell.prover` is not exposed or confined to read the test policies, or its solver linkage is not runnable. | The `Verify Snap installation` and `Check a policy boundary with the Snap prover` steps, plus `snap info openshell` and `snap connections openshell`. |
148148
| `ubuntu-snap-docker-preflight` unexpectedly succeeds | The installer no longer fails before installing the OpenShell snap when Docker is absent or supplied by the Docker snap. | Inspect `install.log`, `docker-snap.log`, `snap list`, and snapd changes. |
149149
| `kubernetes` job fails on `helm install --wait` | Chart did not deploy in 5 min — usually image pull failure or readiness probe failing. | "Diagnostics on failure" step dumps `helm status`, manifest, pod describe, pod logs. |

‎.github/CODEOWNERS‎

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
1-
# Broad ownership — core team reviews everything
1+
## Broad ownership — core team reviews everything
22
* @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
33

4-
# Vouch list — maintainers only (bot commits bypass, but manual edits need review)
4+
## Vouch list — maintainers only (bot commits bypass, but manual edits need review)
55
.github/VOUCHED.td @NVIDIA/openshell-codeowners
6+
7+
## Merge enforcement — these paths decide who can merge, so they notify the full
8+
# list of maintainers to raise scrutiny on changes here.
9+
#
10+
# PR checks run local to the branch, so unless the check specifically avoids
11+
# using branch-local files, a PR could change its own gates and appear to pass
12+
# them. Covering the required checks here closes that gap.
13+
#
14+
# The whole workflows directory is covered, not just the approval gate, because
15+
# any workflow can claim a required check context or ask for a broader token.
16+
#
17+
# Normally, we'd use a GitHub team to cover all maintainers, but org-level
18+
# policies prevent outside collaborators from being on a GH team at this time
19+
# so we spell them out explicitly.
20+
21+
# Core check mechanisms
22+
/.github/workflows/ @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
23+
/.github/actions/ @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
24+
/.github/CODEOWNERS @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
25+
/.github/zizmor.yml @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
26+
27+
# `MAINTAINERS.md` maintainer approval checks
28+
/MAINTAINERS.md @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
29+
/tasks/scripts/check_maintainer_approval.py @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
30+
/tasks/scripts/alert_maintainer_change.py @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
31+
/tasks/scripts/check_maintainer_approval_test.py @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
32+
/tasks/scripts/alert_maintainer_change_test.py @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr
33+
34+
# Auditable SBOM check
35+
/tasks/scripts/verify-image-sbom.sh @NVIDIA/openshell-codeowners @mrunalp @sjenning @derekwaynecarr

‎.github/workflows/integration-runner.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,12 @@ jobs:
8989
# Retry dependency preparation, then execute the test suite once.
9090
nix build --no-link .#tmachine || nix build --no-link .#tmachine
9191
nix run .#tmachine -- test "${ENVIRONMENT}" "${INSTALLER}" "${TESTSUITE}"
92+
93+
- name: Upload tmachine diagnostics
94+
if: always()
95+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
96+
with:
97+
name: tmachine-diagnostics-${{ inputs.category }}-${{ matrix.environment }}-${{ matrix.installer }}-${{ matrix.testsuite }}
98+
path: artifacts/tmachine-diagnostics
99+
if-no-files-found: ignore
100+
retention-days: 7
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Maintainer Approval
5+
6+
on:
7+
merge_group:
8+
types: [checks_requested]
9+
pull_request_review:
10+
types: [submitted, dismissed]
11+
12+
permissions:
13+
contents: read
14+
pull-requests: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
maintainer-approval:
22+
# This name is the required status check context. Changing it silently
23+
# breaks the ruleset entry that gates merges on this job.
24+
name: OpenShell / Maintainer Approval
25+
if: github.repository_owner == 'NVIDIA'
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 5
28+
steps:
29+
# Check out the default branch, never the pull request head. Both the
30+
# maintainer list and the decision helper must come from main: reading
31+
# either from the pull request ref would let a contributor add themselves
32+
# to the list, or rewrite the decision logic, and self-approve.
33+
- name: Check out the maintainer list and helper
34+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
35+
with:
36+
ref: main
37+
sparse-checkout: |
38+
MAINTAINERS.md
39+
tasks/scripts/check_maintainer_approval.py
40+
sparse-checkout-cone-mode: false
41+
persist-credentials: false
42+
43+
- name: Require an approving review from a maintainer
44+
env:
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
GH_REPO: ${{ github.repository }}
47+
PR_NUMBER: ${{ github.event.pull_request.number }}
48+
# merge_group carries no pull request in its payload, but the queue
49+
# branch names the entry: gh-readonly-queue/main/pr-3027-<base sha>.
50+
MERGE_GROUP_REF: ${{ github.ref_name }}
51+
shell: bash
52+
run: |
53+
set -euo pipefail
54+
55+
if [ -z "${PR_NUMBER:-}" ]; then
56+
if [[ "$MERGE_GROUP_REF" =~ /pr-([0-9]+)-[0-9a-f]+$ ]]; then
57+
PR_NUMBER="${BASH_REMATCH[1]}"
58+
else
59+
# Fail closed: an unrecognised ref must never satisfy the gate.
60+
echo "::error::No pull request resolved from '$MERGE_GROUP_REF'."
61+
exit 1
62+
fi
63+
fi
64+
65+
gh api --paginate "repos/$GH_REPO/pulls/$PR_NUMBER/reviews" --jq '.[]' \
66+
| jq -s '.' > reviews.json
67+
68+
# Exits non-zero when no maintainer's latest decisive review is an
69+
# approval, and when MAINTAINERS.md yields no handles. That exit code
70+
# is the check result; nothing is posted anywhere.
71+
python3 tasks/scripts/check_maintainer_approval.py \
72+
--maintainers MAINTAINERS.md \
73+
--reviews reviews.json
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Maintainers Change Alert
5+
6+
on:
7+
pull_request_target:
8+
types: [opened, reopened, synchronize]
9+
paths:
10+
- MAINTAINERS.md
11+
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
describe-change:
22+
name: Comment on the approver set change if MAINTAINERS.md has changed
23+
if: github.repository_owner == 'NVIDIA'
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 10
26+
steps:
27+
# Default branch only. The helper must be the reviewed version, not
28+
# whatever the pull request happens to contain.
29+
- name: Check out the change-alert helper
30+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31+
with:
32+
ref: main
33+
sparse-checkout: tasks/scripts/alert_maintainer_change.py
34+
sparse-checkout-cone-mode: false
35+
persist-credentials: false
36+
37+
- name: Post the maintainer delta
38+
env:
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
GH_REPO: ${{ github.repository }}
41+
PR_NUMBER: ${{ github.event.pull_request.number }}
42+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
43+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
44+
# Single source of truth for the comment marker: the script emits
45+
# it as the first line of the body, the lookup below matches on it.
46+
COMMENT_MARKER: "<!-- maintainer-approval-delta -->"
47+
shell: bash
48+
run: |
49+
set -euo pipefail
50+
51+
# Fetching file contents is reading data, not executing it. The head
52+
# revision is never checked out or run.
53+
#
54+
# A 404 means the file genuinely does not exist at that revision — a
55+
# pull request that adds or deletes MAINTAINERS.md — and yields an
56+
# empty side of the comparison. Every other failure is fatal: an empty
57+
# file from a rate limit or a 5xx would render as "every maintainer
58+
# was just added" or "nothing changed", both of which mislead the
59+
# reviewer about who can merge code.
60+
fetch_maintainers() {
61+
local ref="$1" out="$2" err
62+
err="$(mktemp)"
63+
if gh api -H "Accept: application/vnd.github.raw" \
64+
"repos/$GH_REPO/contents/MAINTAINERS.md?ref=$ref" > "$out" 2>"$err"; then
65+
rm -f "$err"
66+
return 0
67+
fi
68+
if grep -q 'HTTP 404' "$err"; then
69+
rm -f "$err"
70+
: > "$out"
71+
return 0
72+
fi
73+
echo "::error::Could not fetch MAINTAINERS.md at $ref"
74+
cat "$err" >&2
75+
rm -f "$err"
76+
return 1
77+
}
78+
79+
fetch_maintainers "$BASE_SHA" before.md
80+
fetch_maintainers "$HEAD_SHA" after.md
81+
82+
# An unparseable result exits non-zero, but the comment explaining
83+
# why still has to be posted before this job fails.
84+
status=0
85+
python3 tasks/scripts/alert_maintainer_change.py \
86+
--before before.md --after after.md > body.md || status=$?
87+
88+
# No output means the approver set did not change. A comment saying
89+
# so is noise, so post nothing.
90+
if [ -s body.md ]; then
91+
cat body.md >> "$GITHUB_STEP_SUMMARY"
92+
93+
# Update the existing comment rather than stacking one per push.
94+
COMMENT_ID=$(gh api --paginate "repos/$GH_REPO/issues/$PR_NUMBER/comments" \
95+
--jq '.[] | select(.body | startswith($ENV.COMMENT_MARKER)) | .id' \
96+
| head -n 1)
97+
98+
if [ -n "$COMMENT_ID" ]; then
99+
gh api --method PATCH "repos/$GH_REPO/issues/comments/$COMMENT_ID" \
100+
-F "[email protected]" >/dev/null
101+
else
102+
gh api --method POST "repos/$GH_REPO/issues/$PR_NUMBER/comments" \
103+
-F "[email protected]" >/dev/null
104+
fi
105+
fi
106+
107+
exit "$status"

‎.github/workflows/release-canary.yml‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@ jobs:
221221
- name: Install and check status
222222
run: |
223223
set -euo pipefail
224-
sudo systemctl set-environment \
224+
systemctl --user set-environment \
225225
"OPENSHELL_TELEMETRY_ENABLED=${OPENSHELL_TELEMETRY_ENABLED}"
226-
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
226+
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh |
227+
DOCKER_HOST=unix:///tmp/nonexistent-docker.sock DOCKER_CONTEXT=nonexistent sh
227228
sudo snap list openshell
228229
if sudo snap list docker >/dev/null 2>&1; then
229230
echo "install.sh unexpectedly installed the Docker snap" >&2
@@ -234,8 +235,12 @@ jobs:
234235
sudo snap connections openshell | grep -E '^docker +openshell:docker +:docker +'
235236
openshell --version
236237
openshell.prover --version
237-
sudo snap services openshell
238-
sudo journalctl -b -u snap.openshell.gateway.service --no-pager |
238+
snap services openshell
239+
systemctl --user is-enabled --quiet snap.openshell.user-gateway.service
240+
systemctl --user is-active snap.openshell.user-gateway.service
241+
! systemctl is-enabled --quiet snap.openshell.system-gateway.service
242+
! systemctl is-active --quiet snap.openshell.system-gateway.service
243+
journalctl --user -u snap.openshell.user-gateway.service --no-pager |
239244
grep -F "mTLS user authentication enabled"
240245
openshell gateway list | grep -F "https://127.0.0.1:17670"
241246
openshell status
@@ -280,10 +285,12 @@ jobs:
280285
sudo snap services openshell
281286
sudo snap connections openshell
282287
sudo snap changes
283-
sudo systemctl status snap.openshell.gateway.service --no-pager
284-
sudo journalctl -b -u snap.openshell.gateway.service --no-pager -n 300
288+
systemctl --user status snap.openshell.user-gateway.service --no-pager
289+
journalctl --user -u snap.openshell.user-gateway.service --no-pager -n 300
290+
sudo systemctl status snap.openshell.system-gateway.service --no-pager
291+
sudo journalctl -b -u snap.openshell.system-gateway.service --no-pager -n 300
285292
sudo journalctl -b -u snapd.service --no-pager -n 300
286-
sudo snap logs openshell.gateway -n=300
293+
snap logs openshell.user-gateway -n=300
287294
sudo ss -ltnp '( sport = :17670 )'
288295
289296
ubuntu-snap-docker-preflight:

‎.github/workflows/required-ci-gates.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,5 +280,8 @@ jobs:
280280
if [ "$CONTEXT_KIND" != "merge_group" ]; then
281281
evaluate_workflow "OpenShell / E2E" "branch-e2e.yml" "Branch E2E Checks" "test:e2e" "Core E2E result"
282282
evaluate_workflow "OpenShell / GPU E2E" "branch-e2e.yml" "Branch E2E Checks" "test:e2e-gpu" "GPU E2E result"
283+
else
284+
post_status "OpenShell / E2E" success "Not applicable: E2E runs only on PRs" "$STATUS_TARGET_URL"
285+
post_status "OpenShell / GPU E2E" success "Not applicable: GPU E2E runs only on PRs" "$STATUS_TARGET_URL"
283286
fi
284287
evaluate_workflow "OpenShell / Helm Lint" "helm-lint.yml" "Helm Lint"

‎.github/zizmor.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ rules:
88
# head code. Keep each suppression scoped to its reviewed trigger block.
99
- dco.yml:3
1010
- e2e-label-help.yml:13
11+
- maintainers-change-alert.yml:6
1112
- release-canary.yml:3
1213
- required-ci-gates.yml:3
1314
- vouch-check.yml:3

0 commit comments

Comments
 (0)