mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-27 01:34:58 +08:00
Implement LaneEvent schema extensions for event ordering, provenance, and dedupe (US-002)
Adds comprehensive metadata support to LaneEvent for the canonical lane event schema: - EventProvenance enum: live_lane, test, healthcheck, replay, transport - SessionIdentity: title, workspace, purpose, with placeholder support - LaneOwnership: owner, workflow_scope, watcher_action (Act/Observe/Ignore) - LaneEventMetadata: seq, provenance, session_identity, ownership, nudge_id, event_fingerprint, timestamp_ms - LaneEventBuilder: fluent API for constructing events with full metadata - is_terminal_event(): detects Finished, Failed, Superseded, Closed, Merged - compute_event_fingerprint(): deterministic fingerprint for terminal events - dedupe_terminal_events(): suppresses duplicate terminal events by fingerprint Provides machine-readable event provenance, session identity at creation, monotonic sequence ordering, nudge deduplication, and terminal event suppression. Adds 10 regression tests covering: - Monotonic sequence ordering - Provenance serialization round-trip - Session identity completeness - Ownership and workflow scope binding - Watcher action variants - Terminal event detection - Fingerprint determinism and uniqueness - Terminal event deduplication - Builder construction with metadata - Metadata serialization round-trip Closes Phase 2 (partial) from ROADMAP. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -83,8 +83,10 @@ pub use hooks::{
|
||||
HookAbortSignal, HookEvent, HookProgressEvent, HookProgressReporter, HookRunResult, HookRunner,
|
||||
};
|
||||
pub use lane_events::{
|
||||
dedupe_superseded_commit_events, LaneCommitProvenance, LaneEvent, LaneEventBlocker,
|
||||
LaneEventName, LaneEventStatus, LaneFailureClass,
|
||||
compute_event_fingerprint, dedupe_superseded_commit_events, dedupe_terminal_events,
|
||||
is_terminal_event, EventProvenance, LaneCommitProvenance, LaneEvent, LaneEventBlocker,
|
||||
LaneEventBuilder, LaneEventMetadata, LaneEventName, LaneEventStatus, LaneFailureClass,
|
||||
LaneOwnership, SessionIdentity, WatcherAction,
|
||||
};
|
||||
pub use mcp::{
|
||||
mcp_server_signature, mcp_tool_name, mcp_tool_prefix, normalize_name_for_mcp,
|
||||
|
||||
Reference in New Issue
Block a user