removing split test and enforcing WF account creation as winning variant (#26920)

GitOrigin-RevId: 49d801004a6fced936214e5c08b82284ab771e72
This commit is contained in:
Jimmy Domagala-Tang
2025-08-05 12:08:13 -04:00
committed by Copybot
parent 1547cf6379
commit d7b282c176
2 changed files with 9 additions and 51 deletions

View File

@@ -673,36 +673,13 @@ const _ProjectController = {
!userIsMemberOfGroupSubscription &&
!inEnterpriseCommons
) {
const { variant } = await SplitTestHandler.promises.getAssignment(
req,
res,
'writefull-auto-account-creation'
)
if (variant === 'enabled') {
await UserUpdater.promises.updateUser(userId, {
$set: {
writefull: { enabled: true, autoCreatedAccount: true },
},
})
user.writefull.enabled = true
user.writefull.autoCreatedAccount = true
} else {
const { variant } = await SplitTestHandler.promises.getAssignment(
req,
res,
'writefull-auto-load'
)
if (variant === 'enabled') {
await UserUpdater.promises.updateUser(userId, {
$set: {
writefull: { enabled: true },
},
})
user.writefull.enabled = true
user.writefull.firstAutoLoad = true
}
}
await UserUpdater.promises.updateUser(userId, {
$set: {
writefull: { enabled: true, autoCreatedAccount: true },
},
})
user.writefull.enabled = true
user.writefull.autoCreatedAccount = true
}
const template =

View File

@@ -37,6 +37,8 @@ async function createUser(email) {
// Override features.
features,
featuresOverrides: [{ features }],
// disable Writefull
'writefull.enabled': false,
},
}
)
@@ -105,23 +107,6 @@ async function purgeNewUsers() {
)
}
const SPLIT_TEST_OVERRIDES = [
// disable writefull, oauth registration does not work in dev-env and their banners hide our buttons.
{
name: 'writefull-auto-account-creation',
versions: [
{
versionNumber: 1,
phase: 'release',
active: true,
analyticsEnabled: false,
variants: [{ name: 'enabled', rolloutPercent: 0, rolloutStripes: [] }],
createdAt: new Date(),
},
],
},
]
async function provisionSplitTests() {
const backup = Path.join(
MONOREPO,
@@ -147,10 +132,6 @@ async function provisionSplitTests() {
)
console.log(`> Importing ${SPLIT_TESTS.length} split-tests from production.`)
await SplitTestManager.replaceSplitTests(SPLIT_TESTS)
console.log(
`> Importing ${SPLIT_TEST_OVERRIDES.length} split-tests for test compatibility.`
)
await SplitTestManager.mergeSplitTests(SPLIT_TEST_OVERRIDES, true)
}
async function main() {