[FEATURE] Test Coverage 7 Bug Fixes #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ep/May06-2026/HephTestCoverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code: - heph/src/build/build.ts: replace .quiet() with runOrSurface() helper that captures stderr and prints the last 30 lines on non-zero exit. Previously a Dockerfile/auth/buildkit failure exited with no output. Symptom users saw before: "gameplan-studio-web build fails silently in heph (manual docker build from same context succeeds)". Tests (auto-review fixes): - _harness.ts: default KUBECONFIG to the harness cluster's kubeconfig in runHeph env, so verbs that shell to kubectl without going through resolveCluster (heph admin, heph secrets registry) work in tests. Drop Record<string, unknown> in ProjectSpec.extras → typed ExtraFixture. - inproc-lifecycle.test.ts: drop two `as unknown as` parameter casts; use loadEff against a real project so EffectiveConfig types match cleanly. Replace process.exit-mock as-cast with a typed stubProcessExit helper. captureConsoleLog helper so status/logs/url tests assert on user-visible output instead of "didn't throw". Drop duplicate parseTtl/expiresAtFrom/ parseIdleAfter test (already covered by ttl.test.ts unit tests). waitForZeroEnvironments poll fixes the sleepClusters precondition race with prior tests' down() namespace teardown. - surface.test.ts: drop the 3 "exited cleanly" tests (k9s --version, dashboard, doctor's [0,2] gate). Replace doctor's gate with section- heading assertions (DNS + tools). Tighten secrets-registry header comment ("writes Secret in heph-system", not "writes file"). Docs: - docs/06-gotchas.md: operator-owned Deployments require ReplicaSet delete to recover from a stuck rollout (operator's webhook rejects manual kubectl patch — change CR or heph.yaml instead). Plus a brief note that docker build silent-failure was fixed. - docs/17-roadmap.md: roadmap entries for (a) investigate user-reported "heph patch shallow-replaces service spec" (suspected per-array overlay semantic, needs repro); (b) auto-detect + delete stuck ReplicaSet on heph up retry path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>heph create generates a random hex slug, so namespace = heph-<slug> ≠ heph-<env>. Tests querying kubectl with heph-${env} found nothing. Pass --slug=${env} explicitly so namespace = heph-<env> for the test. Applied to lifecycle / extras-secrets / build. inproc lifecycle: dropped the `expect(captured).toContain("nginx")` assertion. logs() shells out to `kubectl logs` which inherits stdout directly (bypasses console.log), so captureConsoleLog never sees the nginx banner. The subprocess lifecycle.test.ts still verifies it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>