Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Skill search returns stale results after all skills are disabled or removed

Aperta Adatta ai principianti
#974 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@AWUQAQ ci sta già lavorando.

Dal 13/9/2026.

  • #975 di @AWUQAQ — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
search

Direzione di ricerca

Inizia da SkillSearchEngine._ensure_indexed() e verifica in che modo un elenco di documenti vuoto influisce sul retriever BM25 e sulla versione della cache. Esegui test_skill_features.py, inclusi i casi di disabilitazione/rimozione e di indice figlio ibrido; il lavoro è completato quando le ricerche non restituiscono risultati dopo la rimozione di tutte le skills e tornano a funzionare dopo che le skills vengono abilitate o aggiunte.

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

Descrizione

Description

After a search populates the skill index, disabling or removing all
skills does not clear the index. Subsequent searches still return
previously indexed skill IDs.

Steps to reproduce
  1. Create a SkillCatalog with enabled skills.
  2. Create a SkillSearchEngine using the BM25 backend.
  3. Search for a term matching an enabled skill.
  4. Disable or remove every skill in the catalog.
  5. Run the same search again.
Expected behavior

The search returns an empty list because no enabled skills remain.

Actual behavior

The search returns stale results from the previous index.

Environment
  • OS: Windows
  • Python: 3.12
  • Commit: 1860d85a23dc507c9a7bb908bfdb83a04a6eeb18
Investigation

In SkillSearchEngine._ensure_indexed(), an empty document list skips
retriever indexing, but the cache version is still updated. This leaves
the previous index intact.

Resetting the retriever when there are no enabled skill documents
appears to resolve the problem.

I have a local fix and regression tests covering disabling/removing all
skills, clearing hybrid child indexes, and restoring search after skills
are enabled or added again. All 37 tests in test_skill_features.py pass
with the fix.

I would be happy to submit a PR.

Lingua principale
Python
Stelle
4.4k
Fork
532
Merge medio
18h 26m
PR unite (30g)
10

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 modelscope/ms-agent

Tutte le issue di modelscope/ms-agent

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.