mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
0f938f8e9b
Adds branch-coverage tests for eight packages whose target functions were measured at 0% before this change. Every named target was verified to move by running each package's coverage with and without the new file. - internal/ai/eval: all 36 Scenario constructors and the four PatrolScenario constructors 0% -> 100%. These are catalog-invariant tests, not literal echoes: unique names, populated required fields, runnable assertions, tool references checked against the agentcapabilities registry, and exact assertion-count deltas across the env-gated conditional appends. A parity test scans scenarios.go itself, so adding a constructor without registering it in the table now fails rather than silently going untested. - cmd/pulse-control-plane: nine MSP and tenant-runtime print helpers 0% -> 100%, covering the nil, empty-slice and optional-field arms. - internal/ai/memory: RemediationLog GetByID, MarkRolledBack and GetRollbackable 0% -> 100%, pinning the overwrite-vs-preserve contract on RollbackInfo and each falsy arm of the rollbackable predicate. - internal/alerts/config: AlertConfig.UnmarshalJSON 0% -> 90% and NormalizeAlertConfigAliases 52.9% -> 94.1%. - internal/config: RunMigrationIfNeeded 0% -> 100%, copyFile 0% -> 88.9%. - internal/mock: AvailabilityFixtures, FixtureGraph.SupplementalChanges and generateMockHostRate 0% -> 100%. - internal/api: testProxmoxPlatformConnection 0% -> 100% through its injected connect func, so no network is involved. - internal/servicediscovery: needsDeepScan 0% -> 100% across every return arm including the confidence boundary. No source file is modified. Adversarial review found no rejects; two findings were acted on before committing, replacing a circular catalog-count assertion with the real source-parity scan and reducing an AllPatrolScenarios test that compared the function against the same constructors it calls to the ordering and completeness signal that is actually independent. PULSE_ALLOW_CONTRACT_NEUTRAL_COMMIT=test-only branch coverage, no source or contract change Contract-Neutral: test-only branch coverage, no source or contract change