windmill-labs/windmill · error

${change.path} changed, but ${outOfScope} of the script(s) s

Error message

${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.

What it means

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.

Source

Thrown at cli/src/commands/sync/sync.ts:4951

        // on an advisory, so an unreadable directory costs the advisory, not
        // the push.
        log.debug(`Could not scan for shared-lock readers: ${e}`);
        treeReaders = { byRef: new Map(), unreadable: [] };
      }
    }
    const outOfScope =
      (treeReaders?.byRef.get(change.path.replaceAll(SEP, "/"))?.length ?? 0) -
      referrers.length;
    // Out of `changes` either way: a shared lockfile has no object on the
    // remote, so the apply loop skips it. Left in, the preview and the "N
    // changes" count would report something no push ever applies as such.
    changes.splice(i, 1);
    // A scoped push deploys what it was scoped to, so the readers the filter
    // excluded keep the previous lock on the remote. Silence there is the
    // trap: the changed file has no object of its own, so nothing else in the
    // output would account for it.
    if (outOfScope > 0) {
      log.warn(
        colors.yellow(
          `${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.`,
        ),
      );
    }
    if (referrers.length === 0) continue;
    log.info(
      colors.gray(
        `${change.path} changed: re-pushing the ${referrers.length} script(s) sharing it`,
      ),
    );
    for (const metaPath of referrers) {
      if (changedPaths.has(metaPath)) continue;
      changes.push({
        name: "edited",
        path: metaPath,
        before: localMap[metaPath],
        after: localMap[metaPath],

View on GitHub (pinned to e474e8803c)

Solutions

  1. Widen --includes/--excludes so every script sharing the changed lockfile is in this push
  2. Or accept that out-of-scope scripts keep the previous lock until they are pushed themselves
  3. Run 'wmill generate-metadata' then push with full scope to converge all locks
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at cli/src/commands/sync/sync.ts:4951 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/c44a8c7e9b64abdf. Report an issue: GitHub.