pub struct PromptScopeKey { /* private fields */ }Expand description
Typed prompt scope key.
Uniquely identifies a prompt for replay from checkpoint history. Constructed via phase-specific factory methods to enforce required dimensions.
§Backward Compatibility
Display output exactly matches the format!() strings previously used in handlers.
The recovery_epoch field is NOT part of Display — it is a future-proofing hook
and an audit dimension only.
Implementations§
Source§impl PromptScopeKey
impl PromptScopeKey
Sourcepub const fn for_planning(
iteration: u32,
retry_mode: RetryMode,
recovery_epoch: u32,
) -> Self
pub const fn for_planning( iteration: u32, retry_mode: RetryMode, recovery_epoch: u32, ) -> Self
Construct a key for the Planning phase.
Sourcepub const fn for_development(
iteration: u32,
continuation: Option<u32>,
retry_mode: RetryMode,
recovery_epoch: u32,
) -> Self
pub const fn for_development( iteration: u32, continuation: Option<u32>, retry_mode: RetryMode, recovery_epoch: u32, ) -> Self
Construct a key for the Development phase.
Set continuation to Some(attempt) for continuation mode,
or None for normal and retry modes.
Sourcepub const fn for_commit(
iteration: u32,
attempt: u32,
retry_mode: RetryMode,
recovery_epoch: u32,
) -> Self
pub const fn for_commit( iteration: u32, attempt: u32, retry_mode: RetryMode, recovery_epoch: u32, ) -> Self
Construct a key for the Commit phase.
Sourcepub const fn for_review(
pass: u32,
retry_mode: RetryMode,
recovery_epoch: u32,
) -> Self
pub const fn for_review( pass: u32, retry_mode: RetryMode, recovery_epoch: u32, ) -> Self
Construct a key for the Review phase.
Sourcepub const fn for_fix(
pass: u32,
retry_mode: RetryMode,
recovery_epoch: u32,
) -> Self
pub const fn for_fix( pass: u32, retry_mode: RetryMode, recovery_epoch: u32, ) -> Self
Construct a key for the Fix phase.
Sourcepub fn for_conflict_resolution(phase: &str, recovery_epoch: u32) -> Self
pub fn for_conflict_resolution(phase: &str, recovery_epoch: u32) -> Self
Construct a key for a rebase conflict resolution prompt.
The phase argument is the rebase phase name (lowercase), e.g. "planning"
or "development", derived from the git rebase context. It is NOT a main
pipeline phase — it identifies which rebase phase triggered the conflict.
recovery_epoch is carried for auditing but the rebase handler owns epoch
semantics via PromptCaptured events. Pass 0 from effectful helpers.
The Display output ("{phase}_conflict_resolution") is byte-identical to
the former format!("{}_conflict_resolution", phase.to_lowercase()) calls,
preserving backward-compatibility with existing checkpoint prompt_history maps.
Trait Implementations§
Source§impl Clone for PromptScopeKey
impl Clone for PromptScopeKey
Source§fn clone(&self) -> PromptScopeKey
fn clone(&self) -> PromptScopeKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PromptScopeKey
impl Debug for PromptScopeKey
Source§impl Display for PromptScopeKey
Display implementation producing strings largely backward-compatible with existing checkpoint data.
impl Display for PromptScopeKey
Display implementation producing strings largely backward-compatible with existing checkpoint data.
Output format per phase:
- Planning:
planning_{iter}[_{retry_suffix}] - Development:
development_{iter}[_continuation_{n}][_{retry_suffix}] - Commit:
commit_message_attempt_iter{iter}_{attempt}[_{retry_suffix}](NOTE: includes iteration; this intentionally differs from pre-RFC-007 attempt-only commit keys) - Review:
review_{pass}[_{retry_suffix}] - Fix:
fix_{pass}[_{retry_suffix}]
Retry suffixes:
SameAgent { count }→_same_agent_retry_{count}Xsd { count }→_xsd_retry_{count}
NOTE: recovery_epoch is intentionally excluded from Display to preserve
backward-compatibility with existing checkpoint prompt_history entries.
Source§impl PartialEq for PromptScopeKey
impl PartialEq for PromptScopeKey
impl Eq for PromptScopeKey
impl StructuralPartialEq for PromptScopeKey
Auto Trait Implementations§
impl Freeze for PromptScopeKey
impl RefUnwindSafe for PromptScopeKey
impl Send for PromptScopeKey
impl Sync for PromptScopeKey
impl Unpin for PromptScopeKey
impl UnsafeUnpin for PromptScopeKey
impl UnwindSafe for PromptScopeKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more