StackTrading Docs

SRS: UC_8.2.9 — Flow 15: Pod Re-Assignment & Management

FieldValue
UC_IDUC_8.2.9
Versionv1.6
Last Updated2026-10-30
BA PiClinh.nguyen34
CategorySTAGE 6: CAREER PATH & PROFESSIONALIZATION
ModulePod System
FunctionFlow 15 — Pod Re-Assignment & Management
Document ReferencesZapier Integration V7.pdf (§Flow 15: Pod Re-Assignment & Management lines 2007–2038; §Pod_Leader_Registry lines 777–790 — naming reference only, Pod_Leader_Registry is native PostgreSQL, not a live Zapier Table, restates POD-JOIN-02; §POST /admin-pod-reassignment lines 2788–2800) · RFQ_ Stack Trading Prop Tech V7.pdf (§Admin Pod Reassignment endpoint lines 2788–2800; §Manage Discord Role lines 2335–2350; §Archive Pod Channel lines 2280–2292; §BPS Audit Log lines 2724–2761)

1. UC Index

UC_IDFunctionDescription
UC_8.2.9Flow 15 — Pod Re-AssignmentManages mentee reallocation across 3 triggers: leader suspension/termination, BPS admin override, and leader ineligibility flag. Executes Discord role sync, registry update, mentee re-matching via Flow 10 matching logic, and carry balance liquidation on termination.

UC_8.2.9 — Flow 15: Pod Re-Assignment & Management

FieldValue
Use CasePod Re-Assignment & Management
DescriptionHandles all scenarios where a mentee must be moved to a different Pod Leader or removed from a pod. Three independent triggers cover system-automated re-assignment (leader status change), admin-manual override (BPS), and eligibility revocation. Each path updates the SQL registry, syncs Discord roles, notifies affected parties, and — where applicable — liquidates pending carry balance.
Zapier FlowFlow 15 (Pod Re-Assignment & Management) — 3 trigger paths (A/B/C)
Zapier TablePod_Leader_Registry (native PostgreSQL table)
3rd PartyDiscord Bot API · AWS SES
BPS EndpointPOST /admin-pod-reassignment

2. Triggers

Flow 15 has three independent trigger paths. Each path is mutually exclusive at entry; all converge on Discord sync and registry update steps.

TriggerConditionSourcePath
Trigger APod Leader Pod_Status changes to Suspended or Terminated. Three sources: (1) BPS Admin manual status change; (2) POD_LEADER_TERMINATED webhook from Flow 7 (UC_9.10 — Pod Impact & Dispersal); (3) Flow 4B (Drawdown Defense Re-Activation) — when is_pod_leader == True, Middleware sets Pod_Leader_Registry.Status = 'Suspended' after the 48h Defense freeze completesStatus change event on Pod_Leader_Registry · POD_LEADER_TERMINATED webhook (Flow 7 Condition B) · Flow 4B Defense check is_pod_leader == TrueAuto re-assignment cascade
Trigger BWebhook received from Middleware POST /admin-pod-reassignmentBPS Admin manual override webhookBPS Admin manual override
Trigger COps marks Pod Leader as Permanently_Ineligible in Pod_Leader_RegistryBPS Admin manual flagEligibility revocation

(Source: Zapier Integration V7.pdf §Flow 15 lines 2007–2038 · CR-20260818-001 — Flow 7 Pod Impact & Dispersal)

Release scope (Client confirmation 2026-10-30) — see BR_8.2.9.11:

TriggerReleaseNote
Trigger APhase 1 (Go-Live)Automated Pod dissolution, Flow 10 mentee re-matching, Discord role/channel archiving. Source (1) "BPS Admin manual status change": Phase 1 — performed via backend script; Phase 2 (Release 2) — performed via the BPS Admin Portal UI. Sources (2) Flow 7 webhook and (3) Flow 4B Defense path are automated in Phase 1.
Trigger BPhase 2 (Release 2)Phase 2: implemented via BPS Admin Portal (POST /admin-pod-reassignment). Phase 1: rare manual reassignments handled by backend scripts.
Trigger CPhase 2 (Release 2)Phase 2: implemented via BPS Admin Portal (POST /api/bps/mentor/revoke). Phase 1: rare Permanent Ineligibility toggles handled by backend scripts.

3. Pre-conditions

IDPre-condition
P1For Trigger A: Pod_Status = 'Suspended' or Pod_Status = 'Terminated' is set on a Pod_Leader_Registry record — by BPS Admin manual action, via POD_LEADER_TERMINATED webhook from Flow 7 (UC_9.10), or via Flow 4B Defense path when is_pod_leader == True (see BR_8.2.9.10)
P2For Trigger B: POST /admin-pod-reassignment payload contains all required fields (user_id, new_pod_id (nullable), admin_id, reason, transcript_url, request_id (UUID))
P3For Trigger C: Admin has manually updated Pod_Leader_Registry.Status = 'Permanently_Ineligible' via BPS
P4Cooldown Check (Trigger B only): pod_reassignment_date for the target user_id must be ≥ 30 days ago, or NULL

