{"record":{"id":"c44a8c7e9b64abdf","repo":"windmill-labs/windmill","slug":"change-path-changed-but-outofscope-of-the-s","errorCode":null,"errorMessage":"${change.path} changed, but ${outOfScope} of the script(s) sharing it are outside this push's scope and keep the previous lock on the remote. Widen --includes/--excludes to deploy the new lock to all of them.","messagePattern":"(.+?) changed, but (.+?) of the script\\(s\\) sharing it are outside this push's scope and keep the previous lock on the remote\\. Widen --includes/--excludes to deploy the new lock to all of them\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/sync/sync.ts","lineNumber":4951,"sourceCode":"        // on an advisory, so an unreadable directory costs the advisory, not\n        // the push.\n        log.debug(`Could not scan for shared-lock readers: ${e}`);\n        treeReaders = { byRef: new Map(), unreadable: [] };\n      }\n    }\n    const outOfScope =\n      (treeReaders?.byRef.get(change.path.replaceAll(SEP, \"/\"))?.length ?? 0) -\n      referrers.length;\n    // Out of `changes` either way: a shared lockfile has no object on the\n    // remote, so the apply loop skips it. Left in, the preview and the \"N\n    // changes\" count would report something no push ever applies as such.\n    changes.splice(i, 1);\n    // A scoped push deploys what it was scoped to, so the readers the filter\n    // excluded keep the previous lock on the remote. Silence there is the\n    // trap: the changed file has no object of its own, so nothing else in the\n    // output would account for it.\n    if (outOfScope > 0) {\n      log.warn(\n        colors.yellow(\n          `${change.path} changed, but ${outOfScope} of the script(s) sharing it are outside this push's scope and keep the previous lock on the remote. Widen --includes/--excludes to deploy the new lock to all of them.`,\n        ),\n      );\n    }\n    if (referrers.length === 0) continue;\n    log.info(\n      colors.gray(\n        `${change.path} changed: re-pushing the ${referrers.length} script(s) sharing it`,\n      ),\n    );\n    for (const metaPath of referrers) {\n      if (changedPaths.has(metaPath)) continue;\n      changes.push({\n        name: \"edited\",\n        path: metaPath,\n        before: localMap[metaPath],\n        after: localMap[metaPath],","sourceCodeStart":4933,"sourceCodeEnd":4969,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/sync/sync.ts#L4933-L4969","documentation":"Error \"${change.path} changed, but ${outOfScope} of the script(s) sharing it are outside this push's scope and keep the previous lock on the remote. Widen --includes/--excludes to deploy the new lock to all of them.\" thrown in windmill-labs/windmill.","triggerScenarios":"Thrown at cli/src/commands/sync/sync.ts:4951 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Widen --includes/--excludes so every script sharing the changed lockfile is in this push","Or accept that out-of-scope scripts keep the previous lock until they are pushed themselves","Run 'wmill generate-metadata' then push with full scope to converge all locks"],"exampleFix":null,"handlingStrategy":"fallback","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"}