MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-407

6.11.10 Retire the dropped external-submitter intake — ADR amend + schema column drop

Done
Description

Estimate: 45m · Depends on: 6.11.4, 6.11.8

Clean up after the dropped unauthenticated public portal (Yue 2026-06-14 — a work item is created only by a signed-in account). The 6.11.3 schema and the 6.11.2 ADR baked in a captured-external externalSubmitter (name/email, no account) attribution that is now unreachable: every triage item — in-app member OR the 6.12 signed-in non-member — carries a real submittedByUserId. This subtask owns the full retirement:

  • Schema (drop the dead columns). Remove the externalSubmitter embedded fields from work_item (keep submittedByUserId as the @relation, keep snoozedUntil). Author the Prisma migration so migrate dev reports no drift afterward (model the change on the schema, never raw-SQL-only — CLAUDE.md FK-as-relation rule); on the shared dev DB hand-author + migrate resolve per the shared-DB drift rule rather than letting migrate dev propose a reset.
  • Consumers. Grep for every externalSubmitter reference — DTOs, mappers, the queue-read attribution shape, the inbox DTO, any test fixture — and remove/replace it with the submittedByUserId-based "member vs public (non-member)" distinction. Typecheck + the touched services’ vitest stay green.
  • ADR amend. Update docs/decisions/triage-model.md §3 (submitter attribution) to record the revision: attribution is ALWAYS a real submittedByUserId (a workspace member, or a signed-in non-member via the 6.12 canSubmitToTriage grant); the captured-external name/email and the unauthenticated portal are removed. Cite the 2026-06-14 decision; leave the rest of the ADR (triage-state, read-exclusion, promote/decline/merge/snooze) intact.

Acceptance criteria

  • The externalSubmitter columns are dropped via a clean migration (migrate dev reports no difference after); submittedByUserId + snoozedUntil are unchanged.
  • No externalSubmitter reference remains in schema, services, mappers, DTOs, or tests; typecheck + the affected vitest are green; the per-file coverage gate holds.
  • docs/decisions/triage-model.md §3 records the signed-in-only attribution revision; the inbox still distinguishes member vs public submitter off submittedByUserId + workspace-membership.

Context refs

  • 6.11.2 ADR (docs/decisions/triage-model.md §3) + 6.11.3 schema — what this retires.
  • 6.11.4 — the intake that establishes submittedByUserId-only attribution; Story 6.12 — the signed-in non-member path.
  • motir-core/CLAUDE.md § migration FK-as-relation + the shared-DB migrate-dev drift rule + the per-file coverage gate.