Skip to content

chore: release workflow, CI hardening, dependency refresh, small fixes - #108

Open
HarryMWinters wants to merge 1 commit into
feat/switch-to-pyjwtfrom
chore/repo-upgrades
Open

chore: release workflow, CI hardening, dependency refresh, small fixes#108
HarryMWinters wants to merge 1 commit into
feat/switch-to-pyjwtfrom
chore/repo-upgrades

Conversation

@HarryMWinters

Copy link
Copy Markdown
Owner

Stacked on #107 (base branch is feat/switch-to-pyjwt; GitHub retargets to master once that merges).

Release process

  • New Release workflow: builds with Poetry and publishes to PyPI via Trusted Publishing when a GitHub release is published. No token stored anywhere. Refuses to publish if the release tag doesn't match pyproject.toml.
  • Needs one-time setup before first use: add a GitHub publisher on PyPI (owner HarryMWinters, repo fastapi-oidc, workflow release.yaml, environment pypi) and create the pypi environment in this repo's settings. Steps are in CONTRIBUTING.md.
  • task publish now takes a PYPI_TOKEN (PyPI no longer accepts username/password). .env is untracked; .env.example added.

CI

  • Test workflow: permissions: contents: read, concurrency to cancel superseded runs, and repo-token passed to arduino/setup-task (the anonymous rate limit is what failed the mypy Dependabot PR's 3.13 job).
  • Dependabot: minor/patch pip bumps grouped into one weekly PR; all actions bumps grouped.

Dependencies

  • pre-commit autoupdate: black 26.5.1, isort 9.0.1, mypy v2.3.1, flake8 7.3.0, bandit 1.9.4, pre-commit-hooks v6, poetry 2.4.1. Hook versions now match the Poetry-managed ones, so local formatting agrees with CI. poetry-lock --checkpoetry-check --lock (Poetry 2 syntax).
  • Widened dev constraints (pre-commit/pylint allow 4.x, uvicorn >=0.49, types-cachetools <8) and refreshed the lock. Notable: cryptography 46.0.7 → 50.0.1 (clears the four remaining cryptography advisories), fastapi 0.141.1, starlette 1.6.0, pydantic 2.13.5, requests 2.34.2, cachetools 7.1.8.
  • httpx2 replaces httpx as the TestClient backend; the Starlette deprecation warning is gone.

Fixes

  • discovery.py: JWKS fetch now calls raise_for_status(). Previously a 4xx/5xx body would be .json()-parsed and cached as a key set for the TTL.
  • types.py: OIDCConfig.signature_cache_ttl was typed str; it is an int.
  • Tests for both (coverage 93% → 96.5%).

Housekeeping

  • .serena/ ignored, .agents version/dev-deps text no longer hardcodes stale values.

Deliberately not done

  • Dropping Python 3.10 (EOL October 2026). It's a breaking change for downstream users, so it should be its own decision and release.
  • Sphinx 9 needs Python ≥ 3.12, so it stays on 8.x while 3.10/3.11 are supported.

38 tests pass, all pre-commit hooks pass on the new pins.

🤖 Generated with Claude Code

…ixes

- Add Release workflow publishing to PyPI via Trusted Publishing on a
  GitHub release; tag must match pyproject version. Document in CONTRIBUTING.
- Test workflow: read-only permissions, cancel superseded runs, pass a
  token to setup-task to avoid anonymous API rate-limit failures.
- Dependabot: group minor/patch pip updates and all actions updates.
- pre-commit autoupdate (black 26.5, isort 9, mypy 2.3, flake8 7.3,
  bandit 1.9, poetry 2.4); poetry-lock --check -> poetry-check --lock.
- Widen dev constraints (pre-commit/pylint 4.x, uvicorn, types-cachetools)
  and refresh the lock: cryptography 46 -> 50.0.1, fastapi 0.141,
  starlette 1.6, pydantic 2.13.5, requests 2.34. httpx2 replaces httpx
  for TestClient, silencing Starlette's deprecation warning.
- discovery.py: raise_for_status on the JWKS fetch so an error body is not
  parsed and cached as a key set; tests added (coverage 93% -> 96%).
- types.py: OIDCConfig.signature_cache_ttl is int, not str.
- Taskfile publish uses a PYPI_TOKEN; stop tracking .env, add .env.example.
- Ignore .serena/; freshen .agents.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 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-09-07T17:38:03.396471Z 0d348a6 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d348a6cf7

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

on:
release:
types: [published]
workflow_dispatch:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent manual dispatch from bypassing release validation

When this workflow is started through workflow_dispatch, the build job skips the version/tag guard because that step only runs for release events, but the publish job still uploads to PyPI unconditionally. A maintainer can therefore select any branch or ref and create an irreversible PyPI release without a corresponding validated tag; remove the manual trigger or require and validate a release tag before allowing the publish job to run.

Useful? React with 👍 / 👎.

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