{"record":{"id":"e20717b119c5c0c8","repo":"windmill-labs/windmill","slug":"this-workspace-has-folder-default-permissioned-as","errorCode":null,"errorMessage":"This workspace has folder default_permissioned_as rules that affect ${folderDefaultAnnotations.size} item(s) being pushed, but syncBehavior is not set in wmill.yaml. Add 'syncBehavior: v1' to enable ownership preservation on update and on_behalf_of stripping on pull.","messagePattern":"This workspace has folder default_permissioned_as rules that affect (.+?) item\\(s\\) being pushed, but syncBehavior is not set in wmill\\.yaml\\. Add 'syncBehavior: v1' to enable ownership preservation on update and on_behalf_of stripping on pull\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/sync/sync.ts","lineNumber":5572,"sourceCode":"      );\n      permissionedAsContext = {\n        userCache: new Map(),\n        userIsAdminOrDeployer,\n        userEmail: user.email,\n      };\n\n      // ws_specific_flag changes have no content payload, so they don't\n      // affect permissioned_as resolution — filter them out before the\n      // pre-check (which expects only added/edited/deleted).\n      await preCheckPermissionedAs(\n        changes.filter((c) => c.name !== \"ws_specific_flag\"),\n        user.email,\n        userIsAdminOrDeployer,\n        opts.acceptOverridingPermissionedAsWithSelf ?? false,\n        !!process.stdin.isTTY,\n      );\n    } else if (folderDefaultAnnotations && folderDefaultAnnotations.size > 0) {\n      log.warn(\n        colors.yellow(\n          `This workspace has folder default_permissioned_as rules that affect ${folderDefaultAnnotations.size} item(s) being pushed, ` +\n            `but syncBehavior is not set in wmill.yaml. Add 'syncBehavior: v1' to enable ownership preservation on update and on_behalf_of stripping on pull.`,\n        ),\n      );\n    }\n\n    // Reject malformed datatable migrations (duplicate timestamps, orphan downs)\n    // before touching the remote, scanning only the data tables in this push.\n    const migrationDatatables = new Set(\n      changes\n        .map((c) => parseDatatableMigrationPath(c.path)?.datatable)\n        .filter((d): d is string => !!d),\n    );\n    if (migrationDatatables.size > 0) {\n      const migrationErrors = validateLocalMigrations(migrationDatatables);\n      if (migrationErrors.length > 0) {\n        log.error(","sourceCodeStart":5554,"sourceCodeEnd":5590,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/sync/sync.ts#L5554-L5590","documentation":"When pushing, if the workspace has folder-level default_permissioned_as rules that apply to items being pushed but the wmill.yaml does not declare `syncBehavior: v1`, the CLI warns that ownership preservation (on update) and on_behalf_of stripping (on pull) are disabled. Without syncBehavior, pushed items may get their ownership/permissioned_as overwritten by folder defaults unexpectedly.","triggerScenarios":"`wmill sync push` against a workspace where folder default_permissioned_as annotations exist for ≥1 pushed item, while `syncBehavior` is absent from wmill.yaml.","commonSituations":"Workspaces using folder-level permissioned_as defaults (enterprise feature) synced with configs created before syncBehavior was introduced; teams upgrading CLI and inheriting old wmill.yaml files.","solutions":["Add `syncBehavior: v1` to the top level of wmill.yaml.","Re-run the push and confirm the warning disappears.","Review pushed items' ownership after push if you choose not to enable syncBehavior, since folder defaults may reassign permissioned_as."],"exampleFix":"// before (wmill.yaml)\ninclude:\n  - u/**\n// after\nsyncBehavior: v1\ninclude:\n  - u/**","handlingStrategy":"validation","validationCode":"// Before push, ensure wmill.yaml declares syncBehavior when folder defaults exist:\nconst conf = yaml.parse(fs.readFileSync('wmill.yaml', 'utf8'));\nif (!conf.syncBehavior && hasFolderPermissionedAsDefaults()) {\n  console.warn('Add syncBehavior: v1 to wmill.yaml to preserve ownership');\n}","typeGuard":"function hasSyncBehaviorV1(conf: unknown): conf is { syncBehavior: 'v1' } {\n  return typeof conf === 'object' && conf !== null &&\n    (conf as any).syncBehavior === 'v1';\n}","tryCatchPattern":null,"preventionTips":["Add syncBehavior: v1 to wmill.yaml once your CLI/server support it","Keep wmill.yaml templates updated when adopting folder permissioned_as defaults","Review folder default rules after workspace admin changes","Check this warning in CI logs and fail builds on it if ownership matters"],"tags":["cli","sync","permissions","syncbehavior","folder-defaults"],"backgroundTag":"missing-syncbehavior-config","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}