Skip to content

🔧 Propagate downstream + run prod migration (Trawl) #3815

@PierreBrisorgueil

Description

@PierreBrisorgueil

Phase 9 of the invitations↔org decouple epic. Plan Phase 9. Runs after all upstream phases merge.

Propagate the stack changes to downstream Trawl and run the prod migration.

  • /dev:update-project targeting Trawl (Node then Vue), absorbing P1 (no-op) then P2-P8 in the two-step order (gate-land first, module-extraction second) to avoid the auth.controller.js 3-way conflict.
  • Run on Trawl prod (lily Mongo LouNode): the drop-org-invited-memberships migration (deletes the 1 leftover invited membership, $unset the 3 fields, drop sparse index) + the users-email-ci-unique-index migration (pre-check no case-variant dupes, then swap). Verify the invitations collection (2 live docs) is untouched.
  • Verify live: beta gate still enforces (sign.up:false, cap:50); admin Invitations tab works; account Referrals tab appears; org join-requests + new add-member flow work; the 2-step "invite then add to org" path works end-to-end.

Acceptance: Trawl /update-stack merged (no unexpected conflicts); prod migrations applied; beta gate + invitations + org flows verified live.


🛑 Fable review corrections (2026-06-10, code-verified vs origin/master)

  • The auth.controller.js 3-way-conflict fear is GONE — the invitation files are byte-identical Trawl↔Devkit master. P1 is already a no-op on the invitation surface.
  • Real /update-stack collisions the later phases merge INTO: (1) #1347 crypto decoupling — Trawl auth.service.js + users.service.js use lib/helpers/crypto.js (devkit keeps inline bcrypt); P3's email-normalization edits users.service exactly there → resolve preserving cryptoHelper (or upstream #1347 first); (2) #1304/#1347 org crud.service.js _onRemovedHandlers registry (intentional behavior change); (3) a trawl-only migration under modules/organizations/migrations/ the ISO-merge must preserve.
  • Migrations auto-run at boot via lib/services/migrations.js (claim-before-execute, basename-date-sorted) before listen() — prod migration ordering is deploy-coupled. guest_1 orphan index will NOT be recreated (no guest field in the model). invitations collection name preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions