fix(ungated-global): create settings secret with a valid backend FK #138
Reference in New Issue
Block a user
Delete Branch "fix/ungated-global-secret-fk"
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?
Follow-up to #137. On a DB where the
mcpctl-system-settingssecret didn't exist,bootstrapUngatedGlobal'smarkSeededcreated it with the defaultbackendId: '', violatingSecret_backendId_fkeyat insert time → mcpd crash-looped on startup (P2003). Caught in deploy (mcpd rolled back to restore service).Fix:
bootstrapUngatedGlobalafterbootstrapSecretBackendsso the default plaintext backend exists.isDefault, else any) and setbackendIdon create; if no backend exists at all, skip writing the marker rather than crash.Test updated to assert the valid
backendIdon the create path.🤖 Generated with Claude Code