4. Post-conditions

TriggerPost-condition
Trigger AAll active mentees of the failed leader are re-matched (or placed on waitlist). Pod_Leader_Status set to Acting_Cover (temporary) or Reassigned (permanent). Discord roles updated. Pod_Reassigned_Notification email sent. If Termination: Pending_Carry_Balance liquidated to Stack General Account.
Trigger Bpod_leader_id updated in Users table. pod_reassignment_date set to today. Discord roles synced (old removed, new assigned). Pod_Reassigned_Notification sent to trader + Slack alert to old/new Pod Leaders. Audit log entry written.
Trigger CPod_Leader_Registry.Status = 'Permanently_Ineligible'. POD_LEADER_TERMINATED webhook fired. All active mentees re-matched via Flow 10 (or placed on Waitlist). Discord offboarding executed (channel archived, Pod Leader role revoked). Pending_Carry_Balance forfeited to Stack General Account. Pod_Reassigned_Notification sent to affected mentees. Leader permanently excluded from all future Flow 10 matching queries.

5. Basic Flow

Trigger A — Leader Status Change (Auto Cascade)

Step A-1. Detect Status Change

  • Zapier catches the status change event on Pod_Leader_Registry where Pod_Status IN ('Suspended', 'Terminated').
  • This event fires from three sources:
    • BPS Admin manual action — Admin sets Pod_Status directly via BPS.
    • POD_LEADER_TERMINATED webhook from Flow 7 — Flow 7 (UC_9.10 — Pod Impact & Dispersal) fires this webhook on Condition B (leader terminated mid-cycle). On receipt, Middleware automatically executes UPDATE Pod_Leader_Registry SET Pod_Status = 'Terminated' before kicking off the re-assignment cascade. (Source: CR-20260818-001)
    • Flow 4B Defense path — When Flow 4B (Drawdown Defense Re-Activation) activates and detects Users.is_pod_leader == True: (1) account enters 48h Defense freeze (account locked immediately); (2) after freeze, Middleware sets Pod_Leader_Registry.Status = 'Suspended'; (3) Users.stagnation_deadline = Today + 60 Days (Performance Improvement Plan timer — per CR-64); (4) pod dissolved and this Trigger A cascade executes. Trader is ineligible for pod activities for the 60-day PIP period. Re-activation path after passing PIP: Flow 15B (UC_8.2.10). (Source: CR-64)
  • Query: Find all active mentees where Pod_Leader_ID = [Failed_Leader_ID].

Step A-2. Re-match Mentees

  • Loop through mentee list → execute Flow 10 Matching Script (Python) against Pod_Leader_Registry for each mentee.
  • Criteria Waterfall (per Flow 10): 1. Asset Match (Strict) → 2. Style Match → 3. Fallback: Lowest Current_Count.
  • If match found: assign in DB, increment new leader's Current_Count.
  • If no match (all leaders at Max_Capacity = 7): set mentee Pod_Status = 'Pod_Waitlist'.

Step A-3. Set Leader Status

  • Pod_Status = 'Acting_Cover' if trigger reason = Suspended (temporary).
  • Pod_Status = 'Reassigned' if trigger reason = Terminated (permanent).

(Source: Zapier Integration V7.pdf §Flow 15 Trigger A lines 2008–2023)

Step A-4. Discord Operations (Archive-First Pattern)

To avoid race conditions and orphan interactions in active pod channels, calls MUST follow the archive-first sequence.

  • Step A-4.1 — Archive Channel (always first):

    • Call POST /archive-pod-channel with pod_leader_id: [Failed_Leader_ID].
    • Bot immediately revokes read/write access for all pod members (leader + all mentees), renames channel from pod-[leader_name] to archived-pod-[leader_name], clears channel_url in Pod_Leader_Registry.
    • Rationale: channel is frozen for everyone simultaneously before any role change occurs, eliminating the window where the channel is live but leaderless.
  • Step A-4.2 — Revoke Leader Role:

    • Call POST /manage-discord-role with action: "REMOVE", role_name: "Pod Leader", user_id: [Failed_Leader_ID].
  • Step A-4.3 — Full Digital Eviction (Termination only — Trigger A via Flow 7 or Flow 15C):

    • Call POST /discord/revoke-all-roles to strip all Title Roles (Associate / Trader / Senior), Pod Roles, and Special Roles from the terminated leader's account.
    • The user account remains on the server as a general/unverified member — NOT kicked or banned unless Admin takes further manual action.
    • This step is skipped for Suspension; only A-4.1 + A-4.2 apply.
  • Step A-4.4 — Mentee Re-Sync (after Flow 10 reassignment in Step A-2):

    • For each mentee re-assigned to a new Pod Leader: revoke access to the old pod channel (already archived), grant access to new pod channel, sync Mentee roles for new pod.
    • Call POST /manage-discord-role per mentee for new pod channel access.

