mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
docs(claude): tell agents to let heavy gates queue for machine-wide slots
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
8035fb3d27
commit
2e996a120f
1 changed files with 2 additions and 0 deletions
|
|
@ -53,6 +53,8 @@ When you fix violations gated by `ruff-strict-budget.json`, `type-discipline-bud
|
|||
|
||||
`make check` (f.k.a. `make pre-commit`, which still works identically as an alias) saves its complete output to a log file in .git (overwriting previous logs) and prints that path as its first and last output lines. To inspect a run, read or grep that log instead of re-running the multi-minute checks just to see a different slice
|
||||
|
||||
`make check`, `make lint`, `make bootstrap`, `scripts/pre_commit_lint.sh`, and the standalone budget gates each hold one of `LITELLM_GATE_SLOTS` machine-wide slots (default 2, see `scripts/gate_slot_lock.py`), so when other sessions or worktrees on the same box are already running heavy work, yours prints "all N machine-wide slots are busy; queueing" and then stays quiet until a slot frees. Queueing is expected, so give the command a long timeout and let it wait instead of killing it, retrying it, or assuming it hung. Don't skip the queue by setting `LITELLM_GATE_SLOTS=0`, raising the slot count, or calling `check-inner` / `lint-inner` / the gate scripts directly, and don't fan heavy targets out into parallel background shells since they'd only queue behind each other
|
||||
|
||||
If you're trying to create a new function that relies on untyped stuff, instead of adding more Any's and pushing `reportAny` / `reportExplicitAny` closer to their basedpyright ceilings, just validate it in the caller with Pydantic (a model or `TypeAdapter` that returns the typed thing or raises will do) and then pass the now typed variable in
|
||||
|
||||
If you get an LIT001 or LIT002 fail, refactor the code to follow functional programming best practices rather than introducing mutable data structures. For example, build values in one shot with comprehensions or generators wrapped in `tuple()` / `MappingProxyType()` / `frozenset()` instead of seeding an empty `list`/`dict`/`set` and mutating it over time. Ideally, `# mutable-ok` is never used; reach for it only as a genuine last resort when an immutable rewrite is truly impossible, and always pair it with a real reason
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue