beads/cmd/bd/serve_config_write_proxied_integration_test.go
Vishnu J 102372dabd
fix(notion): keep notion.token out of the Dolt database (#6676) (#6724)
* fix(notion): keep notion.token out of the Dolt database (#6676)

notion.token was missing from YamlOnlyKeys, so `bd config set
notion.token` (the command `bd notion status` recommends) wrote the
token to the Dolt config table, whose contents `bd dolt push` sends to
the remote. The git-tracked-config guard never fired for it either,
because checkSecretGitTracked only considers yaml-only keys.

- Add notion.token to YamlOnlyKeys, next to github.token, gitlab.token,
  jira.api_token and ado.pat, so `bd config set` writes it to
  config.yaml and refuses a git-tracked config.yaml.
- Map notion.token to NOTION_TOKEN in secretKeyEnvVarHints so that
  refusal suggests the variable bd actually reads, not BD_NOTION_TOKEN.
- notion.ResolveAuth now reads config.yaml first, then the database,
  then NOTION_TOKEN. The database read is kept only so a token stored
  by an older bd keeps authenticating after an upgrade.
- resolveNotionAuth's no-store fallback goes through ResolveAuth, so a
  config.yaml token is found even when no store is open.
- The proxied `bd serve` settings integration test used notion.token as
  its credential-bearing key and read it back with `bd config get`,
  which now reads config.yaml; it uses notes.api_token instead.
- The DB-backed-secret guard test used notion.token as its example of a
  non-yaml secret key; it uses custom.api_token instead.
- Docs list notion.token with the other yaml-only secrets, and the
  quickstart leads with NOTION_TOKEN because `bd init` in a git repo
  leaves config.yaml tracked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(config,notion): delete leaked secret rows on unset; name the legacy auth source

Maintainer review fixes for #6724 (GH#6676).

Finding 1 (major, PR-introduced): moving notion.token into YamlOnlyKeys made
`bd config unset notion.token` return before the store, so a workspace that had
already leaked the token into the pushed config table lost its only bd-side
remover — exactly the population the PR exists to protect. configUnsetCmd now
best-effort deletes the database row for yaml-only SECRET keys and reports which
copies it removed. It is keyed on IsYamlOnlyKey+IsSecretKey rather than on
notion.token, so it closes the gap for the whole class; measured, that is at
least ado.pat, github.token, gitlab.token, jira.api_token, linear.api_key,
linear.oauth_client_secret and notion.token, plus whatever the prefix rules
(`ai.`, `sync.`, `federation.`, ...) admit. Non-secret yaml-only keys are gated
out before the store is opened, so an ordinary `bd config unset routing.mode`
still costs no database open. It reads before deleting because DeleteConfig
reports no miss, so the common never-leaked workspace stays silent instead of
announcing a removal that did not happen.

Finding 2 (major, pre-existing class): internal/notion/auth.go asserted "It must
never be written to the database" as an unqualified invariant while
PUT /v0/beads/config/notion.token still writes that row with no refusal. Scoped
the comment to the CLI door and named the HTTP/dashboard door as the known
remaining hole. Closing that door is deliberately NOT attempted here: it is a
cross-tracker change at workapi.ValidateSettingWrite/SetSetting on a
pre-existing surface, and belongs where every tracker credential gets the rule
at once.

Finding 3 (minor): the config.yaml token and the legacy row both reported
`config_token`, collapsing the safe case with the leaked one. Added
AuthSourceDatabaseLegacy plus a `bd notion status` rotation warning — the only
signal that gives the CHANGELOG's rotation advice an addressee.

Finding 4 (minor): pinned the end-to-end shape `bd config set` actually writes.
The finding cited internal/config/config.go:653 (setNestedKey), which is
SaveConfigValue's writer and not on this path — SetYamlConfig routes through
updateYamlKey/updateNestedYamlKey — but its conclusion held: the written shape
is nested. The new test drives the real writer rather than a second fixture, and
both its assertions were proven live by mutation (breaking the config.yaml read
trips the round-trip; forcing the flat fallback trips the non-vacuity guard,
while the round-trip alone still passed, which is why that guard exists).

Finding 5 (nit): both "not configured" errors led with `bd config set
notion.token`, which the new git-tracked refusal rejects in the default
post-`bd init` layout. They now lead with `export NOTION_TOKEN`, matching the
quickstart's ordering.

Also corrected the CHANGELOG, which still claimed unset clears config.yaml only.

Validation: ./internal/notion and ./internal/config green under `env -u
BEADS_DIR`. The cmd/bd notion/config tests are green except
TestConfigValidateReadOnlyIsHermetic and
TestGetNotionConfigReadsDBPathWhenStoreUnset, which fail identically at the PR
head with these fixes stashed (A/B in this same worktree) — ambient, not
introduced here.

--- Iteration 2 review fixes (one major, three minors, one nit) ---

Finding 1 (major, introduced by the iteration-1 fixup above): the cleanup
reached the store through openWorkspaceConfig -> ensureDirectMode ->
ensureStoreActive, which is open-OR-CREATE. So `bd config unset <yaml-only
secret>` in a workspace holding only .beads/config.yaml created a 2.1 MB
embedded Dolt database and flipped it out of db-less mode for every later
command -- from a command whose contract is "edit a YAML file", silently and
with exit 0. It also contradicted configCommandCanRunWithoutStore, which
classifies this exact invocation as runnable with no store precisely when
beads.FindDatabasePath() is empty. unsetLeakedSecretRow now returns early
rather than reach an open-OR-CREATE store in a workspace that has no database to
reach. The proxied route is exempt rather than gated --
proxiedWorkspaceConfig reaches an already-connected provider and creates
nothing, and a server-mode workspace legitimately has no local database
directory for FindDatabasePath to find, so gating it on the local path would
silently disable the cleanup exactly where the row is most replicated. Iteration 3 finishes
that thought: the same is true of the DIRECT server-mode route, which this gate
still skipped.

Finding 2 (minor): the remover ran only if the YAML unset succeeded first,
which skipped it for the population it exists for -- no config.yaml, or a shape
UnsetYamlConfig refuses. Base deleted the row there and the fixup did not, while
`bd notion status` names this very command as the remover. The cleanup now runs
either way, and a failed YAML unset carries the row's fate in its error instead
of telling the user to run `bd init` while a credential sits in the pushed
table.

Finding 3 (minor): a failed DELETE of a row the read had found was rendered as
"Could not check the database ..." under a JSON key asserting unreachability --
the one outcome that is certain, reported as the inconclusive one.
removeStoredSecretRow now returns the found bit alongside the error, and the
delete-failure case gets its own message and its own JSON keys
(database_row_present / database_delete_failed), carrying the rotation warning.

Finding 4 (minor): nothing pinned the command -> cleanup wiring; deleting the
call left every test green. The yaml-only branch is now runConfigUnsetYamlOnly
and four new tests drive configUnsetCmd itself against a recording settings
surface: the row is read, deleted and reported; a non-secret yaml-only key
touches the config plane zero times; --json carries the new keys; and .beads/ is
byte-unchanged (config.yaml aside) after unsetting a secret with no database
present.

Finding 5 (nit): CHANGELOG and docs/reference/configuration.md described the
dual removal unconditionally. Both now say the database half is best effort and
name the cases where it is skipped or refused.

Every new pin proven by mutation, one at a time, each failing only with its fix
removed: dropping the FindDatabasePath gate takes the no-database test into
embeddeddolt.OpenSQL (it really does provision); re-gating the cleanup behind
the YAML unset leaves the row undeleted and unmentioned; replacing the command's
cleanup call with a zero value drops the report and the --json field; returning
false for `present` on a failed delete puts database_unreachable back.

Complexity ledger flat by construction: worst_changed stays
showConfigYAMLOverrides at cyclomatic 17 / cognitive 29, which this PR does not
touch and which measures identically at the base blob. The extracted
runConfigUnsetYamlOnly is 6/9 and the three report helpers are at most 5/2.

Iteration 2 validation: ./internal/notion and ./internal/config green under
`env -u BEADS_DIR`; all nine cmd/bd leaked-secret/notion-auth tests green, one
-run per invocation (a batched regex shares rootCmd and produces false reds);
the CGO_ENABLED=0 gms_pure_go cmd/bd test binary still compiles (the new test
file is untagged, so it carries its own tree-snapshot helper rather than the
cgo-tagged twin); scripts/check-doc-flags.sh and `go test -tags=gms_pure_go
./test/docsync` pass for the docs edit.

--- Iteration 3 review fixes (two minors, both on the gate itself) ---

Finding 1 (minor, introduced by the iteration-2 gate above): "not proxied and no
local database directory" over-fires. findDatabaseInBeadsDir answers on
metadata.json plus embeddeddolt/ and dolt/, and it skips the stat for server mode
only when metadata.json is present -- so a metadata-less server workspace, whose
host comes from config.yaml or BEADS_DOLT_SERVER_HOST (main.go, GH#3545, the
shape gc provisions on every `gc-beads-bd start`), reports "" while its row sits
on the shared server, replicated to every remote it pushed to. The skip was not
buying anything there either: PersistentPreRun has already CONNECTED that
workspace's store, and ensureStoreActive early-returns on an active store without
opening or creating anything. For notion.token this was a narrow regression of a
base capability -- at base that key was not yaml-only, so `bd config unset
notion.token` took the database branch and deleted the row. The seven
pre-existing yaml-only secrets never had a remover at base, so for them the skip
withheld only new coverage, which is what holds this at minor. The gate is now
mayProvisionDatabase, which asks about the store before the disk; each arm that
returns false is a route where the database is already open -- proxied, or a
store already active and tracked, which is provably non-provisioning because it
is ensureStoreActive's own no-op arm.

Finding 2 (minor): neither arm of that gate had a behavioral test. Deleting the
!usesProxiedServer() clause left all four command-level tests green, and it is
the only thing keeping the cleanup alive for proxied workspaces, which have no
local database directory by construction -- the clause a later simplification is
most likely to read as redundant was the one clause nothing defended.
TestConfigUnsetCleansTheRowWithNoLocalDatabaseDirectory now pins both arms as the
mirror of TestConfigUnsetDoesNotProvisionADatabase: "no local database directory"
is the state all three share, so the route to the database is the only thing that
distinguishes them.

Both arms mutation-proved, one at a time, each red on exactly one subtest while
the four pre-existing command-level tests stayed green under both mutations:
deleting the active-store arm reproduces the finding verbatim (GetSetting calls =
[], UnsetSetting calls = [] for a connected server workspace, exit 0); deleting
the !usesProxiedServer() arm leaves the proxied workspace's row never looked for.
That second half -- the pre-existing suite staying green -- is the claim Finding 2
rests on, and only a run under the mutation can state it.

The CHANGELOG's "skipped where there is no database to hold a row" and the
matching sentence in docs/reference/configuration.md asserted exactly what the
gate got wrong; both now say it is skipped only where reaching the row would mean
creating a database, and that a server-mode or proxied workspace whose database
is simply not on local disk still gets the cleanup.

Complexity ledger still flat: worst_changed stays showConfigYAMLOverrides at
cyclomatic 17 / cognitive 29 (untouched, identical at the base blob), and
extracting the gate took unsetLeakedSecretRow from 6/5 to 5/4 with
mayProvisionDatabase at 4/3.

Iteration 3 validation: gofmt clean, `go build ./cmd/bd/`, `go vet ./cmd/bd/` and
`git diff --check` clean; the six leaked-secret/notion-auth tests and the four
command-level tests all green against the real fix, one -run per invocation under
a private TMPDIR (a batched regex shares rootCmd and produces false reds; a
sibling suite's sweep deletes shared temp roots mid-run); the CGO_ENABLED=0
gms_pure_go cmd/bd test binary still compiles; scripts/check-doc-flags.sh,
scripts/check-doc-freshness.sh and `go test -tags=gms_pure_go ./test/docsync`
pass for the docs edit (no new links, anchors or headings, so the render check
does not apply).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
2026-09-27 14:53:11 -07:00

306 lines
13 KiB
Go

//go:build cgo
package main
import (
"encoding/json"
"io"
"net/http"
"strings"
"testing"
)
// End-to-end for the two settings writes, against real Dolt through a real
// `bd serve` subprocess.
//
// The pure tests in internal/httpapi cover the wire edge on a fake role — the
// request projection, the response projection, every refusal this edge owns.
// What only this level can prove is what the STORAGE TRANSACTION did, and on
// this plane that is most of the contract:
//
// - the write LANDS and the CLI sees it, which is the whole point of a
// configuration write nothing else in the process is going to re-read;
// - `status.custom` is PROJECTED into custom_statuses in the same transaction
// as the row, so `bd` starts accepting the status the write configured — a
// row without its table is a value that has been stored and has no effect,
// and no fake can be asked about a second table;
// - the ROLE's refusals are real refusals against a real workspace: writing
// `issue_prefix` is a 400 and the prefix is unchanged, and an unparseable
// `status.custom` writes NOTHING — not the row and not the table;
// - a CREDENTIAL-BEARING key is WRITABLE and its value never comes back, on
// either the write or the read that follows it;
// - the removal is idempotent against the table, not merely against the
// handler.
// putJSON puts body to path with the documented media type and returns the
// status and decoded body.
func (sp *serveProcess) putJSON(t *testing.T, path, body string) (int, map[string]any) {
t.Helper()
return sp.bodyRequest(t, http.MethodPut, path, body)
}
// deleteAt sends the bodyless removal and returns the status and decoded body.
func (sp *serveProcess) deleteAt(t *testing.T, path string) (int, map[string]any) {
t.Helper()
return sp.bodyRequest(t, http.MethodDelete, path, "")
}
func (sp *serveProcess) bodyRequest(t *testing.T, method, path, body string) (int, map[string]any) {
t.Helper()
var reader io.Reader
if body != "" {
reader = strings.NewReader(body)
}
req, err := http.NewRequest(method, sp.url(path), reader)
if err != nil {
t.Fatalf("new request %s %s: %v", method, path, err)
}
if body != "" {
req.Header.Set("Content-Type", "application/json")
}
resp, err := sp.client.Do(req)
if err != nil {
t.Fatalf("%s %s: %v\nstderr:\n%s", method, path, err, sp.stderr.String())
}
defer func() { _ = resp.Body.Close() }()
raw, err := io.ReadAll(resp.Body)
if err != nil {
t.Fatalf("read %s %s: %v", method, path, err)
}
var m map[string]any
if len(raw) > 0 {
if err := json.Unmarshal(raw, &m); err != nil {
t.Fatalf("decode %s %s body %q: %v", method, path, raw, err)
}
}
return resp.StatusCode, m
}
func TestProxiedServerServeSettingsWrites(t *testing.T) {
requireSharedProxiedServer(t)
t.Parallel()
bd := buildEmbeddedBD(t)
p := newSharedProxiedProject(t, bd, "srvcfgw")
sp := startServe(t, bd, p.dir, bdProxiedEnv(p.dir))
// THE ROW LANDS, and the CLI is the read-back rather than this surface's own
// GET: a write only this API can see would be a plane of its own rather than
// the settings plane `bd config` reads.
t.Run("the value lands and the CLI reads it", func(t *testing.T) {
status, body := sp.putJSON(t, "/v0/beads/config/notes.wire", `{"value":"written over http"}`)
if status != http.StatusOK {
t.Fatalf("status = %d, want 200: %v", status, body)
}
if body["key"] != "notes.wire" || body["value"] != "written over http" {
t.Errorf("body = %v, want the stored setting", body)
}
out, err := bdProxiedRun(t, bd, p.dir, "config", "get", "notes.wire")
if err != nil {
t.Fatalf("bd config get: %v\n%s", err, out)
}
if !strings.Contains(string(out), "written over http") {
t.Errorf("bd config get printed %q, want the value the HTTP write stored", out)
}
})
// THE PROJECTION, which is the reason SetSetting is not a thin REPLACE INTO
// and the one property no fake can be asked about: `status.custom` is
// rewritten into custom_statuses IN THE SAME TRANSACTION as the row, and the
// visible consequence is that `bd` starts accepting the status it configured.
t.Run("status.custom is projected into the table reads consult", func(t *testing.T) {
issue := bdProxiedCreate(t, bd, p.dir, "an issue to park", "-p", "2")
// Before the write the status is not in the workspace's vocabulary.
if out, err := bdProxiedRun(t, bd, p.dir, "update", issue.ID, "--status", "awaiting_review"); err == nil {
t.Fatalf("the workspace already accepts awaiting_review; this test proves nothing:\n%s", out)
}
status, body := sp.putJSON(t, "/v0/beads/config/status.custom", `{"value":"awaiting_review:active"}`)
if status != http.StatusOK {
t.Fatalf("status = %d, want 200: %v", status, body)
}
if out, err := bdProxiedRun(t, bd, p.dir, "update", issue.ID, "--status", "awaiting_review"); err != nil {
t.Fatalf("the row landed without its table: %v\n%s", err, out)
}
})
// THE PROTECTED KEY, refused by the ROLE against a real workspace, with the
// prefix left exactly as it was. A wire that let this through would leave the
// beads created before the write and the beads created after it disagreeing
// about their own namespace.
t.Run("the issue prefix is refused in either spelling and nothing changes", func(t *testing.T) {
before := bdProxiedCreate(t, bd, p.dir, "a bead minted before", "-p", "2")
for _, key := range []string{"issue_prefix", "issue-prefix"} {
status, body := sp.putJSON(t, "/v0/beads/config/"+key, `{"value":"zz"}`)
if status != http.StatusBadRequest {
t.Fatalf("writing %s: status = %d, want 400: %v", key, status, body)
}
if body["code"] != "invalid_argument" {
t.Errorf("writing %s: code = %v, want invalid_argument", key, body["code"])
}
if detail, _ := body["detail"].(string); !strings.Contains(detail, "bd init --prefix") {
t.Errorf("writing %s: detail = %q, want the role's own sentence", key, detail)
}
}
after := bdProxiedCreate(t, bd, p.dir, "a bead minted after", "-p", "2")
beforePrefix := before.ID[:strings.LastIndex(before.ID, "-")]
afterPrefix := after.ID[:strings.LastIndex(after.ID, "-")]
if beforePrefix != afterPrefix {
t.Errorf("the workspace's prefix moved from %q to %q; the refusal did not hold", beforePrefix, afterPrefix)
}
})
// AN UNPARSEABLE PROJECTION WRITES NOTHING — not the row and not the table.
// The parse is in the role rather than at a front door precisely so a value
// that cannot be projected cannot become a row that one door accepted and
// another refused.
t.Run("a status.custom that does not parse leaves the row alone", func(t *testing.T) {
const good = "triage_hold:active"
if status, body := sp.putJSON(t, "/v0/beads/config/status.custom", `{"value":"`+good+`"}`); status != http.StatusOK {
t.Fatalf("seeding a parseable value: status = %d: %v", status, body)
}
status, body := sp.putJSON(t, "/v0/beads/config/status.custom", `{"value":"::not a status::"}`)
if status != http.StatusBadRequest {
t.Fatalf("status = %d, want 400: %v", status, body)
}
readStatus, read, _ := sp.get(t, "/v0/beads/config/status.custom")
if readStatus != http.StatusOK {
t.Fatalf("read back: status = %d", readStatus)
}
if read["value"] != good {
t.Errorf("value = %v, want the previous value %q — the refused write must change nothing", read["value"], good)
}
})
// THE DOCTRINE, against a real workspace: a credential-bearing key is
// WRITABLE, and neither the write nor the read hands the value back. Refusing
// the write would protect nothing a writer does not already hold; withholding
// it from every reader is what redaction actually is.
t.Run("a credential key is writable and is never handed back", func(t *testing.T) {
// Not a tracker secret such as notion.token: those are yaml-only keys
// (GH#6676), which `bd config get` below reads from config.yaml rather
// than from the row this PUT writes.
const secret = "not-a-real-token-9f13"
status, body := sp.putJSON(t, "/v0/beads/config/notes.api_token", `{"value":"`+secret+`"}`)
if status != http.StatusOK {
t.Fatalf("status = %d, want 200 — a credential-bearing key is writable: %v", status, body)
}
if body["redacted"] != true {
t.Errorf("redacted = %v, want true", body["redacted"])
}
if _, present := body["value"]; present {
t.Errorf("the write handed the credential back: %v", body)
}
// The read agrees, and the enumeration agrees: one rule, decided on the
// key, for every operation that could carry the value.
readStatus, read, _ := sp.get(t, "/v0/beads/config/notes.api_token")
if readStatus != http.StatusOK {
t.Fatalf("read back: status = %d", readStatus)
}
if read["redacted"] != true || read["value"] != nil {
t.Errorf("the read published the credential: %v", read)
}
listStatus, list, _ := sp.get(t, "/v0/beads/config")
if listStatus != http.StatusOK {
t.Fatalf("list: status = %d", listStatus)
}
if raw, err := json.Marshal(list); err != nil {
t.Fatalf("marshal the settings page: %v", err)
} else if strings.Contains(string(raw), secret) {
t.Errorf("the settings enumeration carries the stored credential")
}
// And the CLI, which holds the database, prints it: the withholding is
// this SURFACE's and not a claim that the value was not stored.
out, err := bdProxiedRun(t, bd, p.dir, "config", "get", "notes.api_token")
if err != nil {
t.Fatalf("bd config get: %v\n%s", err, out)
}
if !strings.Contains(string(out), secret) {
t.Errorf("bd config get printed %q; the write did not store the value it accepted", out)
}
})
// THE VALUE BOUND, against the real column, in both directions. This is the
// hazard settingWriteKey already guards on the key half: config.value is a
// TEXT column, and before the bound a 100 KiB PUT was a generic 500 from the
// column — a request the caller could have fixed, answered with the one code
// that says nothing about how to fix it.
//
// The accepted case is the half that keeps the refusal honest: a value at
// the ceiling must reach the column and land, or the bound is stricter than
// the storage it claims to describe.
t.Run("an oversized value is refused and a ceiling value lands", func(t *testing.T) {
oversized, err := json.Marshal(map[string]string{"value": strings.Repeat("v", 100*1024)})
if err != nil {
t.Fatalf("marshal body: %v", err)
}
status, body := sp.putJSON(t, "/v0/beads/config/notes.big", string(oversized))
if status != http.StatusBadRequest {
t.Fatalf("a 100 KiB value: status = %d, want 400 — refused at the edge, not by the column: %v", status, body)
}
if body["code"] != "invalid_argument" || body["param"] != "value" {
t.Errorf("problem = %v, want invalid_argument on param value", body)
}
// Nothing landed, which a 400 asserts and a read-back proves.
readStatus, read, _ := sp.get(t, "/v0/beads/config/notes.big")
if readStatus != http.StatusOK {
t.Fatalf("read back: status = %d", readStatus)
}
if _, present := read["value"]; present {
t.Errorf("the refused write landed: %v", read)
}
// And exactly the column's ceiling goes all the way through to Dolt.
ceiling, err := json.Marshal(map[string]string{"value": strings.Repeat("c", 65535)})
if err != nil {
t.Fatalf("marshal body: %v", err)
}
status, body = sp.putJSON(t, "/v0/beads/config/notes.ceiling", string(ceiling))
if status != http.StatusOK {
t.Fatalf("a 65535-byte value: status = %d, want 200 — this value fits the column: %v", status, body)
}
readStatus, read, _ = sp.get(t, "/v0/beads/config/notes.ceiling")
if readStatus != http.StatusOK {
t.Fatalf("read back: status = %d", readStatus)
}
if got, _ := read["value"].(string); len(got) != 65535 {
t.Errorf("stored %d bytes of a 65535-byte value; the column truncated it", len(got))
}
})
// THE REMOVAL, against the table: it removes, and removing again succeeds
// rather than reporting a miss this role cannot see.
t.Run("the removal is idempotent and reports no miss", func(t *testing.T) {
if status, body := sp.putJSON(t, "/v0/beads/config/notes.temp", `{"value":"transient"}`); status != http.StatusOK {
t.Fatalf("seed: status = %d: %v", status, body)
}
for i := range 2 {
status, body := sp.deleteAt(t, "/v0/beads/config/notes.temp")
if status != http.StatusOK {
t.Fatalf("removal %d: status = %d, want 200 — this operation has no miss to report: %v", i+1, status, body)
}
if body["key"] != "notes.temp" {
t.Errorf("removal %d: key = %v, want the key the path named", i+1, body["key"])
}
if _, present := body["removed"]; present {
t.Errorf("removal %d publishes a `removed` flag: %v", i+1, body)
}
}
// Gone from the CLI's view too, which is the read-back that matters.
out, err := bdProxiedRun(t, bd, p.dir, "config", "get", "notes.temp")
if err == nil && strings.Contains(string(out), "transient") {
t.Errorf("bd config get still prints the removed value: %s", out)
}
})
}