Step A-5. Notify

  • Send Pod_Reassigned_Notification email to each re-assigned mentee ("Meet your new mentor").

Step A-6. Carry Balance Liquidation (Termination only)

  • IF trigger reason = Terminated:
    • Liquidate Pending_Carry_Balance → Stack General Account (forfeit).
    • Set Pending_Carry_Balance = $0.00.

(Source: Zapier Integration V7.pdf §Flow 15 Trigger A line 2023)


Trigger B — BPS Admin Override

Step B-1. Receive Webhook

  • Zapier catches webhook from Middleware POST /admin-pod-reassignment.
  • Required payload: user_id, new_pod_id (nullable — null = remove from pod without reassigning), admin_id, reason, transcript_url, request_id (UUID — required for idempotency).
  • Optional payload field: force_override (boolean, default false) — when true, bypasses the 30-day cooldown check.
  • If any required field missing → Middleware returns 400 Bad Request before webhook fires. Zapier never receives malformed payload.

Step B-1.5. Idempotency Check (Dedup Gate)

  • Middleware checks request_id against Redis Cache (key: pod-reassign:{request_id}, TTL: 24h).
  • First call (key absent): Store key in Redis → proceed to Step B-2.
  • Duplicate call (key exists — e.g. Zapier retry): Return cached 200 OK immediately. No DB writes, no Discord API calls, no email sends. Flow terminates here.
  • Rationale: 30-day cooldown guards against repeated admin intent across days/months; idempotency key guards against Zapier network-timeout retries within the same operation window.

(Source: Client supplement 2026-10-06 — Q20(a) Trigger B dedup mechanism)

Step B-2. Cooldown Check

  • Middleware queries pod_reassignment_date for user_id.
  • IF force_override = true → bypass cooldown; proceed. Middleware must log the override to BPS_Audit_Log and fire an automated Slack alert to the #ops-it Operations channel, including admin_id, reason, transcript_url, and override flag.
  • IF force_override = false (or absent) AND last transfer < 30 days ago → return 429 Too Many Requests (Cooldown Active). Flow terminates.
  • IF NULL or ≥ 30 days → proceed.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §Admin Pod Reassignment lines 2788–2800; Client confirmation 2026-09-20 — force_override break-glass)

Step B-3. Discord Sync

  • Call Discord Bot API:
    • Remove roles for old_pod_id.
    • Assign roles for new_pod_id (skip if new_pod_id is null).

Step B-4. Registry Update

  • Update pod_leader_id in Users table.
  • Set pod_reassignment_date = Today.
  • Update Current_Count for both old and new Pod Leaders in Pod_Leader_Registry to maintain accurate capacity tracking.

Step B-5. Notify

  • Send Pod_Reassigned_Notification email to trader.
  • Send Slack alert to old and new Pod Leaders.

(Source: Zapier Integration V7.pdf §Flow 15 Trigger B lines 2027–2034)


Trigger C — Leader Ineligibility

Step C-1. Receive Flag

  • BPS Admin calls POST /api/bps/mentor/revoke to mark the leader as permanently ineligible.
  • Middleware executes: UPDATE Pod_Leader_Registry SET Status = 'Permanently_Ineligible'.

Step C-2. Fire Offboarding Webhook

  • Middleware fires POD_LEADER_TERMINATED webhook event to Zapier.
  • This triggers the same Mentee Dispersal Cascade as Trigger A (Termination path).

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §BPS Endpoints — POST /api/bps/mentor/revoke)

Step C-3. Mentee Dispersal Cascade (inherits Flow 15A/15C behavior)

  • Query all active mentees where pod_leader_id = [Ineligible_Leader_ID].
  • Re-run Flow 10 Matching Engine for each mentee → assign to new active leader or FIFO Waitlist.
  • Discord offboarding (archive-first pattern):
    • Call POST /archive-pod-channel — channel locked and renamed to archived-pod-[leader_name].
    • Call POST /manage-discord-role with action: "REMOVE", role_name: "Pod Leader".
  • Carry balance: forfeit Pending_Carry_Balance = $0.00 to Stack General Account (same treatment as Termination).
  • Send Pod_Reassigned_Notification email to each affected mentee.

Step C-4. Permanent Future Exclusion

  • Flow 10 matching filters on Status = 'Active' AND Current_Count < Max_Capacity. Permanently_Ineligible record is excluded from all future match cycles automatically.

(Source: Zapier Integration V7.pdf §Flow 15 Trigger C lines 2035–2038 · RFQ_ Stack Trading Prop Tech V7.pdf §POST /api/bps/mentor/revoke)


6. Alternative Flows

