Expand description
The narrow workspace surface the review-conversation tools call, plus
the production impl on Workspace and a mock for unit tests.
Mirrors crate::mcp::peers::facade: the four Tool impls hold an
Arc<dyn ReviewFacade> so tests drive them with a
MockReviewFacade instead of a live Workspace. resolve_scope
maps the caller to its (project, branch) review scope - project via
the shared crate::mcp::caller_context, branch via a git query on
the callerβs cwd - matching the key the /diff overlay persists under.
Re-exportsΒ§
use std::path::Path;πuse std::path::PathBuf;πuse std::sync::Arc;πuse std::sync::Weak;πuse async_trait::async_trait;πuse forge_primitives::git_diff::RepoGate;πuse crate::SessionSlot;πuse crate::mcp::caller_context::CallerContext;πuse crate::mcp::review::CommentAnchorView;πuse crate::mcp::review::ReviewDetail;πuse crate::mcp::review::ReviewSummary;πuse crate::workspace::Workspace;π
StructsΒ§
- Prod
Review Facade - Production impl over a
Weak<Workspace>(the same cycle-breaking shapecrate::mcp::peers::facade::ProdWorkspaceFacadeuses). - Review
Scope - The callerβs resolved review context.
(project, branch)is the store key both the/diffoverlay and these tools address;author_labelis how areview__replyfrom this caller is attributed in the thread;calleris the session whose turn buffer accumulates the activity so the reviewer gets one batched notice at turn end.
EnumsΒ§
- Scope
Error - Which step of
ReviewFacade::resolve_scopeβs chain failed. One variant per step so the caller-facingSelf::messagestates 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.
TraitsΒ§
- Review
Facade - Narrow surface the review-conversation tools depend on.
resolve_scopeis async (it shells out to git for the branch); the store ops are synchronous over the resolved scope.
FunctionsΒ§
- warn_
unresolved π - The one WARN a failed scope resolution emits, carrying every field that discriminates the failing step. This is the line to reach for when a caller reports it cannot read its reviews.