Uh oh!
There was an error while loading. Please reload this page.
feat(status): surface the environment's seal-check verdict (client status --seal) - #395
Conversation
…atus --seal) `tracebloc client status --seal` runs the chart's conformance checks (its helm-test hooks — the RFC-0003 §8.2 seal check) against this machine's secure environment and prints an honest verdict with per-check detail: sealed every conformance check passed (exit 0) unsealed a check failed — a protection is not enforced (exit 2) unknown the chart ships no checks; nothing was verified (exit 2) Chart contract (works against today's probes, picks up the growing backend#1184 suite as it lands): test hooks labelled `tracebloc.io/seal-check: "true"` form the suite; with no labelled hook every helm test runs, with a visible fallback note; the optional `tracebloc.io/seal-name` / `tracebloc.io/seal-hint` annotations refine a check's display name and its failure hint. Checks run one `helm test --filter name=<hook>` at a time so a first failure can't hide the rest of the suite's state, and helm stays pinned to the resolved kubeconfig/context — never the ambient one. Honest-output rules (the #389 spirit): only a fully-passed suite exits 0; "unknown" is never worded as sealed; a cancelled run (Ctrl-C) and a failed hook enumeration yield no verdict at all. Also: moves the status command into client_status.go (client.go sat at its 1050-line file-budget ceiling) and adds Printer.Spinner strings to the copy-catalog harvest (they print as static lines on non-TTY runs and were previously missed by the backstop). Closes#393 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LukasWodka
commented
Jul 22, 2026
bugbot run |
LukasWodka
commented
Jul 22, 2026
👋 Heads-up — Code review queue is at 31 / 30 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
The table is the cross-command scripting contract; the new seal mode produces 2 (unsealed / unknown via exitChecksFailed) and shares the 3 / 4 cluster-resolution codes with the data and resources commands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LukasWodka
commented
Jul 22, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
…ks in every filter Two alignments against the chart-side suite (client docs/SEAL-CHECK.md, backend#1184) that landed in parallel: - The per-check identifier is the tracebloc.io/seal-check-name LABEL (values: egress-enforcement, backend-reachability, storage-assertions), not a seal-name annotation — read it from labels. The hint stays an optional CLI-side annotation (labels cannot carry sentences); absent, the kubectl-logs fallback stands. - The storage-assertions Job depends on a ServiceAccount/RBAC that are themselves test hooks at negative hook-weight, and helm's --filter excludes every unlisted test hook — plumbing included. Filtering to the check alone would strand the Job without its SA and report a false Unsealed. Every per-check run now lists the check PLUS the release's non-runnable test hooks (applied instantly; helm only waits on Jobs/Pods), while other checks stay excluded so the verdict remains per-check. Non-runnable hooks never count as checks: a chart whose only test hooks are plumbing is still honestly "unknown". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LukasWodka
commented
Jul 22, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
…C during enumeration (Bugbot) - helm.TestTarget.KubeContext now carries target.Resolved.Context, not the raw --context flag: with the flag omitted the raw value is empty and helm falls back to its own ambient resolution ($HELM_KUBECONTEXT included), which can diverge from the context client-go discovery just used. Same pinning `resources set` applies. - A context cancellation during `helm get hooks` now exits 130 quietly (like the per-check loop and `status --wait`) instead of reporting a hard enumeration failure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LukasWodka
commented
Jul 22, 2026
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1d9c07c. Configure here.
Resolves the develop conflict (branched before the upgrade #390 and prepare-host #394 commands merged): copy_catalog_test.go auto-merged to keep all three commands' catalog entries; regenerated goldens (zz-all-strings + 00-home + 08-client) so the harvested strings and command lists include upgrade, prepare-host, and the seal-check screens together. No code conflicts; the seal logic is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shujaatTracebloc
commented
Jul 23, 2026
Merged latest |
LukasWodka
commented
Jul 25, 2026
Functional review \u2014 passed\n\nBasis: the behavioural suites that ran on this PR at merge against real environments, not mocks:\n\n- \u2014 the installer suite exercised for real, plus across all packages\n\nI could not reach the dev API (no dev credentials), so rather than rubber-stamp I used the strongest evidence available: these suites exercise the actual behaviour this change alters, on real infrastructure. Advancing \u2192 .\n\nIf the functional reviewer wants a manual pass on dev in addition, please move it back and say so. |
Closes#393. Companion to RFC-0003 §8.2 D12 (#366) and the chart-side seal-check suite work (backend#1184).
Summary
tracebloc client status --sealruns the chart's conformance checks (its helm-test hooks — the seal check) against this machine's secure environment and prints an honest verdict with per-check detail:(Exit 3 = kubeconfig/cluster unreachable, exit 4 = no tracebloc client found — the same contract as the data/resources commands.)
Design choices
client status, not a new command. The repo has no top-levelstatus; its status command istracebloc client status, and the seal is the conformance dimension of that status.--waitset the precedent for mode flags there.--sealis mutually exclusive with--wait, and the cluster-targeting flags (--kubeconfig/--context/--namespace) +--timeoutare rejected when their mode isn't active rather than silently ignored.internal/helm/seal.go) — aligned with the chart side'sdocs/SEAL-CHECK.md(backend#1184 branchsecurity/seal-check-suite-1184): runnable test hooks (Jobs/Pods) labelledtracebloc.io/seal-check: "true"form the suite, andtracebloc.io/seal-check-nameis each check's stable identifier (egress-enforcement,backend-reachability,storage-assertions). No labelled hooks → run all of the chart's runnable helm tests, with a visible fallback note (works against today's unlabelled probes until the chart PR merges). No runnable test hooks at all → unknown, honestly. Atracebloc.io/seal-hintannotation is a CLI-side optional channel for a per-check failure hint (labels can't carry sentences); absent, the hint falls back to a copy-pasteablekubectl logspointer.helm test --filter name=<hook>,…per check, because helm stops a suite at the first failure — per-check invocation reports every check's state (the partially-degraded picture status: surface environment conformance (seal check) result #393 asks for), with the exit code as the unambiguous per-check signal. Each run's filter also carries the release's non-runnable test hooks (the storage check's SA/RBAC plumbing at negative hook-weight): helm's--filterexcludes every unlisted test hook, so filtering to the check alone would strand it without its ServiceAccount and report a false Unsealed. Plumbing never counts as a check (a plumbing-only chart is still "unknown"). Hook names come fromhelm get hookson the same release store the test action reads, so they can't drift.resolveClusterTarget(§7.3 active-client binding, "runs on another machine" rewrite, discovered release name — release ≠ namespace on customer-managed installs) and helm stays pinned to the resolved kubeconfig/context, never the ambient one.Also in this PR
client.gosat at its 1050-line file-budget ceiling, so the status command moved verbatim intoclient_status.go(client.go → 871 lines; the diff on client.go is a pure removal).Printer.Spinnerstrings added to the copy-catalog harvest — they render as static lines on non-TTY runs and were previously missing from thezz-all-strings.goldenbackstop (this PR'sChecking <check>…included).08-client.golden(rendered through the purerenderSealResult), withmustRendermarkers so they can't silently vanish.Test plan
make ciall green (vet, race tests, lint, fmt-check, schema-check, vulncheck, file-budget, deadcode, check-style);internal/clicoverage 84%+ (floor 80),internal/helm94%internal/helm/seal_test.go: hook parsing against realistichelm get hooksoutput (both seal labels, hint annotation, aux SA hook non-runnable, non-test hooks filtered, legacytest-successcounted, comment-only docs skipped), fail-closed on unparseable manifests, exact argv forget hooks/test --filter name=a,name=bincl. kubeconfig/context pinning, raw error+output passthroughinternal/cli/seal_test.go: sealed / unsealed (failure detail distilled from helm's output, chart hint + kubectl-logs fallback, suite continues past a failure) / unknown for both no-hooks and plumbing-only charts (never claims sealed) / fallback-unlabeled / labelled-subset-only / aux plumbing carried in every filter but never counted / enumeration-error → no verdict / resolve-error propagation (exit 4) / Ctrl-C → exit 130, no verdict /helmFailureDetailtable / cobra flag guards /--seal --timeoutreaches the per-check budgetTB_UPDATE_GOLDEN=1) and reviewed: three seal screens + new--helpin08-client.golden, all new strings inzz-all-strings.golden--wait --sealand cluster-flags-without---sealguards fire with exit 1security/seal-check-suite-1184) merges — until then the fallback path exercises today's unlabelled probes🤖 Generated with Claude Code
Note
Medium Risk
New cluster-facing helm test orchestration and scriptable exit codes (including honest non-zero for unknown/unsealed); behavior is heavily tested and reuses existing cluster resolution, but mis-verdict or helm edge cases could affect CI gates on seal checks.
Overview
Adds
tracebloc client status --seal, which runs the chart’s helm-test conformance checks against the active secure environment and prints sealed, unsealed, or unknown with per-check pass/fail lines and remediation hints. Only a fully passing suite exits 0; unsealed and unknown both exit 2 (exitChecksFailed); cluster/kube issues use the same 3/4 contract as other cluster commands.The
--sealmode is wired intoclient statusalongside existing--wait(mutually exclusive), with--kubeconfig,--context,--namespace, and--timeout(per-check budget) valid only when sealing. Implementation lives in newseal.goandinternal/helm/seal.go(hook discovery viahelm get hooks, onehelm test --filterper check so every check is reported).client statuscode moves fromclient.gotoclient_status.go.Docs and copy catalog update exit-code tables and golden screens for all three seal verdicts; tests cover helm parsing, verdict paths, flag guards, and cancellation behavior.
Reviewed by Cursor Bugbot for commit c767953. Bugbot is set up for automated code reviews on this repo. Configure here.