Alt-1 — No available Pod Leader for re-matched mentee:

  • Flow 10 matching returns no result (all leaders at Max_Capacity = 7).
  • Mentee placed on FIFO Pod_Waitlist. Pod_Waitlist_Notification email sent.
  • Plan_Due SLA freeze: When a mentee is placed on Pod_Waitlist, their Plan_Due timestamp (72-hour trading plan submission deadline) is paused. The 72-hour clock resets and starts only after the system successfully matches and assigns the mentee to a new Pod Leader. A mentee cannot submit a trading plan without an assigned mentor.
  • Mentee re-enters matching queue when Current_Count decreases (Flow 11 trigger).

(Source: Client confirmation 2026-09-20 — "The 72-hour SLA deadline must be frozen")

Alt-2 — Pod Leader suspended (not terminated) — Pending_Carry_Balance handling:

  • Pending_Carry_Balance is frozen (on hold) — NOT forfeited. Balance remains intact in the database.
  • Vesting resumes when the leader's status returns to Active.
  • Forfeiture to Stack General Account applies only on permanent Termination (Step A-6).

(Source: Client confirmation 2026-09-20 — "the pending carry balance is temporarily frozen on hold until their return")


Alt-3 — Defense-triggered Suspension: re-activation after PIP:

  • After Flow 4B sets Pod_Leader_Registry.Status = 'Suspended', the trader enters a 60-day PIP period (stagnation_deadline = Today + 60 Days per CR-64).
  • During PIP: Pending_Carry_Balance is frozen (BR_8.2.9.3), trader ineligible for all pod activities (cannot opt-in or be matched as Pod Leader).
  • If trader passes PIP: re-activation follows Flow 15B (UC_8.2.10) — Pod Leader Opt-In & Provisioning. stagnation_deadline resets to Today + 90 Days on re-activation.
  • If trader fails PIP (terminated): Pending_Carry_Balance forfeited per BR_8.2.9.3.

7. Exceptional Flows

Exc-1 — discord_user_id is NULL when calling POST /manage-discord-role:

  • Middleware logs warning code DISCORD_USER_NOT_LINKED, bypasses the Discord API call, and returns 200 OK to Zapier.
  • Zapier automation does NOT crash. DB and registry updates proceed normally.
  • (Source: RFQ_ Stack Trading Prop Tech V7.pdf §Manage Discord Role lines 2335–2350)

Exc-2 — POST /archive-pod-channel fails:

  • Internal Retry: Middleware retries max 3× with Exponential Backoff on HTTP 429, HTTP 404, or Timeout.
  • After 3 failures:
    • Log entry written to bps_audit_logs with severity = WARN.
    • channel_url set to NULL in Pod_Leader_Registry — pod state cleared regardless of Discord outcome.
    • Slack alert to #dev_ops: "⚠️ WARNING: Failed to archive Discord channel for Pod Leader [Leader_ID]. Manual cleanup required."
    • Middleware returns HTTP 200 OK: { "status": "success", "channel_archived": false, "warning": "Discord API timeout, logged for manual cleanup" }.
  • Zapier behavior: Receives 200 OK → continues non-blocking to next step (mentee re-matching).

(Source: Client confirmation 2026-09-18)

Exc-3 — Trigger B payload missing required field:

  • Middleware validates before firing webhook. Returns 400 Bad Request.
  • Zapier flow never triggered. Audit log entry written by Middleware.

8. Discord Access & Role Management Specification

This section consolidates the full Discord integration specification for Flow 15A (re-assignment) and Flow 15C (offboarding). It is the authoritative reference for all Discord API calls triggered by Pod Leader status changes.

A. Offboarding Actions for Terminated / Suspended Leader

ActionSuspensionTermination (Flow 7 / Flow 15C)
POST /manage-discord-role — REMOVE "Pod Leader" role✅✅
POST /archive-pod-channel✅✅
POST /discord/revoke-all-roles (all Title + Pod + Special roles)❌ Skip✅ Required

Detailed steps:

  1. Revoke Leader Role: Call POST /manage-discord-role with action: "REMOVE", role_name: "Pod Leader".
  2. Archive Pod Channel: Call POST /archive-pod-channel:
    • Removes read/write permissions for all former pod members.
    • Renames channel from pod-[leader_name] to archived-pod-[leader_name].
    • Clears channel_url in Pod_Leader_Registry.
  3. Full Digital Eviction — Termination only: Call POST /discord/revoke-all-roles to strip all Title Roles (Associate / Trader / Senior), Pod Roles, and Special Roles. The user account remains on the server as a general/unverified member with restricted access. Manual kick/ban by Admin is required for misconduct cases — not automated.

B. Failsafe — Null discord_user_id

If discord_user_id IS NULL in the Users table when any Discord API call is attempted, Middleware MUST:

  • Log warning code DISCORD_USER_NOT_LINKED.
  • Bypass the API call entirely.
  • Return HTTP 200 OK to preserve workflow execution integrity.

The flow must not crash or halt due to a missing Discord link.

C. Re-Sync for Dispersed Mentees

Upon successful reassignment to a new Pod Leader (via Flow 10):

  • Revoke the Mentee's access to the old_pod_id Discord channel.
  • Grant access to the new_pod_id Discord channel.
  • Sync relevant Mentee roles for the new pod.

