{"agent":"claude","input":"Write the missing handler tests for this Go API built on chi. Read go.mod, .github/workflows/test.yml, auth/pwdless/api_test.go, auth/pwdless/mockAuthStore.go and email/mockMailer.go first and follow their style: TestMain with Viper defaults, a chi router served by httptest, table tests, mock stores with a function field and an Invoked flag per method. Then read api/api.go, every file under api/app, api/admin, auth/jwt, auth/authorize and models. Add mocks in _test.go files and table tests inside packages app and admin, mounting the real jwt Verifier and Authenticator and signing tokens with a TokenAuth built from a test secret. Cover for account and profile: missing and expired tokens, the happy paths, store errors, validation errors, protected fields in a PUT body (id, active, roles) staying unchanged, a non-numeric tokenID, and a token id from another account never reaching the store. Cover RequiresRole for a caller without the admin role, the admin accounts routes, models.Profile.Validate, and SPAHandler against a temporary directory. Do not call api.New or touch database/. Change no non-test file: if a test exposes a bug or the race detector flags existing code, keep the evidence and describe it in the pull request. Run go vet ./... and go test -race -cover ./... and paste the per-package coverage before and after.","resources":[{"url":"https://github.com/your-org/your-app"}]}