Repository navigation
chore(deps): bump semgrep to a buildable version - #65
Conversation
…resolution uv sync --extra dev resolves with no committed uv.lock (the file is gitignored here), so every ci run re-resolves fresh. with fastapi in the dev extra, that fresh resolution currently backtracks semgrep all the way to 0.86.3, whose sdist setup.py aborts without a system semgrep-core binary, breaking guard-agent[dev] installs (guard-core ecosystem-gate consumer jobs, guard-agent's own ci). floor it at >=1.100,<2 so resolution lands on a wheel release (1.178.0).
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe ChangesSemgrep dependency constraint
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk: ⚪ Minimal · up to The development dependency change appears mergeable with normal CI checks; the observed CI resolution uses Semgrep 1.178. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Problem
uv sync --extra devagainst guard-agent master currently fails while buildingsemgrep==0.86.3:Reproduced on clean reruns of guard-core PR #130's ecosystem-gate consumer jobs (both
consumer-test (guard-agent, ...)andconsumer-test-latest-release (guard-agent, ...)fail at theuv sync --extra devstep, ~30-45s in): https://github.com/rennf93/guard-core/actions/runs/36649744556/job/109684783430. guard-agent's own ci.yml and scheduled-lint use the sameuv sync --extra devshape, so they are equally exposed.Root cause
uv.lock(gitignored), so every CI run resolves fresh.fastapiandsemgrepunpinned. With current PyPI metadata, fresh universal resolution (requires-python >=3.10,<3.15) hits a conflict between newer semgrep's dependency chain (themcpera, semgrep >=1.80) and fastapi's pins, and uv's backtracker prefers walking semgrep down. With the full dev extra it walks all the way to 0.86.3, whose sdistsetup.pyaborts unless a systemsemgrep-corebinary exists. No wheel exists for that vintage on modern platforms, so the build always fails.["semgrep", "fastapi"]withrequires-python = ">=3.10,<3.15"resolves semgrep to 1.79.0 (pre-mcp); adding the rest of the dev extras drags it to 0.86.3.["semgrep>=1.100,<2", "fastapi"]resolves to 1.178.0 immediately.Fix
Pin the dev dependency to
"semgrep>=1.100,<2"(with a comment explaining why). Resolution now lands on semgrep 1.178.0 (wheel release, cp310-cp314, all CI platforms), so no sdist build ever happens.Verification
uv lockresolves 190 packages, semgrep 1.178.0, no backtracking.uv sync --extra devsucceeds;uv run semgrep --versionprints1.178.0(verified under both the default interpreter and--python 3.10).REDIS_URL=redis://localhost:6379 uv run pytest -q-> 529 passed, 2 skipped, 100% coverage (also re-run under--python 3.10in the fresh clone: 529 passed, 2 skipped).Impact on guard-core#130
guard-core#130's failing
consumer-test (guard-agent, ...)andconsumer-test-latest-release (guard-agent, ...)jobs installguard-agent[dev]from this repo's default branch and fail inuv sync --extra devat exactly this build. Once this PR merges to master, those jobs resolve semgrep 1.178.0 from a wheel and clear on the next ecosystem-gate run (re-running them before the merge would still fail, since the gate clones master).Summary by CodeRabbit