catalog check --per-skill: load skill bodies one at a time, not all up front

Aperta
#434 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@napetrov ci sta già lavorando.

Dal 7/11/2026.

  • #435 di @napetrov — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with the named entry points: dokimi/commands/catalog_scan.py, dokimi/external/catalog_review.py, and dokimi/external/catalog.py; trace where each skill body is loaded and when its row is produced. Keep cross-catalog checks on their existing path. Done means peak RSS stays roughly flat as generated catalog size grows, while JSONL and --resume output remains unchanged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

PR #414 (corpus mode for catalog check --per-skill, merged as d5bd732b) loads every skill's SKILL.md body before the first JSONL row is written, so memory still grows with the catalog. The module docstring and docs/external-content.md say so, and the code matches. Three review threads on #414 raised it. The author chose to keep eager loading for now and correct the docstrings:

  • PRRT_kwDOVBg7g860YhgX: dokimi/commands/catalog_scan.py:70. JSONL mode retains every skill body before its first row.
  • PRRT_kwDOVBg7g860Zrl8: dokimi/external/catalog_review.py:38. review_skill_dir loads and retains every descendant body before discarding all but its own.
  • PRRT_kwDOVBg7g860dqt3: dokimi/external/catalog.py:113 and :231. read_skill_manifest loads every body before the first row.

Proposal: read a skill's body when its row is produced, so peak memory is per skill, not per catalog. This covers the manifest read, the filesystem scan (_scan_skill_files), review_skill_dir and the per-skill loop. Cross-catalog checks need all skills together and keep their current path.

Done when a run over N generated skills keeps peak RSS flat as N grows, and the JSONL and --resume output is unchanged.

Lingua principale
Python
Stelle
11
Fork
9
Merge medio
1g 11h
PR unite (30g)
349

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intel/dokimi

Tutte le issue di intel/dokimi

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.