Skip to content

Commit 92f2299

Browse files
authored
Merge branch 'main' into fix2639
2 parents b85663c + e87d2f6 commit 92f2299

604 files changed

Lines changed: 72696 additions & 20108 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/build-from-issue/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: build-from-issue
33
description: Given a GitHub issue number, plan and implement the work described in the issue. Supports direct user requests and unattended queue processing through the `agent:*` workflow labels. Includes tests, documentation updates, and PR creation. Trigger keywords - build from issue, implement issue, work on issue, build issue, start issue.
4+
metadata:
5+
internal: true
46
---
57

68
# Build From Issue

‎.agents/skills/build-openshell-mxc-windows/SKILL.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: build-openshell-mxc-windows
33
description: Maintain and validate OpenShell's build-only Windows MSVC lane for x64 and ARM64. Use when working on Windows compilation, `windows:*` mise tasks, unsupported Windows compute-driver contracts, or Windows build reports. This skill does not implement Docker, Kubernetes, Podman, VM, MXC driver, policy translation, MSI, service, or supervisor runtime support on Windows.
4+
metadata:
5+
internal: true
46
---
57

68
# Build OpenShell-MXC for Windows
@@ -231,7 +233,7 @@ crypto dependency builds.
231233
| `windows:build:arm64` | Release-builds `openshell-gateway.exe` and `openshell.exe` for ARM64. |
232234
| `windows:test:x64` | Runs native x64 workspace tests with `--no-fail-fast`, excluding unsupported Windows packages as top-level workspace targets. |
233235
| `windows:test:arm64` | Runs native ARM64 workspace tests with `--no-fail-fast` and the same package exclusions. Rejects non-ARM64 hosts. |
234-
| `windows:test:unsupported:x64` | Re-runs focused `openshell-server` tests for unsupported Windows driver behavior. |
236+
| `windows:test:unsupported:x64` | Re-runs focused `openshell-gateway` tests for unsupported Windows driver behavior. |
235237
| `windows:test:unsupported:arm64` | Re-runs the same focused contracts natively on ARM64. Rejects non-ARM64 hosts. |
236238
| `windows:artifacts` | Reports size and SHA256 for release artifacts that exist. |
237239
| `windows:ci` | Runs the full ordered x64-host Windows CI lane, plus ARM64 check/build when not skipped. |
@@ -248,10 +250,10 @@ Windows must continue to reject unsupported compute drivers clearly.
248250

249251
| Driver | Windows build behavior | Runtime behavior |
250252
|---|---|---|
251-
| Docker | Driver crate excluded; server config contract retained. | Gateway construction returns unsupported. |
252-
| Kubernetes | Driver crate excluded; server config contract retained. | Gateway construction returns unsupported. |
253-
| Podman | Driver crate excluded; server config contract retained. | Gateway construction returns unsupported. |
254-
| VM | Driver crate excluded from workspace validation. | Gateway construction returns unsupported. |
253+
| Docker | Driver crate excluded; gateway registration stub retained. | Gateway construction returns unsupported. |
254+
| Kubernetes | Driver crate excluded; gateway registration stub retained. | Gateway construction returns unsupported. |
255+
| Podman | Driver crate excluded; gateway registration stub retained. | Gateway construction returns unsupported. |
256+
| VM | Driver crate excluded; gateway registration stub retained. | Gateway construction returns unsupported. |
255257

256258
The focused contract tasks for either native architecture run:
257259

‎.agents/skills/build-openshell-mxc-windows/reference.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Windows is a build target only. These runtimes remain unsupported:
8585

8686
Rules:
8787

88-
- Keep config/library stubs where the gateway needs them.
88+
- Keep registration stubs in the gateway composition crate where the gateway needs them.
8989
- Return clear unsupported errors at runtime.
9090
- Do not build standalone Windows driver binaries.
9191
- Do not add Docker Desktop, WSL, Hyper-V, Podman machine, Podman Desktop, or
@@ -180,7 +180,7 @@ blocked dependency.
180180
### Focused tests report many filtered-out tests
181181

182182
This is expected for `windows:test:unsupported:x64`. Cargo runs one named test
183-
and filters the other `openshell-server` tests. Report these as filtered, not
183+
and filters the other `openshell-gateway` tests. Report these as filtered, not
184184
ignored.
185185

186186
## Reporting Counts