(Source: Client supplement 2026-10-05 — §3.8 Discord Access & Role Management Specification)


9. Business Rules

BR_8.2.9.1: Matching Waterfall — Asset Match is Strict

When re-assigning mentees via Flow 10 matching logic, Asset Class match (Futures vs. Forex) is a hard filter — not a preference. A Futures trader cannot be assigned to a Forex Pod Leader regardless of capacity.

(Source: Zapier Integration V7.pdf §Flow 10 Step 3 line 1824)

BR_8.2.9.2: Cooldown — 30-Day Transfer Limit per Trader (Trigger B) + Force Override Break-Glass

Admin-manual re-assignments via POST /admin-pod-reassignment are subject to a 30-day cooldown per user_id. If the last pod_reassignment_date is within 30 days, Middleware returns 429 Too Many Requests.

Break-glass override: Admin may pass force_override = true in the payload to bypass the 30-day cooldown. When this flag is set, Middleware must: (1) bypass the cooldown check; (2) write a mandatory BPS_Audit_Log entry flagging the override; (3) fire an automated Slack alert to the Operations channel with admin_id, reason, transcript_url, and override flag.

This cooldown does not apply to Trigger A (system-automated) or Trigger C (eligibility flag).

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §Admin Pod Reassignment lines 2795–2800; Client confirmation 2026-09-20)

BR_8.2.9.3: Carry Balance — Frozen on Suspension, Forfeited on Termination

  • Suspension: Pending_Carry_Balance is frozen (on hold) — NOT forfeited. Vesting resumes when Pod_Leader_Status returns to Active.
  • Termination: Pending_Carry_Balance is immediately liquidated to the Stack General Account and reset to $0.00. No grace period or partial vesting.

(Source: Zapier Integration V7.pdf §Flow 15 Trigger A line 2023; Client confirmation 2026-09-20)

BR_8.2.9.4: Permanently_Ineligible Exclusion from Matching

A Pod_Leader_Registry record with Status = 'Permanently_Ineligible' must be excluded from all Flow 10 matching queries. This is a permanent, non-reversible flag from the matching algorithm's perspective.

(Source: Zapier Integration V7.pdf §Flow 15 Trigger C lines 2036–2038)

BR_8.2.9.5: BPS Audit Log Mandatory for Admin Actions

All Trigger B actions must log admin_id, reason, and transcript_url to the BPS_Audit_Log table. Actions without a complete audit trail are not compliant.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §BPS Audit Log lines 2724–2761)

BR_8.2.9.6: Discord Resiliency — NULL user_id Must Not Crash Flow

POST /manage-discord-role must return 200 OK when discord_user_id IS NULL in the PostgreSQL database. The Node.js middleware drops the Discord action silently. This prevents Zapier automation from crashing when a trader has not yet linked their Discord account.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §Manage Discord Role lines 2345–2350)

BR_8.2.9.8: Full Digital Eviction — Termination Only

When a Pod Leader is permanently terminated (via Flow 7 / Flow 15C), Middleware MUST call POST /discord/revoke-all-roles to strip all Discord roles (Title Roles: Associate / Trader / Senior; Pod Roles; Special Roles) in addition to the standard POST /manage-discord-role REMOVE "Pod Leader" and POST /archive-pod-channel calls.

This triple-call sequence is exclusive to Termination. Suspension triggers only the first two calls (role removal + channel archive) — POST /discord/revoke-all-roles is skipped for suspended leaders.

The terminated user's Discord account is NOT automatically kicked or banned from the server. The user retains general/unverified member status. Kick or ban requires manual Admin action.

(Source: Client supplement 2026-10-05 — §3.8A Full Digital Eviction)

BR_8.2.9.9: Mentee Discord Re-Sync on Reassignment

When a Mentee is successfully reassigned to a new Pod Leader via Flow 10, the Discord sync MUST: (1) revoke the Mentee's access to the old pod's Discord channel (old_pod_id); (2) grant access to the new pod's Discord channel (new_pod_id); (3) sync relevant Mentee roles for the new pod. This re-sync is part of the Flow 15 → Flow 10 handoff sequence, not a separate manual step.

(Source: Client supplement 2026-10-05 — §3.8C Re-Sync for Dispersed Mentees)


BR_8.2.9.10: Defense-Triggered Pod Leader Suspension Path

