Skip to content

fix(ci): check every service lock and build core-worker's image (M-01) - #1983

Merged
eldad-caura-ai merged 1 commit into
mainfrom
check-locks-and-build-worker-image
Oct 7, 2026
Merged

eldad-caura-ai merged 1 commit into
mainfrom
check-locks-and-build-worker-image

Conversation

@eldad-caura-ai

@eldad-caura-ai eldad-caura-ai commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Fixes part 1 of M-01 from the 2026-10-01 OSS audit.

Every service lock is checked

Each service image installs its own uv.lock as it stands (uv export --frozen), while CI tests the pyproject ranges, resolved afresh, and nothing checked that a lock still matched its pyproject. A pyproject edit made without a re-lock passed CI and was missing from the image.

  • The check: the CI job now runs uv lock --check --directory <service> for all four services, before it installs anything, and names every stale lock in one error. uv lock --check fails when re-locking would change the lock; it exists since uv 0.5.8, and CI runs 0.9.26.
  • Main passes it today, as far as reading the files can tell: in all four locks, the requirements, extras, dependency groups, Python range and version they recorded match their pyprojects, before and after release chore: release main #1980.
  • Bots keep the locks in step: release-please bumps each service's version in its uv.lock with its pyproject.toml (fix(release): keep the core-operations version in sync #1717 does the same for core-operations), Dependabot's uv updates re-lock, and its pip updates touch only the root requirements.txt.

core-worker's image is built

No workflow built core-worker's image, the write path in deferred mode. The image job ("core-api image bakes a real version") now builds it and runs python -c "import uvicorn, core_worker.app" inside it: the app its CMD serves, from what the image installed. In CI's shared venv another service's dependency can stand in for one core-worker never declared; in the image it cannot.

The import needs no environment: every setting has a default, ddtrace is imported under try/except ImportError, and the event bus and storage client start only in the app's lifespan. Every other third-party module the app loads at import is a declared core-worker dependency.

Tests

tests/test_m01_every_lock_is_checked_and_every_image_built.py fails when a service's uv.lock is not named in a ci.yml step that runs uv lock --check, or a service's Dockerfile is not built by a ci.yml docker build. A guard checks that the scans find all four services, and the core-api image build.

Push Run Result
Tests alone (46383fe) 37622734288 Failed exactly the 2 new cases: no ci.yml step checked any of the four locks, and no docker build built core-worker's Dockerfile. The guard and 9,654 other tests passed. The first push (46383fe) had stopped at the root-tests ruff check (SIM300) before the tests ran; the amend flipped two comparisons.
Fix added (1e9036f) 37624349643 This PR's checks

Not in this PR

  • Part 2 of M-01, CI installing from the service locks, waits on aligning SQLAlchemy: core-api's lock pins 2.0.50 and core-storage-api's 2.1.0.
  • L-01, making the image job a required check, is a branch-protection setting.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Claude Code Review — skipped: draft PR

@eldad-caura-ai
eldad-caura-ai force-pushed the check-locks-and-build-worker-image branch 2 times, most recently from 7ed1bb0 to 1e9036f Compare October 7, 2026 12:53
@eldad-caura-ai
eldad-caura-ai marked this pull request as ready for review October 7, 2026 12:54
@eldad-caura-ai
eldad-caura-ai requested a review from a team as a code owner October 7, 2026 12:54
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Claude Code Review — skipped: no source files to review (only tests/docs/config)

Each service image installs its own uv.lock as it stands (uv export
--frozen), while CI tests the pyproject ranges, resolved afresh, and
nothing checked that a lock still matched its pyproject. A pyproject
edit made without a re-lock passed CI and was missing from the image.
The CI job now runs uv lock --check for every service before it
installs anything, and names each stale lock.

No workflow built core-worker's image, the write path in deferred
mode. The image job now builds it and imports the app its CMD serves
from what the image installed. A dependency core-worker never declared
fails that import, while in CI's shared venv another service's copy
stands in for it.

Tests fail when CI does not check a service's uv.lock or build a
service's Dockerfile.

Signed-off-by: eldad-caura <eldad@caura.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eldad-caura-ai
eldad-caura-ai force-pushed the check-locks-and-build-worker-image branch from 1e9036f to 94264bb Compare October 7, 2026 12:59
@eldad-caura-ai

Copy link
Copy Markdown
Member Author

@claude

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Review by Claude Code

Claude Code Review ✅ No issues found.


Reviewed by claude-sonnet-5-5 · cost $0.16321575000000002

@eldad-caura-ai

Copy link
Copy Markdown
Member Author

@erni-a plasr arprpvoe

@eldad-caura-ai
eldad-caura-ai merged commit 54040d8 into main Oct 7, 2026
16 checks passed
@eldad-caura-ai
eldad-caura-ai deleted the check-locks-and-build-worker-image branch October 7, 2026 13:10
@caura-deploy-bot caura-deploy-bot Bot mentioned this pull request Oct 7, 2026
eldad-caura-ai pushed a commit that referenced this pull request Oct 7, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>backend: 3.27.0</summary>

##
[3.27.0](backend-v3.26.4...backend-v3.27.0)
(2026-10-07)


### Features

* **memories:** hold the broker's gate-refused writes for review (g2.5)
([#1985](#1985))
([2892bc9](2892bc9))


### Bug Fixes

* **ci:** check every service lock and build core-worker's image (M-01)
([#1983](#1983))
([54040d8](54040d8))
* **memories:** decide a write again when the hold changed after it was
decided ([#1984](#1984))
([7ce0212](7ce0212))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
Co-authored-by: caura-deploy-bot[bot] <265395343+caura-deploy-bot[bot]@users.noreply.github.com>
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