Skip to content

Fail fast on Poetry lock drift and invalidate stale CI venv caches - #107

Merged
gavinying merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-job-tox-3-12
Aug 19, 2026
Merged

Fail fast on Poetry lock drift and invalidate stale CI venv caches#107
gavinying merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-job-tox-3-12

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The failing tox (3.12) job was not a Python 3.12 runtime issue; CI was failing earlier in the shared Poetry setup step because pyproject.toml and poetry.lock had drifted. This change makes that failure explicit and ensures dependency caches refresh when project metadata changes.

  • Poetry setup hardening

    • Add an explicit lock validation step in the shared .github/actions/setup-poetry action:
      • poetry check --lock
    • This surfaces lock drift immediately instead of failing later during poetry install --no-root.
  • Cache invalidation correctness

    • Update the cached .venv key to include both pyproject.toml and poetry.lock.
    • This prevents reuse of environments built against outdated dependency metadata.
  • Effect on the failing workflow

    • tox (3.12) now gets a deterministic setup path:
      • valid lockfile → reuse/install dependencies normally
      • invalid lockfile → fail early with a clear cause
- name: Validate lock file
  run: poetry check --lock
  shell: bash

with:
  path: .venv
  key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}

Co-authored-by: gavinying <10823762+gavinying@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job tox (3.12) Fail fast on Poetry lock drift and invalidate stale CI venv caches Aug 19, 2026
Copilot AI requested a review from gavinying August 19, 2026 01:32
Co-authored-by: gavinying <10823762+gavinying@users.noreply.github.com>
@gavinying
gavinying marked this pull request as ready for review August 19, 2026 02:48
@gavinying
gavinying merged commit e274c4a into main Aug 19, 2026
6 checks passed
@gavinying
gavinying deleted the copilot/fix-failing-github-actions-job-tox-3-12 branch August 19, 2026 02:48
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.

2 participants