When Flow 4B (Drawdown Defense Re-Activation) fires and Users.is_pod_leader == True, the following sequence is mandatory:

  1. Immediate 48h Defense Freeze: Account locked. No trading or pod management activity permitted.
  2. Suspended Status Written: After the 48h freeze, Middleware sets Pod_Leader_Registry.Status = 'Suspended'.
  3. PIP Timer: Users.stagnation_deadline = Today + 60 Days (unconditional — per CR-64). Trader is ineligible for pod activities for the full 60-day PIP period.
  4. Pod Dissolution: Flow 15A Trigger A cascade executes — pod dissolved, mentees re-assigned via Flow 10, Discord offboarded (archive-first pattern).
  5. Carry Balance: Pending_Carry_Balance frozen (NOT forfeited) per BR_8.2.9.3 — Suspension, not Termination.
  6. Re-activation: If trader passes PIP → Flow 15B (UC_8.2.10) re-provisions Pod Leader identity. If trader fails PIP (Terminated) → Pending_Carry_Balance forfeited.

(Source: CR-64; user spec 2026-10-09 §3 — Drawdown Defense ↔ Pod Mentorship Engine closed-loop spec)


BR_8.2.9.11: Phased Rollout — Trigger A in Phase 1; Triggers B & C in Phase 2 (Release 2)

  • Phase 1 (Go-Live): Only Trigger A is implemented — automated Pod dissolution, Flow 10 mentee re-matching, and Discord role/channel archiving.
  • Phase 2 (Release 2): Trigger B (manual mentee reassignment via BPS Admin) and Trigger C (manual Permanent Ineligibility toggle via BPS Admin) are deferred to Phase 2 alongside the BPS Admin Portal rollout. Trigger A source (1) "BPS Admin manual status change" also moves from backend script to the BPS Admin Portal UI in Phase 2. ACs for Trigger B/C (AC-8.2.9-04, -05, -06, -07, -09) are Phase 2 test scope.
  • Phase 1 manual overrides: Rare manual overrides are handled by backend scripts, not by a BPS Admin UI.
  • Carry guardrail on Trigger A: Pending_Carry_Balance is forfeited (set to $0.00) only when a Pod Leader is permanently Terminated (Flow 7 Termination / Flow 15C). When a Pod Leader is temporarily Suspended by Drawdown Defense (Flow 4B), the Pod is dissolved and mentees are reassigned, but Pending_Carry_Balance is frozen — held in the database until the leader passes PIP and returns to Active — not forfeited (BR_8.2.9.3).

(Source: Client confirmation 2026-10-30 — incl. Stage 6 Pod Leader sheet Row 10 carry guardrail)


When a mentee is placed on Pod_Waitlist (no available Pod Leader at re-assignment time), their Plan_Due timestamp (72-hour trading plan submission SLA) must be paused in the database. The 72-hour clock does not run while the mentee has no assigned mentor. The clock resets and resumes only after the system successfully matches and assigns the mentee to a new Pod Leader.

(Source: Client confirmation 2026-09-20 — "The 72-hour SLA deadline must be frozen. A mentee cannot submit a trading plan to a mentor they lack.")


10. Data Model

Pod_Leader_Registry (native PostgreSQL table) — relevant fields

FieldTypeDescription
Leader_IDUUIDPod Leader's user_id
Leader_NameSTRINGDisplay name
Trading_StyleENUMScalping, Day Trading, Swing Trading, Algorithmic Trading
Asset_ClassENUMFutures, Forex
Max_CapacityINTMaximum mentees per leader — sourced from Table C Pod_Max_Capacity = 7
Current_CountINTCurrent active mentee count
StatusENUMActive, Suspended, Terminated, Permanently_Ineligible
Pending_Carry_BalanceDECIMALAccumulated unpaid carry earnings
Pod_Leader_StatusENUMActive, Acting_Cover, Reassigned

(Source: Zapier Integration V7.pdf §Table E lines 777–790 — naming reference only; Pod_Leader_Registry is native PostgreSQL, see Document References note)

State Machine — Pod Leader Status Through Defense Cycle

FieldActive LeaderDefense Hit (48h freeze)60-day PIPPass PIP + Re-Opt-In
Users.stagnation_deadlineToday + 90d48h lock (account frozen)Today + 60d (CR-64)Today + 90d
Pod_Leader_Registry.StatusActive→ Suspended (after 48h)SuspendedActive
Pod_Leader_Registry.Current_Count1–70 (pod dissolved)00 (new queue starts)
Pod_Leader_Registry.Pending_Carry_BalanceAccruingFrozen — balance retained (not forfeited)Frozen — balance retainedReleased — vesting resumes on return to Active
Discord Channelpod-[leader_name]archived-pod-[leader_name]archived-pod-[leader_name]pod-[leader_name] (new)
Discord RolePod LeaderRemoved (archive-first)RemovedPod Leader (re-assigned via Flow 15B)

(Source: user spec 2026-10-09 §5 — Defense ↔ Pod state machine)

Users Table (relevant fields)

FieldTypeDescription
pod_leader_idUUID (nullable)Current assigned Pod Leader
pod_reassignment_dateTIMESTAMP (nullable)Date of last admin-triggered re-assignment — used for cooldown check
discord_user_idSTRING (nullable)Discord account ID — used by POST /manage-discord-role

11. API Reference

