Skip to content

Commit b699f6b

Browse files
kernel-gdclaude
andcommitted
docs: narrow public claims to match current sidecar architecture
The README hero sentence, ROADMAP, and annotation table overstated the listener-to-enforcement transition for injected sidecars. Sidecars use DefaultListenerConfig() and do not read the charted ConfigMap, so enforcement is not yet "a config change" for the primary use case. - Scope enforcement-as-config-change claim to standalone deployments - Remove "same metrics" (listener and enforcement use different families) - Mark runtime.getkoshi.ai/policy as not functional for injected sidecars in the current default install path - Qualify "unknown workload gets 403" by mode (enforcement only) - Add default/configurable qualifiers to all hardcoded 15080 references - Fix stale 1.0.0 version examples in validate-release.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cf9f4a8 commit b699f6b

5 files changed

Lines changed: 15 additions & 14 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Koshi Runtime is a workload-scoped governance plane for AI systems. It deploys as a Kubernetes sidecar that enforces deterministic policy at the workload boundary — token budgets, per-request guards, and tiered enforcement decisions — using reservation-first accounting.
44

5-
**Discover your governance posture before enforcing it.** Koshi ships in **listener mode** by default: the full enforcement pipeline — identity resolution, policy lookup, guard evaluation, budget accounting — executes on every request, but no traffic is blocked. Shadow decisions (`would_reject`, `would_throttle`, `would_kill`) reveal exactly where your policies would intervene. When the posture matches your intent, enabling enforcement is a config change — same binary, same pipeline, same metrics.
5+
**Discover your governance posture before enforcing it.** Koshi ships in **listener mode** by default: the full enforcement pipeline — identity resolution, policy lookup, guard evaluation, budget accounting — executes on every request, but no traffic is blocked. Shadow decisions (`would_reject`, `would_throttle`, `would_kill`) reveal exactly where your policies would intervene. When the posture matches your intent, enforcement uses the same binary and Helm chart. For standalone deployments, enabling enforcement is a config change. For injected sidecars, sidecar-level enforcement is planned for a future release — see [Enabling Enforcement](#enabling-enforcement).
66

77
**No repo clone required.** Install Koshi directly from the published OCI Helm chart and container image.
88

@@ -24,7 +24,7 @@ kubectl rollout restart deployment -n my-namespace
2424
kubectl logs -n my-namespace deploy/my-app -c koshi-listener --tail=100 | \
2525
jq 'select(.stream == "event")'
2626

27-
# 5. Check metrics
27+
# 5. Check metrics (default sidecar port; adjust if you changed sidecar.port)
2828
kubectl port-forward -n my-namespace deploy/my-app 15080:15080
2929
curl http://localhost:15080/metrics | grep koshi_listener
3030
```
@@ -34,7 +34,7 @@ curl http://localhost:15080/metrics | grep koshi_listener
3434
- Install Koshi in listener mode — one Helm command, no repo clone or config files required
3535
- Label any namespace and restart workloads to get sidecars injected
3636
- Collect structured JSON events from `koshi-listener` container logs
37-
- Scrape Prometheus metrics from `/metrics` on port `15080`
37+
- Scrape Prometheus metrics from `/metrics` on the sidecar port (default `15080`, configurable via `sidecar.port`)
3838
- Observe real shadow decisions (`allow`, `would_throttle`, `would_kill`, `would_reject`) on live traffic without blocking anything
3939

4040
### What Traffic Produces Signal
@@ -63,7 +63,7 @@ Workloads produce governance signal when they send OpenAI- or Anthropic-compatib
6363
| NetworkPolicy | `koshi-system` | Restricts injector ingress to apiserver, sidecar egress to upstreams |
6464

6565
The sidecar (`koshi-listener`) is injected into workload pods automatically. It:
66-
- Listens on `:15080` (configurable)
66+
- Listens on `:15080` by default (configurable via `sidecar.port` Helm value)
6767
- Exposes `/metrics`, `/healthz`, `/readyz`, `/status`
6868
- Receives traffic via `OPENAI_BASE_URL` / `ANTHROPIC_BASE_URL` env vars injected into app containers
6969

@@ -257,7 +257,7 @@ Key Helm values:
257257
| Annotation | Values | Description |
258258
|------------|--------|-------------|
259259
| `runtime.getkoshi.ai/inject` | `"false"` | Opt out a specific pod from injection |
260-
| `runtime.getkoshi.ai/policy` | policy ID | Override the default policy for this pod's sidecar |
260+
| `runtime.getkoshi.ai/policy` | policy ID | Per-workload policy override. Not functional for injected sidecars in the current default install path — the built-in default config does not include named policies, so setting this annotation will cause the sidecar to fail at startup. Planned for a future release. |
261261

262262
## Health Endpoints
263263

@@ -311,7 +311,7 @@ Listener mode is designed for discovering your governance posture. Injected side
311311
- **Webhook `failurePolicy: Ignore`.** If the injector is down, pods still create — they just don't get the sidecar.
312312
- **Base-URL injection is safe.** `OPENAI_BASE_URL` / `ANTHROPIC_BASE_URL` are only set on app containers if not already present. See [What Traffic Produces Signal](#what-traffic-produces-signal) for implications when these vars are already defined.
313313
- **Reservation-first accounting.** Tokens are reserved before the request and reconciled with actual usage after the response.
314-
- **Fail open on infrastructure, fail closed on policy.** A panic triggers degraded pass-through mode. An unknown workload gets 403.
314+
- **Fail open on infrastructure, fail closed on policy.** A panic triggers degraded pass-through mode. In enforcement mode, an unknown workload gets 403. In listener mode, unknown workloads emit `would_reject` and traffic proxies through.
315315

316316
## Uninstall / Rollback
317317

ROADMAP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Koshi Runtime is a Kubernetes-native runtime substrate that sits at the workload
88

99
- **Listener-first adoption.** Discover your governance posture at the execution boundary before enforcing it. The full enforcement pipeline runs on every request in listener mode, emitting structured events and metrics that reveal exactly where policies would intervene — without blocking traffic.
1010
- **Structured governance signals.** Every request produces a machine-readable decision with a stable reason code — identity resolution, policy lookup, per-request guards, rolling budget accounting, and tiered enforcement.
11-
- **Config-driven mode switching.** The same binary and image supports both listener and enforcement modes. Moving from observation to enforcement is a config change, not a new deployment.
11+
- **Config-driven mode switching.** The same binary and image supports both listener and enforcement modes. For standalone deployments, moving from observation to enforcement is a config change. For injected sidecars, enforcement and config delivery to sidecars are planned for a future release.
1212
- **Auditable, reversible, bounded behavior.** Reservation-first token accounting with reconciliation. Deterministic enforcement decisions. Safe defaults that fail open on infrastructure and fail closed on policy.
1313

1414
## Available Now
@@ -19,7 +19,7 @@ Koshi Runtime is a Kubernetes-native runtime substrate that sits at the workload
1919
- **Reservation-first token accounting** — budget pre-deducted before proxying, reconciled with actual usage after response. Rolling window with optional burst. Budget floor at zero.
2020
- **Stable reason codes** — machine-readable codes on all decisions and error responses: `identity_missing`, `policy_not_found`, `guard_max_tokens`, `budget_exhausted_throttle`, `budget_exhausted_kill`, and others.
2121
- **Helm chart with safe defaults** — NetworkPolicy, PodDisruptionBudget, security context (read-only root, non-root, drop all capabilities), self-signed webhook cert generation.
22-
- **Enforcement mode** — same binary, activated by config. Identity via HTTP header, per-workload policy binding, tiered decisions (allow, throttle, kill).
22+
- **Enforcement mode** — same binary, activated by config. Currently available for standalone deployments; injected-sidecar enforcement is planned. Identity via HTTP header, per-workload policy binding, tiered decisions (allow, throttle, kill).
2323
- **Design documentation** — formal specifications for [deterministic accounting invariants](docs/design/koshi-v1-deterministic-accounting-invariants.md), [enforcement boundary](docs/design/koshi-v1-enforcement-boundary.md), [operator trust guarantees](docs/design/koshi-v1-operator-trust-guarantees.md), and [why Koshi exists](docs/design/koshi-v1-why-koshi-exists.md).
2424

2525
## Next

docs/kubernetes-observability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The webhook injects scrape annotations on workload pods:
7373

7474
```yaml
7575
prometheus.io/scrape: "true"
76-
prometheus.io/port: "15080"
76+
prometheus.io/port: "15080" # Matches sidecar.port Helm value (default)
7777
prometheus.io/path: "/metrics"
7878
```
7979

docs/onboarding.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ kubectl logs -n <namespace> deploy/<your-app> -c koshi-listener --tail=50 | \
4343
**Confirm the metrics endpoint is reachable:**
4444

4545
```bash
46+
# Default sidecar port; adjust if you changed sidecar.port in your Helm values
4647
kubectl port-forward -n <namespace> deploy/<your-app> 15080:15080
4748
curl -s http://localhost:15080/metrics | grep koshi_listener
4849
```
@@ -66,7 +67,7 @@ Koshi outputs two signal types. Any observability tool that ingests these format
6667
- Fields: `namespace`, `workload_kind`, `workload_name`, `provider`, `decision_shadow`, `reason_code`, `estimated_tokens`, `actual_tokens`
6768

6869
**Prometheus metrics:**
69-
- Source: `:15080/metrics` on each sidecar
70+
- Source: `/metrics` on each sidecar (default port `15080`, configurable via `sidecar.port`)
7071
- Series: `koshi_listener_decisions_total`, `koshi_listener_tokens_total`, `koshi_listener_latency_seconds`
7172
- Labels: `namespace`, `decision_shadow`, `reason_code`, `provider`, `phase`
7273

scripts/validate-release.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ set -euo pipefail
88
# ./scripts/validate-release.sh <chart-version> <image-tag> [image-repo]
99
#
1010
# Arguments:
11-
# chart-version Helm chart version (e.g. 1.0.0)
12-
# image-tag Image tag (e.g. v1.0.0)
11+
# chart-version Helm chart version (e.g. 0.2.12)
12+
# image-tag Image tag (e.g. v0.2.12)
1313
# image-repo Image repository (default: ghcr.io/koshihq/koshi-runtime)
1414
#
1515
# Examples:
16-
# ./scripts/validate-release.sh 1.0.0 v1.0.0
17-
# ./scripts/validate-release.sh 1.0.0 v1.0.0 docker.io/koshihq/koshi-runtime
16+
# ./scripts/validate-release.sh 0.2.12 v0.2.12
17+
# ./scripts/validate-release.sh 0.2.12 v0.2.12 docker.io/koshihq/koshi-runtime
1818

1919
CHART_VERSION="${1:?Usage: validate-release.sh <chart-version> <image-tag> [image-repo]}"
2020
IMAGE_TAG="${2:?Usage: validate-release.sh <chart-version> <image-tag> [image-repo]}"

0 commit comments

Comments
 (0)