Problem
packages/k8s-sandbox/test/m3-live-smoke.test.ts:27:
context: process.env.KAGENTI_SANDBOX_CONTEXT ?? "kind-kagenti",
The default no longer matches what the setup scripts produce. On a current local bring-up the context is kind-sh-knative, so running the gated suite without setting KAGENTI_SANDBOX_CONTEXT targets a context that does not exist, and every kubectl call fails with a connection error rather than a clear "wrong context" message.
Why it matters
This suite is skip-by-default (M3_LIVE_SMOKE), so it is run rarely and usually by someone who did not write it. A stale default turns "I ran the live gate and it failed" into a misleading signal about the code under test rather than about the environment.
It matters slightly more right now because PR #188 adds a live assertion ("Claim 6") that was committed unrun, with a documented command for someone to run later. That command sets the variable explicitly — but anyone invoking the suite the obvious way will hit the stale default first.
Options
- Drop the default and fail fast with a message naming the variable, e.g.
KAGENTI_SANDBOX_CONTEXT must be set (current: $(kubectl config current-context)). Most honest — the suite cannot guess.
- Default to the current context (
kubectl config current-context) rather than a hardcoded name, so it follows whatever the operator has selected.
- Update the literal to match today's setup scripts. Cheapest, and stale again after the next rename — which is how it got here.
Option 1 or 2 is preferable; the value is environment-specific and hardcoding any name reintroduces the problem.
Refs
Noticed while executing #188 (ST6); pre-existing and deliberately not changed there to keep that branch scoped.
Problem
packages/k8s-sandbox/test/m3-live-smoke.test.ts:27:The default no longer matches what the setup scripts produce. On a current local bring-up the context is
kind-sh-knative, so running the gated suite without settingKAGENTI_SANDBOX_CONTEXTtargets a context that does not exist, and everykubectlcall fails with a connection error rather than a clear "wrong context" message.Why it matters
This suite is skip-by-default (
M3_LIVE_SMOKE), so it is run rarely and usually by someone who did not write it. A stale default turns "I ran the live gate and it failed" into a misleading signal about the code under test rather than about the environment.It matters slightly more right now because PR #188 adds a live assertion ("Claim 6") that was committed unrun, with a documented command for someone to run later. That command sets the variable explicitly — but anyone invoking the suite the obvious way will hit the stale default first.
Options
KAGENTI_SANDBOX_CONTEXT must be set (current: $(kubectl config current-context)). Most honest — the suite cannot guess.kubectl config current-context) rather than a hardcoded name, so it follows whatever the operator has selected.Option 1 or 2 is preferable; the value is environment-specific and hardcoding any name reintroduces the problem.
Refs
Noticed while executing #188 (ST6); pre-existing and deliberately not changed there to keep that branch scoped.