GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pyproject autodiscovery: uv.lock path is doubled for projects in subdirectories, target fails with "Missing files" · Issue #9265 · updatecli/updatecli

pyproject autodiscovery: uv.lock path is doubled for projects in subdirectories, target fails with "Missing files" #9265

New issue
Copy link
New issue
Copy link
Closed
#9266
Closed
pyproject autodiscovery: uv.lock path is doubled for projects in subdirectories, target fails with "Missing files"#9265
#9266
Copy link

Description

@nguyeda
nguyeda
opened on Jun 25, 2026
Issue body actions

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When the pyproject autodiscovery crawler (autodiscovery.crawlers.pyproject, or the policy ghcr.io/updatecli/policies/autodiscovery/pyproject) discovers a pyproject.toml in a subdirectory (e.g. backend/), the generated shell target fails even though the underlying uv lock command succeeds.

The generated target sets:

  • workdir: backend — the uv command runs here and succeeds, and
  • a changedif (file/checksum) tracking backend/uv.lock.

But the shell resource resolves the tracked file relative to workdir, producing backend/backend/uv.lock. That doubled path does not exist, so the post-command file check reports Missing files and the target is marked failed.

When the project is at the scan root, workdir is . and the tracked path is uv.lock, so nothing doubles and the target passes — which is why this is only seen for projects in subfolders.

--debug output for one target (Faker):

target: Faker
DEBUG: open backend/backend/uv.lock: no such file or directory
DEBUG:     command: /bin/sh /tmp/updatecli/bin/<hash>.sh
The shell 🐚 command "/bin/sh /tmp/updatecli/bin/<hash>.sh" ran successfully with the following output:
DEBUG: command stderr output was:
Using CPython 3.13.13 interpreter at: /.../python3.13
Resolved 174 packages in 788ms          <-- uv succeeded
DEBUG: open backend/backend/uv.lock: no such file or directory
DEBUG: no checksum for file "backend/uv.lock" before running shell command
DEBUG: no checksum for file "backend/uv.lock" after running shell command
DEBUG: Missing files "backend/uv.lock"
    Shell command exited on error.

Note the contradiction: the command ran successfully (uv resolved 174 packages), yet the target fails on the missing backend/backend/uv.lock.

This looks like a core-crawler bug, not a policy bug: it reproduces identically with a hand-written manifest and with the published policy.

Expected Behavior

The generated shell target should track the lockfile at a path relative to its own workdir, so that for a project at backend/ running with workdir: backend the changedif file is simply uv.lock (resolving to backend/uv.lock), and the target succeeds when uv lock updates it.

Steps To Reproduce

  1. Create a repo with a Python project in a subdirectory, e.g. backend/pyproject.toml plus a generated backend/uv.lock.

  2. Run pyproject autodiscovery against the repo root, either via a hand-written manifest:

    autodiscovery:
      crawlers:
        pyproject: {}

    or via the policy ghcr.io/updatecli/policies/autodiscovery/pyproject:0.1.0.

  3. Run updatecli diff --config <manifest> --debug (or apply).

  4. Observe the Faker/any target fail with DEBUG: Missing files "backend/backend/uv.lock" despite the uv lock command reporting success.

Environment

- OS: Ubuntu 24.04 arm64 (GitHub-hosted runner); also reproduced on Linux x86_64
- updatecli: v0.118.0 (also reproduced on v0.117.0)
- uv: 0.11.21 (also 0.11.9)
- Source: autodiscovery.crawlers.pyproject, and policy
  ghcr.io/updatecli/policies/autodiscovery/pyproject:0.1.0
  (@sha256:115651e7596b3ad3c00d30163ff3475380a15070c2899c7591185a8ea2ed6e2b)

Anything else?

The root cause appears to be in the generated manifest: the workdir is applied twice to the lockfile path. The crawler computes the tracked lockfile as filepath.Join(workdir, "uv.lock") and emits the same workdir into the target, but the shell resource already resolves changedif files relative to workdir.

Relevant code:

  • pkg/plugins/autodiscovery/pyproject/dependencies.go:201 — relLockFile := filepath.Join(workdir, "uv.lock")
  • pkg/plugins/autodiscovery/pyproject/manifestTemplate.go:40,43 — emits both the changedif files: entry ({{ .LockFile }}) and workdir: '{{ .Workdir }}'.

A likely fix is to track the lockfile as uv.lock (relative to the target's own workdir) rather than joining workdir in. The existing tests (pkg/plugins/autodiscovery/pyproject/main_test.go) only exercise the scan-root case (workdir: '.', files: ["uv.lock"]), so a subdirectory test case would catch this regression. Happy to open a PR if useful.

Activity

  1. olblak
    added this to updateclion Jun 25, 2026
  2. github-project-automation
    moved this to Todo in updateclion Jun 25, 2026
  3. olblak
    added a commit that references this issue on Jun 26, 2026

    fix(pyproject): track uv.lock relative to target workdir (#9266)

    This issue will close once commit e487e58 is merged into the 'main' branch.
    e487e58
  4. olblak
    closed this as completedin #9266on Jun 26, 2026
  5. github-project-automation
    moved this from Todo to Done in updateclion Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • updatecli
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.