{"record":{"id":"db3f019badd8b40a","repo":"windmill-labs/windmill","slug":"invalid-settings-format-expected-include-path-arr-db3f01","errorCode":null,"errorMessage":"Invalid settings format. Expected include_path array","messagePattern":"Invalid settings format\\. Expected include_path array","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/gitsync-settings/push.ts","lineNumber":75,"sourceCode":"      );\n      process.exit(1);\n    }\n\n    // Read local configuration\n    const localConfig = await readConfigFile();\n\n    // Parse and validate --with-backend-settings if provided, otherwise fetch from backend\n    let settings: any;\n    if (opts.withBackendSettings) {\n      try {\n        const parsedSettings = JSON.parse(opts.withBackendSettings);\n\n        // Validate the structure matches expected test format (raw settings object)\n        if (\n          !parsedSettings.include_path ||\n          !Array.isArray(parsedSettings.include_path)\n        ) {\n          throw new Error(\n            \"Invalid settings format. Expected include_path array\",\n          );\n        }\n        if (\n          !parsedSettings.include_type ||\n          !Array.isArray(parsedSettings.include_type)\n        ) {\n          throw new Error(\n            \"Invalid settings format. Expected include_type array\",\n          );\n        }\n\n        // Create mock backend response with single repository using provided settings\n        const mockRepositoryPath = opts.repository || \"u/mock/repo\";\n        settings = {\n          git_sync: {\n            repositories: [{\n              git_repo_resource_path: mockRepositoryPath,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/gitsync-settings/push.ts#L57-L93","documentation":"Schema validation of --with-backend-settings in the git-sync settings push command: the flag's JSON parsed but include_path is missing or not an array. The push path expects the same raw backend settings object shape as pull; the input at fault is the hand-supplied JSON string whose include_path is absent or not an array.","triggerScenarios":"Thrown at cli/src/commands/gitsync-settings/push.ts:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the JSON so include_path is an array of path patterns","Reuse an object previously fetched from the backend's git-sync settings endpoint","Omit the flag and let push read the local config / backend settings instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}