Skip to content

feat(enrichment): render section + analyzerStatus wiring test for new local analyzers #2037

Description

@JSONbored

Test-only bounty that hardens the REES render/status contract every new analyzer relies on: assert that renderBrief() emits a section for a descriptor that provides an inline render(), falls back to the descriptor-section renderer when it does not, and that analyzerStatus reflects a degraded analyzer. This locks the wiring surface so the many new analyzer PRs land against a tested contract. No runtime change.

Deliverables

  • Add review-enrichment/test/render-contract.test.ts (node:test against dist/) exercising renderBrief() with a fixture BriefFindings that includes a descriptor-with-render() analyzer and a descriptor-without-render() analyzer
  • Assert the inline render() output appears, the fallback renderDescriptorSection() path is exercised, and an empty finding list produces no section (both branches)
  • Assert analyzerStatus surfaces 'degraded'/'partial' for a fixture where an analyzer reports partial
  • Keep it pure fixture-driven (no network, no GitHub token); achieve 100% branch coverage of the touched render.ts helper paths

References

  • review-enrichment/src/render.ts:15 (renderDescriptorSection) and :24 (renderBrief)
  • review-enrichment/test/analyzer-registry.test.ts and review-enrichment/test/analyzer-metadata.test.ts (existing contract tests to sit beside)
  • review-enrichment/src/analyzers/registry.ts:36-443 (descriptors with/without render())

Part of #1499.


size: XS · gittensor:bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions