Skip to content

fix: rename the upstream lock so it does not collide with upstream/ - #1

Open
lidge-jun wants to merge 1 commit into
foxytanuki:mainfrom
lidge-jun:fix/upstream-lock-case
Open

lidge-jun wants to merge 1 commit into
foxytanuki:mainfrom
lidge-jun:fix/upstream-lock-case

Conversation

@lidge-jun

Copy link
Copy Markdown

On a case-insensitive filesystem (the default on macOS and Windows) a fresh clone cannot hold both the lock file UPSTREAM and the vendored directory upstream/. On macOS, right after git clone:

$ git status --short
 D UPSTREAM
$ python3 tools/pstack_opencodex.py build
IsADirectoryError: [Errno 21] Is a directory: '.../UPSTREAM'

This renames the lock to UPSTREAM.lock (content unchanged) and updates its readers: LOCK_FILE, the module docstring, the README layout table and CONTRIBUTING. upstream/ is untouched.

To keep it from coming back:

  • tests/test_repository.py fails when two tracked paths, counting directory prefixes, differ only by case. On the current main it reports [['UPSTREAM', 'upstream']]; after the rename it passes.
  • CI gets a macos-15 job (Python 3.13) that runs the same steps and first checks that the checkout is complete.

Running the suite on macOS also showed one existing failure on main: test_explicit_catalog_override_wins_over_config compares the unresolved temp path with the CLI's resolved one (/var is a symlink to /private/var). The fixture now resolves its temp root; no assertion changed.

Verified on a fresh macOS clone of the branch: python3 -m unittest discover -s tests -v (25 OK), python3 tools/pstack_opencodex.py build (46 skills), both license cmp checks, git diff --check, and git diff --exit-code 2dd2800 -- upstream/. No live delegation is involved.

The name UPSTREAM.lock is only a suggestion; any name that is not a case variant of upstream works, and I can change it.

UPSTREAM and the upstream/ directory differ only by case, so a fresh clone on
a case-insensitive filesystem (default macOS and Windows) cannot hold both:
git reports UPSTREAM as deleted and build fails with IsADirectoryError.

Rename the lock to UPSTREAM.lock (content unchanged) and update its readers.
Add a test that fails when two tracked paths, including directory prefixes,
differ only by case, and a macOS CI job that checks the checkout is complete.
The macOS job also surfaced a temp-path comparison in test_runtime.py that
failed on macOS before this change (/var is a symlink to /private/var); the
test now resolves its temp root.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T06:21:45.532432Z 1ee7f61 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant