Skip to main content

plan_fixes

Method
This is a method of the DoctorRulesRegistry class in the doctor_registry module.
Produce a :class:RepairPlan describing what the doctor repair changes. Safety contract:
  • Diff preview: every applied rule records a before/after ConfigDiff.
  • Refuse-on-unrecoverable: a rule that raises is skipped, its blocking finding(s) recorded in refused, and its partial change discarded.
  • Backup: when dry_run=False and backup=True the original config is snapshotted to backup_path before returning.
  • Re-validation: after applying, residual findings are re-collected so callers can report “repair left N finding(s)”.

Signature

Parameters

Dict[str, Any]
required
The configuration to repair (never mutated).

Returns

RepairPlan
class:RepairPlan.

Uses

  • copy.deepcopy
  • get_rules
  • rule.collect_findings
  • warnings.warn
  • Finding
  • rule.apply_fix
  • ConfigDiff
  • collect_all_findings
  • RepairPlan

Used By

Source

View on GitHub

praisonaiagents/runtime/doctor_registry.py at line 79