mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 18:53:37 +00:00
a2c3dc77f1
When a Patrol finding has a generated remediation plan, the plan's per-step Rollback strings are now aggregated into the durable InvestigationRecord.Rollback field at record-build time. Previously rollback metadata existed only nested inside RemediationStep.Rollback, forcing operator-facing surfaces and Assistant prompt context to walk into per-step payload to answer "what's the undo for the proposed fix?" Adds AggregatePlanRollbackSteps in internal/ai/investigation_records.go which deduplicates non-empty rollback strings from a plan's steps. Wires the aggregation into the patrol_findings.go investigation-record build site so rollback flows automatically when the PatrolService has a RemediationEngine attached and the finding has an active plan. Adds three sub-tests covering nil plan, empty-rollback-step skip, and duplicate-rollback dedup. Updates the ai-runtime contract to pin the RemediationPlan to InvestigationRecord rollback aggregation rule.