fix: read-only candidate-check and bot no-sync for stale venv safety#2290
Merged
Conversation
…2285, #2289) - Add `check-frozen`/`candidate-check` targets that run `uv sync --frozen --check` before lint + MyPy with `uv run --no-sync`; fail without creating/modifying `.venv`. - Switch `preflight-bot` to `uv run --no-sync python -m scripts.probe.check_bot_runtime_env` (module invocation instead of script path). - Switch `run-bot` and `bot` to `uv run --no-sync` for runtime loops, preserving log tee + exit status behavior in `bot`. - Keep `bot-response-smoke` on plain `uv run`: it is a verification/smoke gate, not a runtime loop, and benefits from the auto-sync guarantee. - Document candidate-check usage, no-sync behavior, and stale `.venv` remediation in docs/LOCAL-DEVELOPMENT.md. Fixes #2285, Fixes #2289
Owner
Author
|
Review disposition: request_changes (formal review is blocked by GitHub because this is my own PR) Findings
Verification
Disposition: request_changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Read-only frozen check for candidate/review validation and
uv run --no-syncfor bot runtime loops to prevent implicit.venvmutations.Changes
Makefile: Addcheck-frozen/candidate-checktargets that runuv sync --frozen --checkbefore lint + MyPy withuv run --no-sync. Switchpreflight-botto module invocation viapython -m scripts.probe.check_bot_runtime_env. Switchrun-botandbotto$(UV_RUN_NO_SYNC), preserving log tee + exit status inbot. Keepbot-response-smokeon plainuv run(it's a verification gate, not a runtime loop, and benefits from the auto-sync guarantee).docs/LOCAL-DEVELOPMENT.md: Document candidate-check usage, no-sync behavior, stale.venvremediation, and worktree handling.Verification
make -n candidate-check— correct recipe: frozen check → no-sync lint + MyPymake candidate-check(absent.venv) — fails without creating/modifying.venvwith clear error guidanceuv run --no-sync python -m scripts.probe.check_bot_runtime_env --skip-docker— module invocation worksmake -n bot,make -n run-bot,make -n preflight-bot— all useuv run --no-syncmake docs-check— all links OKgit diff --check— cleanFixes #2285
Fixes #2289