witan: local-store banner drops the target name and calls an OmniGraph server a local store

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia da mcp/servers/witan/witan/cli/local_dispatch.py, in local_store_notice, e confronta il suo output Rich con il percorso di errore markup=False in mcp/servers/witan/witan/cli/init.py. Riproduci il problema con i due target dei progetti issue e witan. Il lavoro è completato quando il nome del target selezionato viene preservato e un server HTTP OmniGraph non viene descritto come uno store locale o, in modo fuorviante, come un target non distribuito.

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

Descrizione

bug
Expected Behavior

With a target that sets server = "https://…", commands either print nothing extra or name the target and the server correctly, e.g. witan: using OmniGraph server https://graph.example.ts.net:8443 (target [personal]).

Current Behavior

Every command prints this to stderr:

witan: using local store https://graph.example.ts.net:8443 (target ) — deployed targets: production
  • The target name is missing. local_store_notice builds target [personal] inside a Rich markup string, so Rich parses [personal] as a style tag and drops it. The error path already avoids this with markup=False (comment); the banner does not.
  • The wording is wrong. An HTTP OmniGraph server is not a local store, and "deployed targets: production" suggests the command skipped a deployment when the matched target is itself a deployment.
Steps to Reproduce
  1. Configure two targets:
    [targets.production]
    remote_url = "https://witan.example.edu/mcp"
    match_orgs = ["myorg"]
    
    [targets.personal]
    server = "https://graph.example.ts.net:8443"
    graph = "council"
    match_paths = ["~/src/personal"]
    
  2. From a checkout under ~/src/personal, run witan projects.
  3. Observe the stderr line above.
Possible Solution
  • Escape the bracket (rich.markup.escape) or print without markup.
  • Skip the banner, or reword it, when the selected target's server is an http(s):// OmniGraph server.
Additional Details

ol-agent-kit 0.1.4 (witan-core 0.40.0, witan-council 0.38.0); line links are at main 5c86dd3e34329cc64b25f238b0f7cee58350df84.

Lingua principale
Python
Stelle
5
Fork
0
Merge medio
1g 21h
PR unite (30g)
87

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 mitodl/agent-kit

Tutte le issue di mitodl/agent-kit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.