‎.agents/skills/create-github-issue/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: create-github-issue
33
description: Create GitHub issues using the gh CLI. Use when the user wants to create a new issue, report a bug, request a feature, or create a task in GitHub. Trigger keywords - create issue, new issue, file bug, report bug, feature request, github issue.
4+
metadata:
5+
internal: true
46
---
57

68
# Create GitHub Issue

‎.agents/skills/create-github-pr/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: create-github-pr
33
description: Create GitHub pull requests using the gh CLI. Use when the user wants to create a new PR, submit code for review, or open a pull request. Trigger keywords - create PR, pull request, new PR, submit for review, code review.
4+
metadata:
5+
internal: true
46
---
57

68
# Create GitHub Pull Request

‎.agents/skills/create-rfc/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: create-rfc
33
description: Create OpenShell RFC proposals in rfc/ from a design request. Use when the user asks to write, draft, start, create, or update an RFC, Request for Comments, architecture proposal, API proposal, process proposal, or cross-cutting design proposal that should follow the OpenShell RFC process and template.
4+
metadata:
5+
internal: true
46
---
57

68
# Create RFC

‎.agents/skills/create-spike/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: create-spike
33
description: Investigate a plain-language problem description by deeply exploring the codebase, then create a structured GitHub issue with technical findings. Prequel to build-from-issue — maps vague ideas to concrete, buildable issues. Trigger keywords - spike, investigate, explore, research issue, technical investigation, create spike, new spike, feasibility, codebase exploration.
4+
metadata:
5+
internal: true
46
---
57

68
# Create Spike

‎.agents/skills/fix-security-issue/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: fix-security-issue
33
description: Implement a fix for a reviewed security issue. Takes a directly requested issue number or scans for issues labeled `topic:security` and `agent:implementation-requested`. Reads the security review from the issue comments and implements the remediation plan. Trigger keywords - fix security issue, remediate security, implement security fix, patch vulnerability.
4+
metadata:
5+
internal: true
46
---
57

68
# Fix Security Issue

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

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: helm-dev-environment
33
description: Start up, tear down, and configure the local Kubernetes development environment for OpenShell. Uses k3d (Docker-backed k3s) + Skaffold + Helm. Covers cluster lifecycle, optional add-ons (Keycloak OIDC, Envoy Gateway), HA testing, and port mappings. Trigger keywords - local k8s, local cluster, k3d, skaffold, helm dev, start cluster, stop cluster, tear down cluster, delete cluster, create cluster, helm:k3s, helm:skaffold, local dev environment, dev cluster, k8s dev, envoy gateway local, keycloak local, high availability, HA.
4+
metadata:
5+
internal: true
46
---
57

