Skip to content

fix(#5): drop build.sh's uv dev-environment refresh - #12

Merged
robfrank merged 1 commit into
mainfrom
fix/5-uv-refresh-guard-physical-paths
Oct 23, 2026
Merged

robfrank merged 1 commit into
mainfrom
fix/5-uv-refresh-guard-physical-paths

Conversation

@robfrank

Copy link
Copy Markdown
Contributor

Closes #5

After a local build, scripts/build.sh refreshed "the repo-root uv dev environment" by running uv lock and uv sync at git rev-parse --show-toplevel. Its guard skipped this when the repo root was the package itself, but it compared a physical path (from git) with a logical one (from cd && pwd) as strings. So in a checkout reached through a symlink, the block ran and uv lock failed the build, because this repo's pyproject.toml has [tool.uv] managed = false.

The first version of this fix compared the directories with -ef. The adversarial pass then pointed out that, since the move, --show-toplevel always returns the package directory, so a correct guard means the block never runs here. The block only made sense in the monorepo, where a separate uv project wrapped the package, so this PR deletes it instead. The wording that still describes that layout (README, pyproject.toml comment, the next steps build.sh prints) is fixed in the PR for #6.

Test plan

  • tests/test_build_no_uv_refresh.py::test_build_scripts_do_not_lock_or_sync_a_uv_project scans scripts/build*.sh for uv lock/uv sync commands, ignoring comments. RED: on main it finds both lines of the old block. GREEN: it passes with this change.
  • test_the_scan_sees_the_old_refresh pins the scan on the old block's text, including a commented-out uv lock that must not count.
  • Full suite on darwin/arm64: 1061 passed.
  • bash -n scripts/build.sh and pre-commit pass.

Coverage

Invariant: a local build never runs uv lock or uv sync against a uv project.

git grep -nE "uv (lock|sync)|REPO_ROOT" -- scripts .github:

  • Before this PR: only build.sh's refresh block (gone now), plus a comment in test-python-bindings.yml:49.
  • After it: only that comment.
Entry point Fixed Tested
build.sh local build, any checkout (plain, worktree, symlinked) yes, block removed scan test
build-native.sh never had it scan test covers build*.sh
CI (CI set) the block already skipped there n/a

Known gaps: None.

Adversarial pass

  1. With the fix, the refresh block never runs in this repo. Real. Fixed here by deleting the block, as described above.
  2. The README, the pyproject.toml comment and the build.sh next steps describe a repo-root uv project that doesn't exist. Real, and the same scope as Stale pom.xml / repo-root pyproject wording after the move #6: fixed in that PR.
  3. The new tests fail on a machine without the wheel installed, because conftest.py imports arcadedb_embedded in pytest_unconfigure. This was already true of every test in the suite, which runs against the installed wheel. Not changed here.
  4. The bash/symlink tests were excluded on Windows. No longer applies: those tests are gone, and the scan runs on every platform.

Review cycles

This repository has no Claude review workflow, so no bot review was waited for. Final state: no-reviewer.

🤖 Generated with Claude Code

The refresh ran uv lock/uv sync in a separate uv project wrapping the
package, a monorepo layout. Here the repository root is the package
(managed = false, uv lock refuses it). The guard compared a physical
and a logical path as strings, so a symlinked checkout ran the block and
failed the build; compared correctly, it never runs. Removed, with a
test that the build scripts call neither uv lock nor uv sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robfrank
robfrank merged commit 17045e7 into main Oct 23, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build.sh: uv-refresh guard compares logical vs physical paths (symlinked checkout)

1 participant