Make CacheManager a deprecated subclass of FileCache
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Read lettucedetect/detectors/cache.py and the FileCache implementation, then check how llm.py imports and uses CacheManager. Run the two listed pytest files first to see the existing behavior. Done means CacheManager inherits the file cache behavior, warns as specified, and the existing tests pass with only the intended golden fixture updates.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #144 · Epic: #126 · Blocked by: #146, #135
Branch from stateless_core; open the PR against it.
Problem
CacheManager and FileCache would otherwise be two implementations of the same file format that can drift apart.
Current behavior
lettucedetect/detectors/cache.py:12-47is a standalone class:get,set,delete,_hash(static),path. It is imported byllm.py:12.
Steps
- Rewrite
CacheManager(file_path)as a subclass ofFileCachekeepingget,set,delete,_hashandpath. It inheritsaget,asetandadeletefromFileCacheand adds no override; the async pairs are new names, so they don't warn on their own. - Mark it deprecated with the helper from #135, naming
FileCache. Calls from insidelettucedetect(includingllm.py) don't warn. - Update the
CacheManagergolden fixtures from #131 only where the directory is no longer created by the constructor (an intended change; say so in the PR).
Acceptance criteria
-
isinstance(CacheManager(p), FileCache); constructing from a test module warnsLettuceDetectDeprecationWarningnamingFileCache. -
CacheManagerhas workingaget,asetandadeleteequal toget,setanddelete(a value set withsetreads viaaget); calling them emits no extra warning beyond the one from construction. -
_hashstill returns the recorded strings;get/set/delete/pathbehave as before. - Docstring has the
.. deprecated::note. - Existing tests pass.
Start here
uv run --extra dev pytest tests/test_golden_factory_cache_pytest.py tests/test_llm_detector_pytest.py -q
- Lingua principale
- Python
- Stelle
- 615
- Fork
- 60
- Merge medio
- 1g 8h
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KRLabsOrg/LettuceDetect
-
Stop-hook --min-confidence drops every --llm-model span (missing confidence treated as 0.0), reporting hallucinated answers as cleanForse già presa @Clannad47 l’ha presa 17 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
KRLabsOrg/LettuceDetect#117 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
KRLabsOrg/LettuceDetect#108 ·
I maintainer di solito rispondono entro 1 giorno
-
Add AGENTS.md: one entry file for coding agents and new contributorsForse già presa @ShryukGrandhi l’ha presa 18 giorni fa. Apertadocumentation
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
KRLabsOrg/LettuceDetect#104 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
KRLabsOrg/LettuceDetect#181 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
KRLabsOrg/LettuceDetect#180 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di KRLabsOrg/LettuceDetect
Issue simili
-
[BUG]: Compliance rules never see Unity Catalog views as viewsForse già presa @wagnercsantos l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
databrickslabs/ontos#1348 ·
I maintainer di solito rispondono entro 3 giorni
-
`forum_pr_poster` action will always return `none` when checking for pre-existing feedback threads, even if a feedback thread already exists.Forse già presa @pgmzeta l’ha presa oggi. ApertaE-Verified P-Major
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
goonstation/goonstation#28259 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
woonstadrotterdam/monumenten#70 ·
I maintainer di solito rispondono entro 15 giorni
-
binding:python bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
The Browser tab fails with a Wayland error when Open Terminal runs from a Wayland desktop sessionAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-webui/open-terminal#210 ·