Skip to content

CI: fail fast on unresolved merge markers in uv.lock#254

Closed
Copilot wants to merge 2 commits into
nanobeamfrom
copilot/fix-219549370-961571754-bcbf79ee-3be9-42dc-95c5-c70ac29679e2
Closed

CI: fail fast on unresolved merge markers in uv.lock#254
Copilot wants to merge 2 commits into
nanobeamfrom
copilot/fix-219549370-961571754-bcbf79ee-3be9-42dc-95c5-c70ac29679e2

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown

What problem this PR addreseses

The ubuntu-latest / python 3.12 Actions job fails at dependency install because uv sync --locked cannot parse uv.lock when conflict markers are present. This PR adds an explicit preflight check so the workflow fails immediately with a clear diagnostic.

  • Change
    • Lockfile guardrail: added a Validate uv.lock step in .github/workflows/uv-pytests.yml before install.
    • Failure mode clarity: workflow now reports unresolved merge markers directly instead of surfacing a downstream TOML parser failure.
- name: Validate uv.lock
  run: |
    if grep -nE '^(<<<<<<<|=======|>>>>>>>)' uv.lock; then
      echo "Unresolved merge markers found in uv.lock"
      exit 1
    fi

What should the reviewer(s) do

Review the new pre-install validation step in the pytest workflow and confirm the fail-fast behavior/error message is appropriate for lockfile integrity checks.

  • This PR introduces a public-facing change (e.g., figures, CLI input/output, API).
    • For functional and algorithmic changes, tests are written or updated.
    • Documentation (e.g., tutorials, examples, README) has been updated.
    • A tracking issue or plan to update documentation exists.
  • This PR affects internal functionality only (no user-facing change).

Copilot AI changed the title [WIP] Copilot Request CI: fail fast on unresolved merge markers in uv.lock Jun 24, 2026
Copilot AI requested a review from henrygbell June 24, 2026 21:45
@bobleesj

Copy link
Copy Markdown
Collaborator

pretty cool that copilot can use PR template

@cophus

cophus commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@copilot who made this PR?

@henrygbell

Copy link
Copy Markdown
Collaborator

@cophus I think I accidentally prompted this. I clicked "ask copilot to fix this" for an error. I am not sure we want this change.

@gvarnavi

Copy link
Copy Markdown
Collaborator

What was the error? We definitely don't want a situation where uv.lock has merge conflicts, but presumably the weekly cron job updating uv.lock should prevent devs from having to think much about the lock file.

@henrygbell

Copy link
Copy Markdown
Collaborator

The error I get is in this PR: #204 in the python 3.12 project installation:

Run uv sync --locked --group test
Using CPython 3.12.3 interpreter at: /usr/bin/python3.12
Creating virtual environment at: .venv
error: Failed to parse `uv.lock`
  Caused by: TOML parse error at line 20, column 9
   |
20 | <<<<<<< HEAD
   |         ^
key with no value, expected `=`
Error: Process completed with exit code 2.

More details here:
https://github.com/electronmicroscopy/quantem/actions/runs/26850270732/job/79180346028?pr=204

@henrygbell

Copy link
Copy Markdown
Collaborator

PR closed, I did not mean to create it. Problem with uv.lock has been solved

@henrygbell henrygbell closed this Jun 26, 2026
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.

5 participants