@@ -560,7 +560,7 @@ def stash(
560560 """
561561 # Pattern 1: String ID validation
562562 if not key or not key .strip ():
563- raise ValueError ("key cannot be empty" )
563+ raise ValueError (f "key cannot be empty. Got: { key !r } " )
564564
565565 if not credentials .can_stage ():
566566 raise PermissionError (
@@ -612,7 +612,7 @@ def retrieve(
612612 """
613613 # Pattern 1: String ID validation
614614 if not key or not key .strip ():
615- raise ValueError ("key cannot be empty" )
615+ raise ValueError (f "key cannot be empty. Got: { key !r } " )
616616
617617 owner = agent_id or credentials .agent_id
618618 full_key = f"{ self .PREFIX_WORKING } { owner } :{ key } "
@@ -703,7 +703,7 @@ def get_staged_pattern(
703703 """
704704 # Pattern 1: String ID validation
705705 if not pattern_id or not pattern_id .strip ():
706- raise ValueError ("pattern_id cannot be empty" )
706+ raise ValueError (f "pattern_id cannot be empty. Got: { pattern_id !r } " )
707707
708708 key = f"{ self .PREFIX_STAGED } { pattern_id } "
709709 raw = self ._get (key )
@@ -824,7 +824,7 @@ def create_conflict_context(
824824 """
825825 # Pattern 1: String ID validation
826826 if not conflict_id or not conflict_id .strip ():
827- raise ValueError ("conflict_id cannot be empty" )
827+ raise ValueError (f "conflict_id cannot be empty. Got: { conflict_id !r } " )
828828
829829 # Pattern 5: Type validation
830830 if not isinstance (positions , dict ):
@@ -874,7 +874,7 @@ def get_conflict_context(
874874 """
875875 # Pattern 1: String ID validation
876876 if not conflict_id or not conflict_id .strip ():
877- raise ValueError ("conflict_id cannot be empty" )
877+ raise ValueError (f "conflict_id cannot be empty. Got: { conflict_id !r } " )
878878
879879 key = f"{ self .PREFIX_CONFLICT } { conflict_id } "
880880 raw = self ._get (key )
@@ -949,7 +949,7 @@ def create_session(
949949 """
950950 # Pattern 1: String ID validation
951951 if not session_id or not session_id .strip ():
952- raise ValueError ("session_id cannot be empty" )
952+ raise ValueError (f "session_id cannot be empty. Got: { session_id !r } " )
953953
954954 # Pattern 5: Type validation
955955 if metadata is not None and not isinstance (metadata , dict ):
@@ -985,7 +985,7 @@ def join_session(
985985 """
986986 # Pattern 1: String ID validation
987987 if not session_id or not session_id .strip ():
988- raise ValueError ("session_id cannot be empty" )
988+ raise ValueError (f "session_id cannot be empty. Got: { session_id !r } " )
989989
990990 key = f"{ self .PREFIX_SESSION } { session_id } "
991991 raw = self ._get (key )
@@ -2009,7 +2009,7 @@ def atomic_promote_pattern(
20092009 """
20102010 # Pattern 1: String ID validation
20112011 if not pattern_id or not pattern_id .strip ():
2012- raise ValueError ("pattern_id cannot be empty" )
2012+ raise ValueError (f "pattern_id cannot be empty. Got: { pattern_id !r } " )
20132013
20142014 # Pattern 4: Range validation
20152015 if not 0.0 <= min_confidence <= 1.0 :
0 commit comments