Pulse/pkg/reporting
rcourtman e32d4ede44 Expose engine narrative entry points for non-rendering callers
The reporting engine's synthesis layer was reachable only through
Generate/GenerateMulti, which always rendered PDF or CSV. Pulse
Assistant needs the same retrospective synthesis (per-resource
summary, fleet outliers, period comparison) in a form it can present
in chat, not as a downloaded artifact.

Add two non-rendering entry points to the Engine interface:

  NarrativeFor(req MetricReportRequest) (*Narrative, error)
  FleetNarrativeFor(req MultiReportRequest) (*FleetNarrative, error)

Both run the same query path and the same narrator resolution as their
rendering counterparts (heuristic by default, AI when the request
supplies a narrator, fail-closed-to-heuristic on any narrator error)
and return the structured narrative without invoking the fpdf/csv
output stage. Test stubs in pkg/reporting and internal/api are
updated to implement the extended interface.

These are the seams the upcoming pulse_summarize Assistant tools wrap
to answer questions like "what's hot on pve1 this week" or "where
should I look across my fleet" without round-tripping through report
generation. Same synthesis layer, no PDF involved.

Also fixes a pre-existing flake in TestEngineGenerate_UsesSuppliedNarrator
(metrics writes are async; the first Generate sometimes ran before
the raw tier flushed). Wrapped in the same eventually-pattern used by
the prior-period and findings-provider tests.
2026-05-10 22:23:09 +01:00
..
catalog.go Remove customer commercial analytics wrappers 2026-04-30 11:46:16 +01:00
catalog_test.go Remove customer commercial analytics wrappers 2026-04-30 11:46:16 +01:00
csv.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
csv_additional_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
engine.go Expose engine narrative entry points for non-rendering callers 2026-05-10 22:23:09 +01:00
engine_additional2_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
engine_additional3_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
engine_additional_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
engine_integration_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
engine_narrative_test.go Expose engine narrative entry points for non-rendering callers 2026-05-10 22:23:09 +01:00
engine_test.go Add agentless availability targets 2026-05-06 10:35:34 +01:00
fleet_narrative.go Add fleet-level AI narrative for multi-resource reports 2026-05-10 21:23:12 +01:00
fleet_narrative_test.go Add fleet-level AI narrative for multi-resource reports 2026-05-10 21:23:12 +01:00
multi_report_visual_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
narrative.go Replace heuristic report narrative with optional AI-generated layer 2026-05-10 19:30:54 +01:00
narrative_test.go Replace heuristic report narrative with optional AI-generated layer 2026-05-10 19:30:54 +01:00
pdf.go Add fleet-level AI narrative for multi-resource reports 2026-05-10 21:23:12 +01:00
pdf_additional2_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
pdf_additional_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
pdf_insights_test.go Replace heuristic report narrative with optional AI-generated layer 2026-05-10 19:30:54 +01:00
reporting.go Expose engine narrative entry points for non-rendering callers 2026-05-10 22:23:09 +01:00
reporting_test.go Expose engine narrative entry points for non-rendering callers 2026-05-10 22:23:09 +01:00
vm_inventory.go Canonicalize reporting fallback filename date style 2026-03-26 09:28:17 +00:00
vm_inventory_test.go Define VM inventory export schema contract 2026-03-25 22:09:37 +00:00