OUT-3617-new: AB feature-testing gate for the bank deposit flow - #278
Merged
Conversation
Parse AB_FEATURE_TESTING_PORTALS into an allowlist (empty/unset = all portals) and expose isPortalInBankDepositABTest for the rollout gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Freeze gate in readBankDepositFeeFlag (non-allowlisted portals freeze non-batched) and a reconcile gate covering both the payout webhook and resync cron. The settings write path strips the flag + bank account for non-AB portals, and GET returns bankDepositEnabled for the UI. The reconcile short-circuit is logged so a rare mid-flight exclusion is visible rather than silent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Read bankDepositEnabled from the settings GET, thread it through the accordion into InvoiceDetail to hide the checkbox + bank-account dropdown, and skip the bank-account fetch entirely for gated-off portals. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Unit tests for the gate util, the freeze and reconcile gates, and the settings write path + bankDepositEnabled signal. Integration test drives the real webhook -> invoice.service -> DB path to confirm an excluded portal freezes non-batched. The gate is env-parsed at config load, so the integration harness mocks it via a globalThis-pinned allowlist (default = all portals) driven per-test by test/helpers/abTestGate.ts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryAdds an environment-driven portal allowlist for incrementally rolling out the bank-deposit flow, with an empty allowlist retaining full availability.
Confidence Score: 5/5The PR appears safe to merge under the documented fixed-before-rollout allowlist operation. No blocking failure remains; the previously reported mid-flight exclusion scenario was explicitly identified as outside the supported rollout model because individual portals will not be removed after enablement. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Portal request or sync event] --> B{Allowlist empty?}
B -->|Yes| C[Bank deposit feature enabled]
B -->|No| D{Portal ID allowlisted?}
D -->|Yes| C
D -->|No| E[Bank deposit feature disabled]
C --> F[Allow settings and freeze batched intent]
C --> G[Reconcile payout into deposit]
E --> H[Hide and strip bank-deposit settings]
E --> I[Freeze invoices as non-batched]
E --> J[Skip payout reconciliation]
Reviews (2): Last reviewed commit: "test(OUT-3617): cover the bank-deposit A..." | Re-trigger Greptile |
Collaborator
Author
|
@greptileai review the PR again |
priosshrsth
requested changes
Aug 3, 2026
SandipBajracharya
merged commit Aug 3, 2026
e3c4e4f
into
feature/payout-reconciliation
6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The bank-deposit flow is going out to a limited set of portals (Permit Pushers) first, not all at once.
Shipped
An env-driven allowlist gate.
AB_FEATURE_TESTING_PORTALS(comma-separated portalIds) controls availability; empty/unset = available to all portals (full-rollout default). Backed byisPortalInBankDepositABTest(portalId).Gated at exactly the points that decide behavior:
InvoiceService.readBankDepositFeeFlag(): excluded portals freeze invoices non-batched regardless of the stored flag.PayoutService.reconcile(): excluded portals short-circuit to{ depositId: null }, covering both the payout webhook and the resync cron. Logged (not silent) so a rare mid-flight exclusion is visible.bankDepositEnabled.No schema changes, no migrations.
Code sites
src/config/index.ts,src/utils/abTesting.tssrc/app/api/quickbooks/invoice/invoice.service.ts,payout/payout.service.ts,setting/setting.controller.tssrc/hook/useSettings.ts,components/dashboard/settings/SettingAccordion.tsx,.../invoice/InvoiceDetail.tsxTests
Unit: gate util, freeze gate, reconcile gate, settings write path +
bankDepositEnabled. Integration: real webhook → invoice.service → DB proves an excluded portal freezes non-batched. Full suite green (282 unit / 117 integration), tsc + lint + prettier clean.Rollout
Set
AB_FEATURE_TESTING_PORTALSin Vercel (all environments) as part of enabling the feature.🤖 Generated with Claude Code