Feature Flags

The Insight Service uses GrowthBook for feature flags. Flags are fetched from the GrowthBook SDK at Lambda startup using credentials from {environment}/growthbook in Secrets Manager. Per-user flags are evaluated with the user’s FloatMe user ID as the context attribute.


Flag Reference

Flag Key Type Default Description

insight.pave.decom.enabled

Boolean

false

Disables the Pave data path for the GET /{user_id}/forecasts endpoint. When true, the FloatMe-generated recurring detection algorithm always runs and its result is returned to the caller, bypassing the Pave-cached DynamoDB entities.

insight.pave.decom.feeder.enabled

Boolean

false

Disables feeder-initiated Pave mining. When true, the feeder Lambda skips writing pave_label entities and does not enqueue users for Pave mining, even when processing new Plaid transaction events.

insights.fm_forcasts.api.send_fm_generated

Boolean (per-user)

false

Enables the FloatMe-generated forecasts path for a specific user alongside the Pave path. When true for a user, both paths run, results are logged for comparison, and the FM-generated result is returned to the caller instead of the Pave-cached result.

insight.income_detection.ml.enabled

Boolean

false

Enables the SageMaker ML model as the primary income detection method. When false, the rule-based methods (A, B, C, D) run without the ML endpoint.

insight.income_detection.ml.percent

Number

0

Percentage of income detection requests to route through the ML model (0–100). Used for gradual ML rollout. A value of 100 routes all requests through the ML method. Only effective when insight.income_detection.ml.enabled is true.

insight.payday_prediction.v2.enabled

Boolean (per-user)

false

Enables the V2 transaction-history-based payday prediction algorithm for a specific user. When true, the V2 algorithm runs alongside Pave and FM Legacy during float creation (requires a non-empty loan_id). V2 does not run for direct GET /insights/employment/payday calls.

insight.payday_prediction.v2.rollout

Boolean (per-user)

false

Controls whether the V2 prediction result is returned to the caller. When true and V2 produced a valid result, the V2 prediction is selected over Pave and FM Legacy. Requires insight.payday_prediction.v2.enabled to also be true for the user.


Flag Evaluation Patterns

Global (non-user-scoped) flags

Flags like insight.pave.decom.enabled, insight.pave.decom.feeder.enabled, and insight.income_detection.ml.enabled apply globally — they are evaluated with GetFeatureEnabledWithDefault(ctx, key, default) and affect all users.

Per-user flags

Flags like insights.fm_forcasts.api.send_fm_generated, insight.payday_prediction.v2.enabled, and insight.payday_prediction.v2.rollout are evaluated with the FloatMe user ID: GetFeatureEnabledForUser(ctx, key, userID, default). This allows staged rollouts targeting specific user cohorts.

Percentage rollout

insight.income_detection.ml.percent is a numeric flag read via GetFeatureNumberWithDefault(ctx, key, 0). The calling code uses this percentage to decide whether to invoke the SageMaker endpoint for a given request.


Flag Interactions

Scenario Result

insight.pave.decom.enabled = true

Forecasts endpoint always returns FloatMe-generated results; Pave DynamoDB entities are not read. insights.fm_forcasts.api.send_fm_generated has no additional effect.

insight.payday_prediction.v2.enabled = true + loan_id empty

V2 algorithm does not run (V2 only runs during float creation).

insight.payday_prediction.v2.enabled = true + insight.payday_prediction.v2.rollout = false

V2 runs and results are logged for comparison, but the Pave or FM Legacy result is returned to the caller.

insight.income_detection.ml.enabled = true + insight.income_detection.ml.percent = 0

ML endpoint is never invoked (0% of requests routed through ML).


  • Forecasts & Payday — GrowthBook flags controlling forecast and payday algorithm selection

  • Income Detection — ML flag usage in the 5-method income detection pipeline

  • Pave Mining — Feeder decom flag gating Pave mining

  • Infrastructure — GrowthBook secret and Lambda environment configuration