Skip to content

Python CI helpers install from verified dependency locks - #852

Open
zlareb1 wants to merge 3 commits into
mainfrom
fix/security-dependency-pins
Open

zlareb1 wants to merge 3 commits into
mainfrom
fix/security-dependency-pins

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #1076

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Why

Version constraints alone do not verify downloaded helper packages. CI, release preparation and the course setup install Python tooling from complete hash-checked requirement locks. The SDK packaging matrix uses the existing commit-pinned installer action and shared tool version. The document-parsing benchmark base uses a multi-platform image digest.

Scope and risk

Replicated-erasure lease provisioning and its unit regression controls are on main. This branch preserves them unchanged. It also scopes person-query observations to the authorization decision, retaining unbounded-read negative controls. No production authorization, lease or erasure rule changes.

This changes helper installation commands and their requirement inputs and generated locks. Runtime server and SDK dependency declarations are unchanged. Dify testing and the course setup retain their declared dependency ranges as inputs, while their installation locks fix every resolved dependency and artifact hash. Hash checking and binary-only installation fail if a compatible verified wheel is unavailable. The benchmark image digest is the registry's multi-platform index, including amd64 and arm64. Sandbox requirement changes trigger the existing image checks.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none for server deployments. Recompile a helper lock after changing its input requirements; use uv pip compile <input> --generate-hashes --universal --python-version <version> --no-header --no-annotate --output-file <lock> with Python 3.12 for Dify and 3.11 for the other locks.
  • Rollback: reverting restores the helper install commands. No stored data or migration changes.

Tests

This head matches the exact three-way composition of the preceding qualified source and current main. The erasure fixture and its canonical unit regression module are inherited from main. On this composed head, all three erasure unit cases, scoped Ruff, Python formatting, committed-range whitespace and public-body prose checks pass. Workflow parsing, hash-pin and shell checks pass. The workflow retains the hash-locked dependencies and setup action pins alongside the upstream credential-persistence restriction. Full required hosted CI and a fresh independent whole review remain required for this exact head.

env LOOM_ENV_FILE= .venv/bin/python -m pytest tests/unit/test_erasure_replicated_fixture.py -q

Earlier feature qualification

The following feature-specific results were recorded before this composition. They are prior-source receipts, not new tests of this composed head.

  • Helper and installer source is composed with current main and the reviewed fixture prerequisites. Earlier hosted SQL-cost failure remains recorded; no parser, workload or timing threshold changes. Full CI must pass on this head.
  • Earlier checks of these identical five lock blobs passed pip download --require-hashes --only-binary=:all: on a clean private Python 3.12 environment, checking dependency closure and downloaded wheel hashes. No fresh download is claimed for this composition.
  • Both existing SDK tag-normalization regression cases pass with a fake pip entry point that also handles python -m pip. The test keeps its PEP 440 assertions and checks the hash-required install arguments. The preceding CI run exposed that its original fake handled only the bare pip command.
  • Prettier checks the changed workflows. The course setup passes sh -n; Ruff, the prose checker and git diff --check pass.
  • The benchmark base digest was resolved through the registry's manifest API and retains both supported server architectures. No local image build, benchmark, service or broad test suite ran. Full validation runs in CI.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex changed helper installation commands, generated requirement locks and verified the hashes and workflow syntax.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full formatting, lint, type and test checks pass in CI.
  • Requirement locks are generated from their inputs; no generated API or schema files change.
  • No wire, migration, plugin behavior or frontend changes.
  • Repository text follows the public-copy rules.
  • Commits are signed off.

@zlareb1
zlareb1 force-pushed the fix/security-dependency-pins branch from 94b4ca9 to a0b478a Compare November 20, 2026 20:08
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 21, 2026 12:10am UTC

Request Review

@zlareb1
zlareb1 force-pushed the fix/security-dependency-pins branch 2 times, most recently from d0dd728 to 2723496 Compare November 20, 2026 23:01
Lock complete helper dependency sets and require verified wheels for workflow and course installs. Use the shared pinned uv action for SDK package builds and a multi-platform digest for the document benchmark base.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Route the workflow module invocation through the existing fake installer and assert that helper installs require hashes. Preserve SDK prerelease and final PEP 440 checks.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Shared client schema reads run with an independent context. Record only decision-tagged statements while retaining unbounded decision reads as failures.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit 57327d5)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the fix/security-dependency-pins branch from 2723496 to be0ec73 Compare November 21, 2026 00:08

This branch has not been deployed

No deployments
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