68
# Helm Dev Environment
@@ -26,10 +28,14 @@ mise run helm:k3s:create
2628
```
2729

2830
Creates a k3d cluster and merges its kubeconfig into the worktree-local `kubeconfig` file.
31+
When the named cluster already exists, the task starts any stopped containers and refreshes
32+
same-named kubeconfig entries so a recreated load balancer's current API port takes effect.
2933
Also applies the upstream agent-sandbox CRDs/controller (pinned via `AGENT_SANDBOX_VERSION`
3034
in `tasks/scripts/helm-k3s-local.sh`, fetched from `github.com/kubernetes-sigs/agent-sandbox`
31-
releases) and preloads the default community sandbox image into k3d so the first sandbox
32-
create does not wait on a large registry pull. Traefik is disabled at cluster creation time.
35+
releases), enables its OTLP tracing on v0.5 and later, installs an OTLP trace
36+
collector and UI in the `observability` namespace,
37+
and preloads the default community sandbox image into k3d so the first sandbox create
38+
does not wait on a large registry pull. Traefik is disabled at cluster creation time.
3339

3440
**Multi-worktree support:** the cluster name is derived from the last component of the
3541
current git branch (e.g. branch `kube-support/local-dev/tmutch` → cluster
@@ -47,6 +53,9 @@ Override with env vars before running `helm:k3s:create`:
4753
- `HELM_K3S_LB_HOST_PORT` (default: `8080`)
4854
- `HELM_K3S_PRELOAD_SANDBOX_IMAGE` (default:
4955
`ghcr.io/nvidia/openshell-community/sandboxes/base:latest`; set to an empty value to skip)
56+
- `HELM_K3S_COLLECTOR_IMAGE` (default:
57+
`mcr.microsoft.com/dotnet/aspire-dashboard:latest`)
58+
- `HELM_K3S_COLLECTOR_HEALTH_TIMEOUT` (default: `120` seconds)
5059

5160
### 2. Deploy OpenShell
5261

@@ -79,9 +88,43 @@ must be at least `1000` and distinct from the workload UID. The
7988
sidecar-mTLS profile reuses `ci/values-sidecar.yaml` and restores
8089
`server.disableTls=false` inline for Skaffold. The `pkiInitJob` hook (a pre-install
8190
Job that runs `openshell-gateway generate-certs`) generates mTLS secrets on first
82-
install. Envoy Gateway opt-in; see the Optional Add-ons section below.
91+
install. The default Skaffold values export gateway and Kubernetes-driver traces to
92+
the collector service installed by `helm:k3s:create`. Envoy Gateway opt-in; see the
93+
Optional Add-ons section below.
8394

84-
The gateway Service uses ClusterIP. Access is via Envoy Gateway (port `8080`) or `kubectl port-forward`.
95+
The gateway Service uses ClusterIP. Access is via Envoy Gateway (port `8080`) or
96+
the unified local forwarding task:
97+
98+
```bash
99+
mise run helm:k3s:forward
100+
```
101+
102+
The task forwards OTLP/gRPC to `http://127.0.0.1:4317` and the trace UI to
103+
`http://127.0.0.1:18888`. When Skaffold has deployed a Kubernetes gateway, it
104+
also forwards the gateway to `http://127.0.0.1:8090`; otherwise it continues
105+
with the collector ports only. A successful plaintext `helm:skaffold:run` or
106+
`helm:skaffold:run:sidecar` registers the gateway under the worktree-specific
107+
k3d cluster name and selects it as the active gateway. Keep the forwarding
108+
task running while using those endpoints.
109+
110+
### Viewing local traces
111+
112+
The gateway exports OTLP/gRPC to
113+
`http://openshell-collector.observability.svc.cluster.local:4317` through the
114+
default Skaffold values. Forward OTLP/gRPC and the trace UI to the host:
115+
116+
```bash
117+
mise run helm:k3s:forward
118+
```
119+
120+
Open `http://127.0.0.1:18888` and exercise the gateway to inspect gateway and
121+
Kubernetes compute-driver spans under their distinct service names, along with
122+
Agent Sandbox controller reconciliation spans linked through the Sandbox
123+
trace-context annotation. The same command exposes OTLP/gRPC on
124+
`http://127.0.0.1:4317` and, when deployed, the Kubernetes gateway on
125+
`http://127.0.0.1:8090`. The local `gateway:docker`, `gateway:podman`, and
126+
`gateway:vm` tasks detect the collector listener at startup and enable trace
127+
export only while it is reachable.
85128

86129
**HA test deploy** (two gateway replicas + external PostgreSQL Secret): uncomment
87130
`#- ci/values-high-availability.yaml` in `deploy/helm/openshell/skaffold.yaml`,
@@ -99,19 +142,20 @@ plaintext by default. To test sidecar topology with TLS enabled, use
99142
| Skaffold dev (default) | `true` | `http://` |
100143
| TLS enabled | `false` (or omitted) | `https://` |
101144

102-
### Connecting via port-forward
145+
### Connecting through the forwarding task
103146

104-
Port `8080` is already bound by the k3d load balancer when Envoy Gateway is active, so
105-
the port-forward uses local port `8090` to avoid a collision:
147+
Port `8080` is already bound by the k3d load balancer when Envoy Gateway is
148+
active, so the forwarding task uses local port `8090` for the gateway. In a
149+
second terminal, confirm that the gateway is registered and active:
106150

107151
```bash
108-
KUBECONFIG=kubeconfig kubectl port-forward -n openshell svc/openshell 8090:8080
152+
openshell gateway list
109153
```
110154

111155
**Plaintext (default Skaffold deploy):**
112156

113157
```bash
114-
openshell sandbox list --gateway-endpoint http://localhost:8090
158+
openshell sandbox list
115159
```
116160

117161
**With mTLS enabled** — extract the client cert the PKI hook wrote to the cluster,
@@ -217,7 +261,9 @@ annotations to `spiffe://openshell.local/openshell/sandbox/<sandbox-id>`.
217261
OpenShell mounts the SPIFFE CSI Workload API socket at
218262
`/spiffe-workload-api/spire-agent.sock` into sandbox pods for provider token
219263
grants. Supervisor-to-gateway authentication remains on the Kubernetes
220-
ServiceAccount bootstrap and gateway-minted sandbox JWT path.
264+
ServiceAccount bootstrap and gateway-minted sandbox JWT path; the selected
265+
Kubernetes compute driver validates the projected token before the gateway
266+
mints its JWT.
221267

