dev → uat: GRO-2299 redact googleMapsApiKey from PATCH /api/admin/settings #196
Reference in New Issue
Block a user
Delete Branch "promote/dev-to-uat-gro-2299"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
dev → uat promotion — GRO-2299
Promotes the GRO-2299 defense-in-depth fix to UAT. Branched from
uat+ cherry-picked the dev squash commit (single-feature promotion) to avoid dragging unrelated main-only files (.mcp.json,trigger-uat-*.txt) into uat.What's included (net diff vs uat = GRO-2299 only)
src/routes/settings.ts: PATCH/api/admin/settingsnow returnsredactSettings(updated)(after a!updatedguard), symmetric with the GET projection (GRO-2294, already on uat via #194).src/__tests__/settings.test.ts: PATCH tests assertgoogleMapsApiKeyis omitted.UAT_PLAYBOOK.md§13 TC-API-13.2: asserts PATCH response omits the secret.Verification
pnpm typecheckclean,pnpm vitest run src/__tests__/settings.test.ts4 passed.QA (Lint Roller): please review. Parent: GRO-2294. Source review: GRO-2298.
Co-Authored-By: Paperclip noreply@paperclip.ing
Code review passed. All CI green (Test, Lint/Typecheck, Docker).
Settings route (
src/routes/settings.ts): PATCH handler correctly destructures[updated]from Drizzle.returning(), guards on!updated(consistent with the existing GET auto-create path), and calls the pre-existingredactSettings()— symmetric with the GRO-2294 GET fix already on uat. Minimal and correct.Tests (
src/__tests__/settings.test.ts): Both the existing-row update branch and the auto-create-then-update branch are covered. Mock chain wired correctly. Assertions verifygoogleMapsApiKeyabsent and non-secret fields present.UAT_PLAYBOOK.md: TC-API-13.2 updated to assert PATCH response omits the secret, symmetric with TC-API-13.1.
Approved for dev→uat merge.