pub enum ScopeError {
WorkspaceGone,
UnknownCaller,
SessionCwdUnknown,
ScanDirMissing {
scan_cwd: PathBuf,
},
NoBranchFromGit {
scan_cwd: PathBuf,
gate: RepoGate,
},
DetachedHead {
scan_cwd: PathBuf,
},
}Expand description
Which step of ReviewFacade::resolve_scope’s chain failed. One
variant per step so the caller-facing Self::message states only
what was observed: the prior single string asserted a detached HEAD
for every failure, and workers chased their own HEAD over a step that
had failed earlier.
Variants§
WorkspaceGone
The workspace is gone (forge shutting down mid-call).
UnknownCaller
The caller’s session isn’t registered under any loaded project.
SessionCwdUnknown
The caller’s project resolved, but the workspace holds no cwd for the session.
ScanDirMissing
The checkout forge derived for this session isn’t on disk.
NoBranchFromGit
The dir is there but git reported no branch for it. git rev-parse exits 128 both for a non-work-tree and for its own
failures; the scanner separates them with a repo-existence
probe, so gate distinguishes a genuine non-repo
(NotARepo) from a sick scanner (ScannerFailed) rather than
just recording that git said nothing usable.
DetachedHead
The inspected checkout is a repo, on a detached HEAD.
Implementations§
Source§impl ScopeError
impl ScopeError
Sourcefn step(&self) -> &'static str
fn step(&self) -> &'static str
The failing step. Filter the WARN by field, not by bare name -
grep '"event_name":"review_scope_unresolved"'; the plain name
also matches the log’s record of the command that greps for it.
Sourcefn scan_cwd(&self) -> Option<&Path>
fn scan_cwd(&self) -> Option<&Path>
The checkout the git step inspected, for the steps that got that far.
Sourcefn gate(&self) -> Option<RepoGate>
fn gate(&self) -> Option<RepoGate>
What git reported at the branch read, for the WARN line. None
for the steps that never got to git.
Sourcepub fn message(&self) -> String
pub fn message(&self) -> String
What the tool tells the caller. Each states the observation and
stops; only Self::DetachedHead mentions a detached HEAD, and
every path-bearing variant names the checkout it inspected.
Trait Implementations§
Source§impl Clone for ScopeError
impl Clone for ScopeError
Source§impl Debug for ScopeError
impl Debug for ScopeError
impl Eq for ScopeError
Source§impl PartialEq for ScopeError
impl PartialEq for ScopeError
impl StructuralPartialEq for ScopeError
Auto Trait Implementations§
impl Freeze for ScopeError
impl RefUnwindSafe for ScopeError
impl Send for ScopeError
impl Sync for ScopeError
impl Unpin for ScopeError
impl UnsafeUnpin for ScopeError
impl UnwindSafe for ScopeError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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