mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-06 16:14:49 +08:00
feat(policy): add lane reconciliation events and policy support
Add terminal lane states for when a lane discovers its work is already landed in main, superseded by another lane, or has an empty diff: LaneEventName: - lane.reconciled — branch already merged, no action needed - lane.merged — work successfully merged - lane.superseded — work replaced by another lane/commit - lane.closed — lane manually closed PolicyAction::Reconcile with ReconcileReason enum: - AlreadyMerged — branch tip already in main - Superseded — another lane landed the same work - EmptyDiff — PR would be empty - ManualClose — operator closed the lane PolicyCondition::LaneReconciled — matches lanes that reached a no-action-required terminal state. LaneContext::reconciled() constructor for lanes that discovered they have nothing to do. This closes the gap where lanes like 9404-9410 could discover 'nothing to do' but had no typed terminal state to express it. The policy engine can now auto-closeout reconciled lanes instead of leaving them in limbo. Addresses ROADMAP P1.3 (lane-completion emitter) groundwork. Tests: 4 new tests covering reconcile rule firing, context defaults, non-reconciled lanes not triggering reconcile rules, and reason variant distinctness. Full workspace suite: 643 pass, 0 fail.
This commit is contained in:
@@ -100,7 +100,7 @@ pub use plugin_lifecycle::{
|
||||
};
|
||||
pub use policy_engine::{
|
||||
evaluate, DiffScope, GreenLevel, LaneBlocker, LaneContext, PolicyAction, PolicyCondition,
|
||||
PolicyEngine, PolicyRule, ReviewStatus,
|
||||
PolicyEngine, PolicyRule, ReconcileReason, ReviewStatus,
|
||||
};
|
||||
pub use prompt::{
|
||||
load_system_prompt, prepend_bullets, ContextFile, ProjectContext, PromptBuildError,
|
||||
|
||||
Reference in New Issue
Block a user