High priority
Integration mutation runs may over-count killed mutants
Integration mutation runs may over-count killed mutants
npm run test:mutation:integration, and the critical-files gate that merges its report, can count a mutant as killed when no test detected it. Stryker runs a type-checking process plus one test process, then adds a second test process when type checking finishes. Both use the same INTEGRATION_DATABASE_URL, and every test starts by resetting the database, so one process can wipe the other’s data mid-test. The result is inflated, never deflated: a surviving mutant is trustworthy, a mutant killed only in the integration run is not.Workaround. Treat mutants killed only in the integration run as unconfirmed. Do not run npm run test:integration or a second Stryker run against the same database at the same time.Railway may ignore railway.toml, and a deploy without migrations looks healthy
Railway may ignore railway.toml, and a deploy without migrations looks healthy
railway.toml, so the pre-deploy migration, healthcheck and restart policy from the file are not applied. The image still builds and node server.js starts, so the deploy looks fine, but the database has no tables and every sign-in fails. The same happens when a project did not commit its migrations: prisma migrate deploy with no migrations exits with 0, and /api/healthcheck (SELECT 1) passes on an empty database.Workaround. Enter the settings from railway.toml in the Railway service settings by hand, commit your migrations, and check the migration log after the first deploy. See Railway.CLI
gato add does not fill in .env
gato add does not fill in .env
gato add api-keys or gato add uploads, the module’s variables are added only to the wa:modules region of .env.example; .env is unchanged and the CLI does not mention it. With api-keys, the app refuses to start until API_KEY_PEPPER is set. With uploads, development works with the local provider, but production startup requires STORAGE_LOCAL_PATH. Likewise, gato remove and gato update leave .env alone.Workaround. After add or update, copy new variables from .env.example to .env and set real values. After remove, delete them from .env and production settings. See Environment variables.API_KEY_PEPPER is never generated, and cannot be rotated
API_KEY_PEPPER is never generated, and cannot be rotated
gato create generates only BETTER_AUTH_SECRET. The API_KEY_PEPPER example value is rejected with NODE_ENV=production, which stops the whole app, not just the module. API keys are stored as HMAC-SHA256 with one pepper, so changing it invalidates every key (requests get 401, while the list still shows them as active), and there is no transition period with two peppers.Workaround. Set a random pepper of at least 32 characters before the first deploy (for example openssl rand -base64 32) and keep it stable per environment. After a forced change, organizations issue new keys and delete the old ones. See API keys.gato update cannot add a module that a newer kit starts to require
gato update cannot add a module that a newer kit starts to require
requires entry to an installed module for a module you do not have, gato update stops with Moduł <x> w wa-kit <version> wymaga niezainstalowanych modułów: <list>. gato add cannot help when that module exists only in the newer kit, because add fetches the kit at your current version.Workaround. Carry the kit changes over by hand. Kit maintainers avoid adding such requires to existing modules.Other CLI gaps
Other CLI gaps
Modules
Audit log and file storage grow without cleanup
Audit log and file storage grow without cleanup
audit-logs has no retention: nothing deletes old entries, and they disappear only with their organization. uploads leaves orphaned objects with both providers: when a user uploads a file and does not save the form (the upload happens on selection), when an entity is deleted without deleteUploadCommand, when deleting an object or rolling back a write fails, when an organization is deleted (records cascade, stored objects stay), and after gato remove uploads with a migration that drops the table.Workaround. Implement retention in your project, for example a periodic query that deletes entries older than your retention period. Find orphaned objects by comparing storage keys with the key column of the uploads table, and call deleteUploadCommand when you delete an entity. Retention and cleanup are planned for the background jobs module (Roadmap).The local storage provider: one instance, a durable directory, no migration between providers
The local storage provider: one instance, a durable directory, no migration between providers
local provider writes files to the server’s disk:- A second app instance does not see the first one’s files, so an upload on one and a download from the other gives 404.
- The directory must survive restarts and deploys. Startup rules require a volume on Railway and an absolute
STORAGE_LOCAL_PATHelsewhere, but do not check that the directory is durable or writable; a missing write permission shows up on the first upload as a 500. - After changing
STORAGE_PROVIDER, files stored earlier stay in the old storage and return 404. - An absolute path inside
.next/standaloneor a temp directory is accepted, but is wiped by builds or deploys. - Path traversal protection is lexical: a symlink inside the storage directory pointing outside it is followed.
STORAGE_PROVIDER=s3. Point STORAGE_LOCAL_PATH at a persistent volume outside .next, choose the provider before the first upload, move files yourself (keeping keys) when you switch, and do not share the storage directory with other processes. See File storage.One file referenced by two entities
One file referenced by two entities
uploads does not know which entities reference a file. deleteUploadCommand deletes the record and the object without checking references, so a second entity pointing at the same file gets 404.Workaround. Make the file id column unique, or check references before calling deleteUploadCommand.Auth, roles and organizations
Invitations for people who already have an account
Invitations for people who already have an account
/accept-invitation/<id>, “Sign in” goes to /sign-in without a return address and lands on the dashboard; “Create account” with an existing address shows a success message without creating anything. Either way the invitation stays pending. The page also accepts the invitation on a plain GET for a signed-in user, without a confirmation button.Workaround. Sign in first, then open the invitation link from the email again.The runtime organization guard does not see every query
The runtime organization guard does not see every query
prisma.apiKey.findMany, tx.upload.create). Raw SQL, nested include/select and nested writes from a parent model such as Organization or User, and the Member and Invitation models pass unchecked. The guard also checks that a filter is present, not that it names the active organization.Workaround. Write raw SQL on organization tables with an organization_id condition and an isolation test. Read related domain data starting from a guarded model with an organization filter. Always take organizationId from getOrgContext() or the API key context, never from input. See Organizations.Service mode confirmation does not cover everything
Service mode confirmation does not cover everything
useServiceModeAction().run. Direct authClient.organization.* calls (member management, creating an organization) bypass it; today this does not expose another organization’s data, but new superadmin UI built on those calls would. A tab rendered in organization A still writes to organization B after you switch in another tab, outside service mode.Workaround. Build new superadmin UI on kit commands, not authClient.organization.*. Do not work in two tabs in different organizations with the same account. See Superadmin and service mode.Impersonation and service accounts after a support period
Impersonation and service accounts after a support period
/api/auth/admin/* endpoints. Cutting off support access takes several API calls, and an impersonation session (one hour) survives a role change or account deletion.Workaround. Follow the access cut-off procedure in Handover, and end impersonation (or wait an hour) before cutting access.Other auth gaps
Other auth gaps
Other
Language detection is on
Language detection is on
/en/..., and one visit to /en/... sets a NEXT_LOCALE=en cookie that redirects later unprefixed URLs too. End-to-end tests do not notice, because Playwright runs with the pl locale.Workaround. Open any /pl/... URL (which sets the cookie back), delete the cookie, or set localeDetection: false in src/i18n/routing.ts if you want Polish without a prefix always. See i18n.Server action errors are not translated, and there is no localized 404
Server action errors are not translated, and there is no localized 404
en version users see Polish error messages from server actions. A 404 shows the default Next.js page in any language.Workaround. Translate the messages your features return, and add a not-found page with translations in your project.No logs in production without an OTLP endpoint
No logs in production without an OTLP endpoint
OTEL_EXPORTER_OTLP_ENDPOINT nothing is stored, and the log level cannot be configured.Workaround. Set OTEL_EXPORTER_OTLP_ENDPOINT in production. See Logging and observability.HOSTNAME=127.0.0.1 causes a redirect loop
HOSTNAME=127.0.0.1 causes a redirect loop
127.0.0.1, an unprefixed Polish URL such as /sign-in redirects to itself. /en/... URLs work and /api/healthcheck returns 200, so the healthcheck does not catch it. The default Dockerfile sets HOSTNAME="0.0.0.0".Workaround. Keep HOSTNAME at 0.0.0.0 (or ::) and open an unprefixed URL after each deploy. See Docker.handleCommandError turns access denials into a generic error
handleCommandError turns access denials into a generic error
requireModuleAccess calls notFound() on denial. A command that calls it inside try returns the generic failure message, and the log records an error instead of a warning. The denial is safe, but users without access see “something went wrong” and logs cannot tell a denial from an outage. The same applies to NoOrganizationError.Workaround. None yet; keep the pattern from Code patterns.The protect-tests hook protects less than test files
The protect-tests hook protects less than test files
__tests__/, e2e/ and *.test.*/*.spec.* files, but not src/test/ helpers, Vitest, Playwright and Stryker configs, mutation-gate.json, the hook itself or .claude/settings.json. An implementer could change test behaviour through them.Workaround. Review diffs to those files; allowed entries in the mutation gate are approved by a human in the pull request. See AI agents.Smaller items
Smaller items