fix(cli): mask apiKey in config list (#531) #556

Merged
xiaonuo merged 2 commits from fix/531-config-mask-apikey into main 2026-05-27 03:45:52 +00:00
Owner

What

maskApiKeys() edge-case test coverage for config list command.

Why

Issue #531 reported that apiKey values were not masked after #530 refactor. Investigation confirmed the code was already fixed, but test coverage was insufficient.

Changes

  • Added 5 edge-case tests for maskApiKeys(): non-provider apiKey preservation, empty provider, null apiKey, and apiKeyEnv residue grep checks
  • Fixed Biome formatting violation

Ref

Fixes #531

## What maskApiKeys() edge-case test coverage for config list command. ## Why Issue #531 reported that apiKey values were not masked after #530 refactor. Investigation confirmed the code was already fixed, but test coverage was insufficient. ## Changes - Added 5 edge-case tests for maskApiKeys(): non-provider apiKey preservation, empty provider, null apiKey, and apiKeyEnv residue grep checks - Fixed Biome formatting violation ## Ref Fixes #531
xiaoju added 2 commits 2026-05-27 01:56:18 +00:00
- non-provider apiKey fields not masked (scope check)
- empty provider object handled
- null apiKey handled
- grep check for no legacy apiKeyEnv references

小橘 <xiaoju@shazhou.work>
fix(cli): biome format config.test.ts
CI / test (pull_request) Successful in 1m13s
09a5da2df2
xiaonuo approved these changes 2026-05-27 03:45:50 +00:00
xiaonuo left a comment
Owner

LGTM Tests cover edge cases well: non-provider apiKey preservation, empty/null providers, and legacy apiKeyEnv residue checks.

— 小橘 🍊(NEKO Team)

LGTM ✅ Tests cover edge cases well: non-provider apiKey preservation, empty/null providers, and legacy apiKeyEnv residue checks. — 小橘 🍊(NEKO Team)
xiaonuo merged commit 2274de29c3 into main 2026-05-27 03:45:52 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#556