Uh oh!
There was an error while loading. Please reload this page.
test(e2e): verify tracebloc delete offboard teardown on a throwaway k3d cluster (#140) - #236
Merged
Merged
Conversation
Adds real e2e coverage of the top-level `tracebloc delete` offboard (RFC-0001 §7.10), which CI's e2e.yml previously left untested (it only exercised `data ingest`). New test/integration/delete_e2e_test.go: - TestE2E_RevokeUsesPostNotDelete: a real HTTP round-trip against a recording stub asserts acceptance (a) — the credential is REVOKED via POST /edge-device/<id>/revoke/, never a hard DELETE of the row. - TestE2E_DeleteTeardown: builds the real binary and runs `tracebloc delete --yes --force` black-box against a throwaway k3d cluster with a real Helm release, asserting (b) the release is uninstalled, (c) the k3d cluster is deleted, (d) ~/.tracebloc is wiped, and (e) the foreign-`tb` guard (#171) leaves a `tb` it didn't create in place. Opt-in via TB_E2E_K3D=1 and refuses a pre-existing `tracebloc` cluster, so it never clobbers a dev machine. The black-box run is kept fully offline (egress through a dead proxy) so the revoke takes its documented best-effort transport-failure path while the local teardown runs for real; the POST-not-DELETE contract a live backend enforces is covered by the stub test. Revoke against a live backend is left to the pre-prod FR (CI can't provide one — no base-URL override on the CLI). Wires a new `delete-teardown` job (k3d + helm) into e2e.yml, mirroring the ingest e2e job's nightly/dispatch/`e2e`-label gating. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aptracebloc
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes#140. Adds real e2e coverage for
tracebloc deleteoffboard teardown against a throwaway k3d cluster — todaye2e.ymlonly exercisesdata ingest.What it verifies (the rescoped acceptance)
An integration-tagged test (
//go:build integration,test/integration/delete_e2e_test.go) + a new gated job ine2e.yml:POST /edge-device/…/revoke), not hard-deleted — a real HTTP round-trip asserts exactly one POST revoke.k3d cluster listpost-check).~/.traceblocwiped (viaTRACEBLOC_CONFIG_DIR).tbfix(cli): delete only removestbwhen it is tracebloc's own alias #171 guard fires — a planted non-tracebloctbsurvives and delete refuses to touch it.Honesty / scope
//go:build integrationkeeps it out of the default-tag coverage run, so coverage floor is unaffected.Nits (noted, not blocking)
helm list(unlike (c), which is authoritative).NO_PROXYexempting the k3d API-server endpoint.Closes#140.
🤖 Generated with Claude Code
Note
Low Risk
Test-only and workflow changes; no production CLI behavior modified. k3d e2e is env-gated to avoid clobbering local clusters.
Overview
Adds integration e2e coverage for
tracebloc deleteoffboarding (#140): a new gateddelete-teardownjob ine2e.yml(same schedule /e2elabel rules as the kind job) installs k3d and Helm, setsTB_E2E_K3D=1, and runsTestE2E_Delete|TestE2E_Revoke.TestE2E_RevokeUsesPostNotDeletehits a recording HTTP stub and assertsRevokeClientsends exactlyPOST /edge-device/<id>/revoke/and neverDELETE.TestE2E_DeleteTeardown(opt-in via env so devtraceblock3d clusters aren’t touched) builds the real CLI, stands up a throwaway k3d cluster namedtracebloc, installs a minimal Helm release, seeds config viaTRACEBLOC_CONFIG_DIR, and runsdelete --yes --forceoffline (dead proxy for revoke;NO_PROXYfor local k3d/helm). It checks Helm uninstall, cluster removal, config wipe, foreigntb(#171) left alone, best-effort revoke messaging, and self-removal of the binary.Docs in
test/integration/README.mddescribe scope and that live-backend revoke stays out of CI.Reviewed by Cursor Bugbot for commit f567544. Bugbot is set up for automated code reviews on this repo. Configure here.