222268
---
223269

‎.agents/skills/launch-openshell-gator/SKILL.md‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: launch-openshell-gator
33
description: Launch and supervise OpenShell gator agents. Use when starting gator on issues or PRs, checking gator sandboxes, building the gator sandbox image, restarting stuck gators, inspecting gator logs, or experimenting with gator harness/model overrides. Trigger keywords - launch gator, start gator, run gator, gator sandbox, supervised gator, gator logs, restart gator.
4+
metadata:
5+
internal: true
46
---
57

68
# Launch OpenShell Gator
@@ -28,6 +30,7 @@ For gator's PR/issue validation policy, load `gator-gate` inside the launched sa
2830
| `scripts/agents/gator/policy.yaml` | Sandbox policy for the gator agent. |
2931
| `scripts/agents/gator/bin/gh` | Gator-specific `gh` wrapper and same-SHA duplicate-post guard. |
3032
| `scripts/agents/gator/bin/review-feedback-ledger` | Builds tree-aware review scope, durable findings, convergence telemetry, and review-budget state. |
33+
| `scripts/agents/gator/bin/resolve-gator-review-threads` | Resolves addressed Gator-owned inline review threads by ledger finding ID. |
3134
| `scripts/agents/gator/bin/validate-review-findings` | Enforces the blocker evidence schema and downgrades unsupported hypotheses. |
3235
| `scripts/agents/gator/prompts/gator.md` | Rendered top-level prompt template baked into the payload. |
3336
| `scripts/agents/gator/skills/gator-gate/SKILL.md` | In-sandbox gator state-machine skill. |
@@ -157,7 +160,7 @@ sandbox_name="gator-pr-${pr_number}-supervised"
157160
"Review and monitor PR #${pr_number} through the gator-gate workflow. Scope this invocation only to PR #${pr_number}."
158161
```
159162

160-
The launcher builds the gator sandbox image when needed, stages the immutable payload, imports provider profiles, configures provider credentials and refresh, creates the sandbox, and writes a background log under `scripts/agents/gator/logs/`.
163+
The launcher builds the gator sandbox image when needed, stages the immutable payload, imports provider profiles, configures provider credentials and refresh, creates and uploads the sandbox payload, then starts the agent supervisor with `sandbox exec`. It writes a background log under `scripts/agents/gator/logs/`.
161164

162165
### Launch An Issue Or Issue/PR Pair
163166

@@ -317,10 +320,10 @@ Restart when the payload must change, the sandbox is wedged without a sentinel,
317320

318321
Increment `payload_version` in `scripts/agents/gator/agent.yaml` whenever a
319322
merged change alters the Gator prompt, gate skill, reviewer contract, write
320-
guard, ledger, or bundled validator. Existing immutable watchers cannot replace
321-
their own payload. New-version watchers detect later published versions and
322-
stop with `stale_gator_payload`; relaunch every still-active older watcher after
323-
the version bump is published.
323+
guard, ledger, thread resolver, or bundled validator. Existing immutable
324+
watchers cannot replace their own payload. New-version watchers detect later
325+
published versions and stop with `stale_gator_payload`; relaunch every
326+
still-active older watcher after the version bump is published.
324327

325328
Before deleting, check that the sandbox is truly stale or that the operator asked for a restart. If a bounded review cycle is actively running and still producing useful output, prefer leaving it alone.
326329

@@ -368,7 +371,9 @@ Symptoms: host `gh` auth fails, Codex refresh fails, in-sandbox GitHub calls rep
368371
Actions:
369372

370373
- Re-run the GitHub and Codex preflight checks.
374+
- Existing refresh-managed providers are reused without an ordinary credential update; the launcher rotates their gateway-managed credential instead.
371375
- If host Codex auth changed, relaunch with `--reset-refresh` once.
376+
- `--reset-refresh` removes the old refresh ownership before rediscovering host credentials, then configures and rotates the replacement refresh state.
372377
- If Entra or Microsoft auth is involved in a future provider, use the relevant auth skill. Gator's default providers are GitHub and Codex.
373378

374379
### Unsupported `gh pr view --json` Field

0 commit comments

Comments
 (0)