EndpointMethodInputOutputDescription
POST /admin-pod-reassignmentPOSTuser_id, new_pod_id (nullable), admin_id, reason, transcript_url, request_id (UUID, required), force_override (boolean, optional)200 OK / 400 / 429BPS admin manual re-assignment. Idempotency gate on request_id (Redis, TTL 24h) prevents Zapier retry double-execution. 30-day cooldown enforced unless force_override = true. Override logged + Slack alert fired. Audit log written.
POST /api/bps/mentor/revokePOSTuser_id200 OKBPS Trigger C — marks leader Permanently_Ineligible, fires POD_LEADER_TERMINATED webhook to trigger Mentee Dispersal Cascade (Flow 15A).
POST /manage-discord-rolePOSTuser_id, add_role (optional), remove_role (optional)200 OKInstructs Discord Bot to add/remove roles. Returns 200 OK if discord_user_id is NULL (no-op).
POST /archive-pod-channelPOSTpod_leader_id200 OKRevokes all channel permissions, renames to archived-pod-[leader_name], clears channel_url in registry.
POST /discord/revoke-all-rolesPOSTuser_id200 OKStrips all Title Roles (Associate / Trader / Senior), Pod Roles, and Special Roles from the user. Called on Termination only — not on Suspension.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §BPS Endpoints; §Manage Discord Role; §Archive Pod Channel; §POST /api/bps/mentor/revoke)


12. Email Templates

Template KeyTriggerRecipient
Pod_Reassigned_NotificationTrigger A: leader suspended/terminated · Trigger B: admin overrideMentee (re-assigned or removed)

13. Acceptance Criteria

AC_IDFlowGivenThenType
AC-8.2.9-01Trigger APod Leader Pod_Status set to Terminated; leader has 3 active menteesAll 3 mentees re-matched via Flow 10 waterfall; Pod_Reassigned_Notification sent; Pending_Carry_Balance liquidated to Stack General AccountIntegration
AC-8.2.9-02Trigger APod Leader Pod_Status set to SuspendedMentees re-matched; Pending_Carry_Balance NOT forfeited; Pod_Leader_Status = 'Acting_Cover'Integration
AC-8.2.9-03Trigger A — no available leaderAll Pod Leaders at Current_Count = Max_Capacity when re-matchingMentees placed on Pod_Waitlist; Pod_Waitlist_Notification sentIntegration
AC-8.2.9-04Trigger B (Phase 2)Valid POST /admin-pod-reassignment payload; pod_reassignment_date is NULLpod_leader_id updated; pod_reassignment_date = Today; Discord roles synced; Pod_Reassigned_Notification + Slack alert sent; audit log writtenIntegration
AC-8.2.9-05Trigger B — cooldown (Phase 2)pod_reassignment_date within last 30 daysMiddleware returns 429 Too Many Requests; no DB update; no Discord syncIntegration
AC-8.2.9-06Trigger B — missing field (Phase 2)POST /admin-pod-reassignment called without reasonMiddleware returns 400 Bad Request; Zapier webhook not firedIntegration
AC-8.2.9-07Trigger C (Phase 2)Ops sets Status = 'Permanently_Ineligible'Record excluded from all subsequent Flow 10 matching queriesIntegration
AC-8.2.9-08Discord NULLdiscord_user_id IS NULL; POST /manage-discord-role calledMiddleware returns 200 OK; no crash; DB updates complete normallyIntegration
AC-8.2.9-09force_override (Phase 2)POST /admin-pod-reassignment with force_override = true; last transfer was 10 days agoCooldown bypassed; reassignment executes; BPS_Audit_Log entry written with override flag; Slack alert fired to #ops-itIntegration
AC-8.2.9-10Plan_Due freezeMentee placed on Pod_Waitlist during re-assignment cascadePlan_Due timestamp paused in DB; 72-hour clock does not decrement while mentee is on waitlistIntegration
AC-8.2.9-11Carry freeze — suspensionTrigger A fires due to Suspension (not Termination)Pending_Carry_Balance unchanged in DB (not zeroed, not forfeited)Integration
AC-8.2.9-12Full Digital EvictionTrigger A fires due to Termination (via Flow 7 or Flow 15C)POST /manage-discord-role REMOVE "Pod Leader" + POST /archive-pod-channel + POST /discord/revoke-all-roles all called; all Title / Pod / Special roles stripped; user remains on server (not kicked)Integration
AC-8.2.9-13No eviction on suspensionTrigger A fires due to SuspensionPOST /discord/revoke-all-roles NOT called; only role removal + channel archive executeIntegration
AC-8.2.9-14Mentee Discord re-syncFlow 10 successfully reassigns a Mentee to a new Pod LeaderMentee's access to old_pod_id channel revoked; access to new_pod_id channel granted; Mentee roles synced for new podIntegration
AC-8.2.9-15Trigger A — Flow 4B Defense pathFlow 4B fires; Users.is_pod_leader == True; leader has 2 active menteesAfter 48h freeze: Pod_Leader_Registry.Status = 'Suspended'; stagnation_deadline = Today + 60d; pod dissolved; 2 mentees re-matched via Flow 10; Pending_Carry_Balance frozen (not forfeited); Discord archive-first sequence executedIntegration
AC-8.2.9-16PIP activity banPod_Leader_Registry.Status = 'Suspended' via Defense path; within 60-day PIP windowTrader excluded from all pod opt-in flows; excluded from all Flow 10 Pod Leader matching queriesIntegration
AC-8.2.9-17Re-activation after Pass PIPTrader passes PIP after Defense suspension; opts in via Flow 15BPod_Leader_Registry.Status = 'Active'; new pod-[leader_name] Discord channel provisioned; stagnation_deadline = Today + 90dIntegration

