MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / triage_review

Function triage_review

atomic-cli/src/commands/rpc.rs:7398–7423  ·  view source on GitHub ↗

`triage review` over GenerateTriageReview — the full report bundle (the verdict, findings, intents, criteria, changes, walkthrough), versioned `atomic.triage.report.v1`, so the CLI renders the same report over the service as the local builder produced.

(
    args: &super::triage::TriageReview,
)

Source from the content-addressed store, hash-verified

7396/// `atomic.triage.report.v1`, so the CLI renders the same report over the
7397/// service as the local builder produced.
7398pub(crate) fn triage_review(
7399 args: &super::triage::TriageReview,
7400) -> CliResult<Option<atomic_repository::triage::TriageReport>> {
7401 let Some(session) = Service::open()? else {
7402 return Ok(None);
7403 };
7404 let request = pb::GenerateTriageReviewRequest {
7405 repository: Some(session.reference.clone()),
7406 from_view: args.feature.clone().unwrap_or_default(),
7407 to_view: args.into.clone().unwrap_or_default(),
7408 report: None,
7409 };
7410 let response = session.generate_triage_review(request)?;
7411 let Some(bundle) = response
7412 .report
7413 .as_ref()
7414 .filter(|bytes| bytes.schema == "atomic.triage.report.v1")
7415 else {
7416 return Err(CliError::Internal(anyhow::anyhow!(
7417 "the service returned no triage report bundle"
7418 )));
7419 };
7420 let report = serde_json::from_slice(&bundle.payload)
7421 .map_err(|e| CliError::Internal(anyhow::anyhow!("the wire report does not parse: {e}")))?;
7422 Ok(Some(report))
7423}
7424
7425/// One wire tag → the domain record shape the local render functions
7426/// consume (name, view, sequence, state, timestamp, annotation, kind,

Callers 1

runMethod · 0.85

Calls 4

openFunction · 0.85
as_refMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected