Reindex log does not say why an evidence bundle was refused

Aperta Adatta ai principianti
#354 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
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Inizia da reference-implementations/dacs-directory/src/catalog/indexer.ts, in particolare da inspect vicino alla riga 510 e recordListingRejection vicino alla riga 284, poi leggi resolveBundleSide in bundleBinding.ts vicino alla riga 168 per seguire il rifiuto generico. Segui come buildCurrentEvidenceGraph imposta graph.reason in evidenceGraph.ts. Aggiungi un test che mostri che il motivo e il locator di un bundle rifiutato arrivano al log o alla diagnostica; il lavoro è concluso quando gli errori del grafo e i casi di mancata corrispondenza elencati sono distinguibili nell’output della reindicizzazione.

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

Descrizione

contributors-section

Where: reference-implementations/dacs-directory/src/catalog/indexer.ts:523 (on phase0-completion at the linked commit)

What goes wrong: In the indexer's inspect function (indexer.ts:510), when a deal's bundle side is checked, the code tests graph.ok, graph.signaturesVerified, the job id, the anchoring role and the role holder, and returns null if any test fails. The reason that buildCurrentEvidenceGraph sets on a refused graph (graph.reason in evidenceGraph.ts, for example a bad party hash or a nested reference failing with a cause) is not logged or counted. The caller resolveBundleSide (bundleBinding.ts:168) then reports only the generic reason "every BundleBinding failed BB-5 post-fetch checks". An operator reading the reindex output cannot tell why a bundle was dropped.

Suggested fix: When inspect returns null, record the refusal reason together with the bundle locator (binding.nativeAddress) and the job id, using the existing run diagnostics or reindex log (the same place listing rejections are recorded, see recordListingRejection near indexer.ts:284). Use graph.reason when the graph itself failed, and a short fixed text for the job id, role and role-holder mismatches. Add a test that a refused bundle's reason reaches the log or diagnostics.

Size: Small

This comes from a code review, not from a failing run, so please confirm it before starting. Send the fix as a pull request to phase0-completion. It merges once tests pass and a maintainer has approved it.

Lingua principale
TypeScript
Stelle
0
Fork
3
Merge medio
20h 26m
PR unite (30g)
119

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 DACS-Agent-commerce/Community

Tutte le issue di DACS-Agent-commerce/Community

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.