Skip to content

Queue PR previews and streamline development tooling - #489

Open
lelia wants to merge 4 commits into
mainfrom
fix/code-scanning-alerts
Open

lelia wants to merge 4 commits into
mainfrom
fix/code-scanning-alerts

Conversation

@lelia

@lelia lelia commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Preview publishing

  • Queue preview runs by pull request number so the TestPyPI and Docker labels can both publish while another preview is in progress.
  • Keep manual dispatch available for publishing both artifacts together and for building Docker previews with an exact TestPyPI SDK version.

Development setup and FOSSA output

  • Remove Hatch and pre-commit from the project environment and lockfile. Use uv build for local packaging and install or migrate the version-sync hook with an isolated uv tool.
  • Refactor the FOSSA CVSS metric mapping and verify all eight metrics, omission of empty or missing values, and precedence of a supplied metrics list.
  • Set the package version to 2.16.1.

Verification

  • Check that the preview workflow allows multiple pending runs.
  • Verify the lockfile, run Ruff and zizmor, and build and validate the wheel and source distribution with Twine.

@lelia
lelia requested a review from a team as a code owner December 5, 2026 02:22
@cursor

cursor Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Mostly CI/docs and a small FOSSA refactor with added tests; preview queueing changes timing but not security-sensitive logic.

Overview
PR preview workflow now uses queue: max on the concurrency group (keyed by PR number, including manual dispatch) so separate label-triggered runs wait instead of overlapping, and adds a unit test that keeps queue: max in the workflow. Manual dispatch validates an optional TestPyPI socketdev version in the context job and passes it to the Docker build via job outputs (replacing a direct inputs reference).

Contributor tooling drops hatch and pre-commit from project dev dependencies and the lockfile; docs steer local builds to uv build and installing the version-sync hook with uv tool install pre-commit so uv sync does not break the hook.

FOSSA compat extracts CVSS field names into _CVSS_METRIC_FIELDS and adds tests for all eight metrics, skipping empty/missing values, and honoring a pre-supplied metrics list.

Bumps package version to 2.16.1.

Reviewed by Cursor Bugbot for commit bb19074. Configure here.

@lelia
lelia temporarily deployed to socket-firewall December 5, 2026 02:23 — with GitHub Actions Inactive

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread CHANGELOG.md Resolved
@lelia
lelia force-pushed the fix/code-scanning-alerts branch from 0d0e97f to 0b7555c Compare December 5, 2026 04:18
@lelia lelia changed the title Resolve open code scanning alerts Tidy the PR preview workflow and FOSSA CVSS metrics Dec 5, 2026
@lelia
lelia temporarily deployed to socket-firewall December 5, 2026 04:18 — with GitHub Actions Inactive
@lelia

lelia commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.

@lelia
lelia force-pushed the fix/code-scanning-alerts branch from 0b7555c to e7ea402 Compare December 5, 2026 04:23
@lelia
lelia temporarily deployed to socket-firewall December 5, 2026 04:23 — with GitHub Actions Inactive
@lelia lelia changed the title Tidy the PR preview workflow and FOSSA CVSS metrics Tidy the PR preview workflow, FOSSA CVSS metrics, and dev dependencies Dec 5, 2026
@lelia lelia changed the title Tidy the PR preview workflow, FOSSA CVSS metrics, and dev dependencies PR workflow hygiene, FOSSA CVSS metrics, dev dependencies Dec 5, 2026
lelia added 2 commits December 5, 2026 01:29
Remove the manual dispatch trigger and its inputs from the PR preview
workflow. Previews are published from the publish-preview and
publish-docker-preview labels.

Read the FOSSA CVSS base metric prop keys from a table instead of
repeating an inline lookup per metric. The emitted metrics are unchanged.

Bump the version to 2.16.1.
Both depend on virtualenv, which brings filelock into uv.lock, so every
filelock advisory lands on this lockfile even though the CLI never
imports it. Neither needs to live in the project environment: CI
installs its own hatch through the setup-hatch action, `uv build` calls
the hatchling backend from build-system directly, and pre-commit builds
a separate environment for each hook.

Remove hatch and pre-commit from the dev extra, along with the
dependency group that held a second pre-commit requirement. The
contributor docs use `uv build` and install pre-commit as a uv tool.
@lelia
lelia force-pushed the fix/code-scanning-alerts branch from 9fb30b6 to 282b7bd Compare December 5, 2026 06:31
@lelia

lelia commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@lelia
lelia deployed to socket-firewall December 5, 2026 06:31 — with GitHub Actions Active
@socket-security

socket-security Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​hatchling@​1.28.0 ⏵ 1.33.096100100100100

View full report

@socket-security-staging

socket-security-staging Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​hatchling@​1.28.0 ⏵ 1.33.096100100100100

View full report

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Keep manual publishing and exact SDK previews available. Serialize
preview requests for each pull request and allow multiple queued runs.

Document how to reinstall the version hook from the isolated uv tool,
and verify preview queue configuration and FOSSA CVSS output.
@lelia lelia changed the title PR workflow hygiene, FOSSA CVSS metrics, dev dependencies Queue PR previews and streamline development tooling Dec 5, 2026
@lelia
lelia deployed to socket-firewall December 5, 2026 07:18 — with GitHub Actions Active
@lelia

lelia commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread .github/workflows/pr-preview.yml Resolved
@lelia

lelia commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@lelia
lelia deployed to socket-firewall December 5, 2026 08:11 — with GitHub Actions Active

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit bb19074. Configure here.

This branch was successfully deployed

1 active deployment
socket-firewall — bb190745 Deployed Dec 5, 2026 by lelia via python-sfw-smoke-enterprise #765
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