Reindex log does not say why an evidence bundle was refused

Open Beginner friendly
#354 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start with reference-implementations/dacs-directory/src/catalog/indexer.ts, especially inspect near line 510 and recordListingRejection near line 284, then read resolveBundleSide in bundleBinding.ts near line 168 to follow the generic rejection. Trace how buildCurrentEvidenceGraph sets graph.reason in evidenceGraph.ts. Add a test showing a refused bundle’s reason and locator reach the log or diagnostics; done means graph failures and the listed mismatch cases are distinguishable in reindex output.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
0
Forks
3
Avg merge
20h 26m
Merged PRs (30d)
119

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DACS-Agent-commerce/Community

All issues in DACS-Agent-commerce/Community

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.