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.upload.pay_frequencies.config

String

""

Comma-separated list of pay frequencies whose users are sent to Pave. Read by the feeder and replay feeder to gate uploads, deletions, and the pave_label write, and by the API to decide whether an employment edit should trigger a Pave re-mine. Compared case-insensitively against the user’s pay_frequency in Postgres. An empty value — the default — means no user is eligible and acts as the kill switch for the whole Pave integration.

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.pave.pay_frequency_gate.rollout

Boolean (per-user)

false

Rollout control for the pay-frequency gate. When true for a user, the feeder and replay feeder only upload them to Pave if their pay frequency is in insight.pave.upload.pay_frequencies.config, the payday endpoint skips the Pave income call for them when it is not, and employment edits that move them into an eligible frequency trigger a Pave re-mine. When false, none of that applies and Pave is used for them exactly as it was before the gate existed. Evaluated per user so the gate can be ramped gradually; GrowthBook buckets consistently on the user ID, so a user is on the same side of the gate in every Lambda. The miner does not consult it — it no longer stores Pave data for anyone.


Flag Evaluation Patterns

Global (non-user-scoped) flags

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

insight.pave.upload.pay_frequencies.config is also global, but holds a string rather than a boolean: it is read with GetFeatureStringWithDefault(ctx, key, "") and its value is matched against each user’s pay frequency.

Per-user flags

Flags like insight.pave.pay_frequency_gate.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.pay_frequency_gate.rollout = false for a user

Pave is used for them regardless of pay frequency, and no Postgres lookup is made to decide. The payday chain is still Pave → FM V2 → FM Legacy.

insight.pave.pay_frequency_gate.rollout = true + pay frequency not in the allow list

No Pave upload, no Pave income call. The payday chain becomes FM V2 → FM Legacy for that user.

insight.pave.upload.pay_frequencies.config = "" (empty)

Kill switch for everyone the gate is on for; users the gate is off for are unaffected.

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 — Pay-frequency gate on Pave uploads

  • Infrastructure — GrowthBook secret and Lambda environment configuration