carlos / platform Public

reserved sqids test: the CLI child can only reach the dir store

TestAccountsCreateSkipsAReservedSqid built the child env from os.Environ().
openStore prefers CARLOS_DEPLOYMENT_BUCKET over CARLOS_DEPLOYMENT_DIR, so a
shell exporting a real bucket and AWS credentials would have minted a real
"shop" account. The env now comes from carlosTestEnv, with
CARLOS_DEPLOYMENT_BUCKET and AWS_PROFILE blanked. Verified by running the
test with CARLOS_DEPLOYMENT_BUCKET=nonexistent-bucket-xyz exported: it
passes against the dir store. (Astra review of 08cb0b20, P1.)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 9ee6a7dd98fa8f2ea63fc9e16da9b6d4d97e16ab parent 08cb0b2
1 file changed, +7 −4
  • auth_e2e_test.go +7 −4

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
cd launchctx && go vet ./... && go test ./... -count=1
ok  	amadan.net/carlos/platform.git/launchctx	0.011s
?   	amadan.net/carlos/platform.git/launchctx/controlname	[no test files]
?   	amadan.net/carlos/platform.git/launchctx/wireid	[no test files]
go vet ./...
gofmt -l .: clean
go test ./... -count=1 -timeout 30m

amadan: job cancelled — a newer push superseded it
diff --git a/auth_e2e_test.go b/auth_e2e_test.go
index b754890d1..995face88 100644
--- a/auth_e2e_test.go
+++ b/auth_e2e_test.go
@@ -238,13 +238,16 @@ func TestAccountsCreateSkipsAReservedSqid(t *testing.T) {
t.Fatal(err)
}
cmd := exec.Command(bin, "accounts", "create", "-name", "shop", "-owner", "owner@example.com")
- cmd.Env = append(os.Environ(),
+ // openStore prefers CARLOS_DEPLOYMENT_BUCKET over CARLOS_DEPLOYMENT_DIR, so
+ // an inherited bucket (plus AWS credentials) would mint a real account.
+ // Blank both, so the child can only reach the dir store.
+ cmd.Env = carlosTestEnv(t,
+ "CARLOS_DEPLOYMENT_BUCKET=",
+ "AWS_PROFILE=",
"CARLOS_DEPLOYMENT_DIR="+storeDir,
- "CARLOS_CREDENTIALS="+filepath.Join(tmp, "credentials"),
"CARLOS_DATA_DIR="+tmp,
- "HOME="+tmp,
- "CARLOS_CONSOLE=",
)
+ // pick() walks cwd ancestors for .carlos/config, so the subprocess must not run from the real checkout.
cmd.Dir = tmp
out, err := cmd.CombinedOutput()
if err != nil {