Troubleshooting and decisions

Related: cognito-and-auth · secrets-and-configuration · test-account-and-integration-tests

Cognito

SymptomCauseFix
Unable to verify secret hashUsed Client Secret ID instead of secret valueCognito → Show client secret
Login works locally, CI failsMissing VILLA_COGNITO_CLIENT_SECRET in GitHubAdd repo secret
SignUp succeeds, login failsUser not confirmedConsole confirm or confirm_sign_up
NotAuthorizedExceptionWrong password or auth flow disabledEnable ALLOW_USER_PASSWORD_AUTH

PyPI / packaging

IssueResolution
Name villa-backend-sdk rejectedPublished as villa-market-backend-sdk
twine metadata 2.4 errorCap setuptools<77 in pyproject.toml

Testing strategy

DecisionRationale
SignUp API for test user, not IAM adminMatches real app users; no admin credentials in CI
Shared test account in repo JSONCredentials are dev-only; secret stays in env
Unit vs integration splitUnit mocked; integration uses live Cognito JWT

Documentation

DecisionRationale
docs/knowledge/ Obsidian notesSummarized decisions + wikilinks for humans/agents
AGENTS.md at repo rootCursor/agent quick reference
S3 static site from markdownShareable manual without GitHub access

Security

  • Never commit VILLA_COGNITO_CLIENT_SECRET or PYPI_KEY
  • git-secrets blocks accidental commits; it is not a secret store
  • Cursor Secrets / GitHub Actions for cloud and CI