UN-3447 [MISC] Expand workers coverage and isort scope to all 11 packages#1940
Conversation
Coverage configuration in workers/pyproject.toml previously measured only 5 of 11 worker packages (shared, api_deployment, general, file_processing, callback). This left ~2,843 statements unmeasured, including the executor worker (labs E1 C-prep) and the pluggable_worker slot — both central to the upcoming PG Queue migration (Epic UN-3445). Added executor, pluggable_worker, notification, scheduler, log_consumer, and ide_callback to both pytest --cov= flags and [tool.coverage.run].source. Non-regressive: only adds measurement scope. First task under Story UN-3446 (Phase 1 — Test Infrastructure). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe ChangesCoverage & Import Sorting Expansion
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| workers/pyproject.toml | Correctly adds 6 missing worker packages to --cov flags, [tool.coverage.run].source, and [tool.isort].known_first_party; addresses the prior Greptile comment about missing isort entries. |
| uv.lock | Contains ~30+ unintended package version bumps (aiohttp, anyio, boto3/botocore, asyncpg, cryptography, certifi, etc.) not mentioned in the PR description; these runtime changes should be in a dedicated PR. |
Comments Outside Diff (1)
-
uv.lock, line 1 (link)Unintended dependency upgrades included in lockfile
The PR description states this is a "single-file diff" and that "neither changes runtime behaviour," but
uv.lockcontains ~30+ package version bumps entirely unrelated to the coverage/isort config changes inworkers/pyproject.toml. Notable upgrades includeaiohttp3.12.15 → 3.13.5,anyio4.11.0 → 4.13.0,boto3/botocore1.34.131 → 1.34.162,certifi2025.8.3 → 2026.4.22, andasyncpg0.30.0 → 0.31.0. These are real runtime dependency changes that may introduce regressions across the whole platform and should not be bundled into a config-only PR without explicit review and CI sign-off.Prompt To Fix With AI
This is a comment left during a code review. Path: uv.lock Line: 1 Comment: **Unintended dependency upgrades included in lockfile** The PR description states this is a "single-file diff" and that "neither changes runtime behaviour," but `uv.lock` contains ~30+ package version bumps entirely unrelated to the coverage/isort config changes in `workers/pyproject.toml`. Notable upgrades include `aiohttp` 3.12.15 → 3.13.5, `anyio` 4.11.0 → 4.13.0, `boto3`/`botocore` 1.34.131 → 1.34.162, `certifi` 2025.8.3 → 2026.4.22, and `asyncpg` 0.30.0 → 0.31.0. These are real runtime dependency changes that may introduce regressions across the whole platform and should not be bundled into a config-only PR without explicit review and CI sign-off. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
uv.lock:1
**Unintended dependency upgrades included in lockfile**
The PR description states this is a "single-file diff" and that "neither changes runtime behaviour," but `uv.lock` contains ~30+ package version bumps entirely unrelated to the coverage/isort config changes in `workers/pyproject.toml`. Notable upgrades include `aiohttp` 3.12.15 → 3.13.5, `anyio` 4.11.0 → 4.13.0, `boto3`/`botocore` 1.34.131 → 1.34.162, `certifi` 2025.8.3 → 2026.4.22, and `asyncpg` 0.30.0 → 0.31.0. These are real runtime dependency changes that may introduce regressions across the whole platform and should not be bundled into a config-only PR without explicit review and CI sign-off.
Reviews (5): Last reviewed commit: "UN-3449 [FIX] Refresh root `uv.lock` — f..." | Re-trigger Greptile
Greptile flagged the same 6 packages we added to coverage scope are also missing from [tool.isort].known_first_party. Without this, isort won't treat imports from executor/, pluggable_worker/, notification/, scheduler/, log_consumer/, and ide_callback/ as first-party — they'd get mis-grouped on format runs against those packages' files. Same fix, same file — keeping config consistent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…1945) UN-3449 [FIX] Refresh root uv.lock — fix malformed banks entry The root uv.lock had a malformed banks entry that prevented uv from parsing it: error: Failed to parse `uv.lock` Caused by: The entry for package `banks` v2.4.1 has wheel `banks-2.2.0-py3-none-any.whl` with inconsistent version: v2.2.0 The version field claimed v2.4.1 but the sdist/wheel filenames were both v2.2.0. The PyPI upload-time on the wheel matches banks 2.2.0's release date, so the artifacts really are 2.2.0 — most likely a manual edit or a partial-write bug in an older uv version. banks is a transitive dependency pulled in by llama-index-core v0.14.16 (LlamaIndex's prompt-templating library). Unstract code does not import banks directly. Fix: regenerate via `rm uv.lock && uv lock`. After regen, banks resolves to v2.4.2 with consistent artifacts. Why 1,557 lines change: the auto-update workflow has been broken since 2026-04-01 (now fixed in UN-3448 / PR #1941), so the root lock has been 5 weeks stale. `uv lock` re-resolves everything against current PyPI, picking up minor/patch bumps the workflow would have applied over those 5 weeks. So the diff is: - banks 2.4.1 → 2.4.2 (the actual fix) - ~271 other packages with incidental drift (what the workflow would have done anyway) Surgical hand-editing was considered and rejected — fragile, and a future pyproject.toml-touching PR would trigger this same refresh once the workflow runs again. Verified: `uv lock --check` exits 0 (Resolved 272 packages in 3ms). Unblocks the `Update UV lock in all directories` check on PR #1940 and any future PRs that touch a pyproject.toml. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for the careful review. One clarification on the No $ git diff origin/main..HEAD -- "**/pyproject.toml" | grep -E "^[+-].*(==|>=|<=|~=)" | headReturns nothing — no constraint changes anywhere in the repo. Only The
So this isn’t bundling unrelated package upgrades into a config PR — it’s catching up on lock drift that the (now fixed) auto-update workflow would have applied routinely. Splitting them at this point would require force-pushing to remove the merged #1945 commit, which is more disruptive than the bundled merge. Happy to discuss further if you’d like specific bumps reviewed individually. |
|
Test ResultsSummary
Runner Tests - Full Report
SDK1 Tests - Full Report
|



What
workers/pyproject.tomlto measure all 11 worker packages.[tool.isort].known_first_partyso isort treats their imports as first-party (per Greptile review).shared,api_deployment,general,file_processing,callback.executor,pluggable_worker,notification,scheduler,log_consumer,ide_callback.Also includes UN-3449 / PR #1945 (root
uv.lockrefresh)PR #1945 was merged into this branch to unblock the
Update UV lock in all directoriesCI check. That PR fixes a malformedbankspackage entry in the rootuv.lockand incidentally refreshes ~141 packages of dependency drift accumulated since 2026-04-01 (when the auto-update workflow first broke).pyproject.tomlconstraint changes — onlyuv.lockregenerated.main(pre-existing).uv.lock— fix malformedbanksentry #1945 description.The two changes are landed together because #1945 is what unblocks #1940's CI check — splitting them at merge time would mean force-pushing to remove a now-merged commit. They share the same branch and merge as one.
Why
executor/worker andpluggable_worker/slot were both excluded from coverage measurement — a blind spot directly on the workers central to the rollout.How
--cov=flags to[tool.pytest.ini_options].addopts.[tool.coverage.run].source.[tool.isort].known_first_party.workers/pyproject.toml, ~19 lines added across three sections.uv.lock— fix malformedbanksentry #1945: refresh of rootuv.lock(1,587 lines, nopyproject.tomlconstraint changes).Can this PR break any existing features. If yes, please list possible items. If no, please explain why.
Coverage + isort changes: No. Configuration-only — neither changes runtime behaviour. 544 of 547 tests pass; the 3 pre-existing test failures are unrelated to this change and tracked separately on UN-3446.
Lock refresh (from #1945): Possible — large lock-file diffs can theoretically introduce subtle behaviour changes via transitive dependencies. Mitigations: no
pyproject.tomlconstraints changed, all bumps are within ranges already accepted onmain, security audit confirmed no new CVEs introduced, CItestjob validates basic functionality. See PR #1945 for full breakdown.Database Migrations
None.
Env Config
None.
Related Issues or PRs
uv.lock— fix malformedbanksentry #1945)Dependencies Versions
pyproject.tomlconstraint changes.uv.lockrefreshed via PR UN-3449 [FIX] Refresh rootuv.lock— fix malformedbanksentry #1945 — ~141 packages with patch/minor drift, includingbanks 2.4.1 (malformed) → 2.4.2. Notable changed package with an OSV advisory:protobuf 4.25.8 → 4.25.9(same advisoryGHSA-7gcm-g887-7qv7on both versions — no net security change).Notes on Testing
Refresh the coverage baseline anytime locally:
cd workers PYTHONPATH=.:../unstract .venv/bin/pytest --tb=no -qReports are written to
htmlcov/,coverage.xml,.coverage(all gitignored).Baseline at this PR: 34% total (17,458 stmts, 11,534 missed). 0% coverage on
callback(607 stmts),notification(397),log_consumer(128) — these are the very files upcoming PRs will touch and become explicit input to the next characterisation suite.Lock refresh validation:
uv lock --checkexits 0 (Resolved 272 packages in 3ms).Screenshots
N/A — config + lock file changes.
Checklist
🤖 Generated with Claude Code