14. Changelog

DateVersionChangePreviousAfterSource
2026-09-18— → v1.0Initial document—Flow 15 Trigger A/B/C; all BRs; ACsZapier Integration V7.pdf §Flow 15; RFQ_ Stack Trading Prop Tech V7.pdf §BPS Endpoints
2026-09-18v1.0 → v1.1Update Exc-2: confirmed POST /archive-pod-channel failure specBA assumption3× retry Exp. Backoff; channel_url = NULL; bps_audit_logs WARN; Slack #dev_ops; 200 OK non-blockingClient confirmation 2026-09-18
2026-09-20v1.1 → v1.2force_override on Trigger B; Plan_Due SLA freeze on waitlist; carry balance frozen on suspension (not forfeited)B-2: no override mechanism. Alt-1: no SLA freeze spec. BR_8.2.9.3: suspension behavior ambiguous.force_override boolean param added to /admin-pod-reassignment; override logs to BPS_Audit_Log + Slack. Plan_Due paused when mentee on Pod_Waitlist; resumes on re-match. Suspension freezes balance; termination forfeits. Added BR_8.2.9.7, AC-8.2.9-09/10/11.Client confirmation 2026-09-20
2026-10-05v1.2 → v1.3Discord Access & Role Management Specification (§8); Full Digital Eviction for Terminated leaders; Mentee re-sync on reassignment; DISCORD_USER_NOT_LINKED log codeStep A-4: Discord sync described at high level, no Termination vs Suspension distinction. Exc-1: no log code. No POST /discord/revoke-all-roles.§8 added: full offboarding matrix (Suspend vs Terminate), failsafe spec with log code, mentee re-sync. Step A-4 expanded. Exc-1 updated with DISCORD_USER_NOT_LINKED. POST /discord/revoke-all-roles added to API table. BR_8.2.9.8 (full eviction) + BR_8.2.9.9 (mentee re-sync) added. AC-8.2.9-12/13/14 added. Section numbers shifted: old §9 Data Model → §10; subsequent sections incremented.Client supplement 2026-10-05 — §3.8 Discord Access & Role Management Specification
2026-10-09v1.3 → v1.4Flow 4B Defense path as explicit Trigger A source; BR_8.2.9.10 (Defense suspension sequence); State Machine table; Alt-3 re-activation; AC-8.2.9-15/16/17Trigger A listed only BPS Admin + Flow 7. No Defense path. No state machine. No PIP re-activation.Trigger A §2/§3/§5 updated with Flow 4B as third source. BR_8.2.9.10 added. State machine table added §10. Alt-3 added §6. AC-8.2.9-15/16/17 added.CR-64; user spec 2026-10-09 — Drawdown Defense ↔ Pod Mentorship Engine closed-loop spec
2026-10-17v1.4 → v1.5All "Table E" references renamed to Pod_Leader_Registry (native PostgreSQL table) — Document References, header Zapier Table row, §8 Discord sync steps, §10 Data Model headingPod_Leader_Registry was referred to throughout as "Table E" / "Zapier Table E", implying it is sourced from a live Zapier TableAdded PostgreSQL-native naming note in Document References: Pod_Leader_Registry is built natively in PostgreSQL as the single source of truth, not a live Zapier Table — "Table E" retained only as a naming/cross-reference convention to the original RFQ sectionClient confirmation 2026-10-17 — PostgreSQL-only build instruction for Pod_Leader_Registry, restating POD-JOIN-02
2026-10-30v1.5 → v1.6§2 Release scope block; BR_8.2.9.11 (new); AC-8.2.9-04/05/06/07/09 tagged Phase 2; §10 State Machine Pending_Carry_Balance row correctedAll triggers in one scope, no phasing. State Machine showed $0.00 (frozen) during Defense/PIP and $0.00 (fresh start) after Pass PIPPhase 1 = Trigger A only; Triggers B & C → Phase 2 (Release 2, BPS Admin Portal); backend scripts for Phase 1 overrides. Trigger A source (1) manual status change: backend script in Phase 1, BPS Admin Portal UI in Phase 2. Carry frozen = balance retained during Suspension/PIP, released when leader returns to Active; forfeited only on TerminationClient confirmation 2026-10-30

On this page