base
base
¶
EditApplier ABC, registry, and context types for the execute phase.
Each concrete applier implements validate/apply/rollback for a single EditOp. Appliers are registered in an EditApplierRegistry keyed by EditOp.
See spec §7.1.
Classes¶
ApplyContext
dataclass
¶
Shared context passed to all appliers.
ValidationResult
dataclass
¶
Result of EditApplier.validate().
ApplyResult
dataclass
¶
Result of EditApplier.apply().
EditApplier
¶
Bases: ABC
Abstract base for edit appliers.
Each subclass handles one EditOp. It validates the edit against the current config state, applies the mutation, and can roll back.
Functions¶
validate
abstractmethod
¶
validate(edit: Edit, ctx: ApplyContext) -> ValidationResult
apply
abstractmethod
¶
apply(edit: Edit, ctx: ApplyContext) -> ApplyResult
rollback
abstractmethod
¶
rollback(edit: Edit, ctx: ApplyContext) -> None
EditApplierRegistry
¶
Registry of EditApplier instances keyed by EditOp.
Source code in src/openjarvis/learning/distillation/execute/base.py
Functions¶
register
¶
register(applier: EditApplier) -> None
get
¶
get(op: EditOp) -> EditApplier