Skip to content

[tracking] data-ops low-severity hygiene #69

Description

@tkowalczyk

Grouped low-severity findings in packages/data-ops.

  1. UpdateNotificationSourceInput allows type/config mismatch & cannot null topicIdzod-schema/notification-source.ts:31-38. config is z.any(); a {type:"birthday"} PUT over a waste source persists incoherent config. Test: reject type change without matching config; accept topicId:null.
  2. initDatabase does not URL-encode credentials & ignores re-initdatabase/setup.ts:14-21. A password with @///# breaks the connection string; if(db)return db silently keeps the first client. Test: connection string for p@ss/w#rd contains p%40ss%2Fw%23rd.
  3. Drizzle configs reference a nonexistent relations.tsdrizzle-{dev,stage,prod}.config.ts:9; tests/drizzle-config.test.ts:22 asserts the string, not the file. Test: every schema path exists on disk.
  4. seed.ts raw-SQL interpolation, non-transactional, no ON CONFLICTscripts/seed.ts:42-103. Breaks on an apostrophe in a value; partial state on mid-run failure.
  5. All timestamp columns are WITHOUT time zoneschema.ts, auth-schema.ts. Correct only while every writer agrees on UTC; timestamptz is the cheap fix now.
  6. email_whitelist lookup normalized but storage is notqueries/email-whitelist.ts:9-17, schema.ts:162-167. A mixed-case stored row never matches → user locked out. Test: insert mixed-case, assert lookup matches.
  7. Unbounded queriesqueries/delivery.ts:13-20,63-70 (getDeliveryLogs/getDeliveryFailures) and leads.ts:17-20 (listLeadsForAdmin) have no LIMIT/pagination.
  8. SourceFormInput omits householdIdzod-schema/source-form-schema.ts:21-35 → forces an unvalidated cast at the worker call site.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    audit/2026-06Filed from June 2026 deep auditseverity/lowHygiene / latent risk

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions