···11//! `atproto-devtool test labeler <target>` command.
2233-pub mod create_report;
44-pub mod crypto;
55-pub mod http;
66-pub mod identity;
73pub mod pipeline;
84pub mod report;
99-pub mod subscription;
55+pub mod target;
106117use std::io;
128use std::process::ExitCode;
···1511use clap::Args;
1612use miette::Report;
17131818-use crate::commands::test::labeler::create_report::self_mint::{SelfMintCurve, SelfMintSigner};
1414+use self::{
1515+ pipeline::{
1616+ LabelerOptions,
1717+ create_report::{
1818+ self,
1919+ self_mint::{SelfMintCurve, SelfMintSigner},
2020+ },
2121+ run_pipeline,
2222+ },
2323+ report::RenderConfig,
2424+};
1925use crate::common::{
2026 APP_USER_AGENT,
2127 identity::{Did, RealDnsResolver, RealHttpClient, is_local_labeler_hostname},
2228};
2323-use pipeline::{LabelerOptions, parse_target, run_pipeline};
2424-use report::RenderConfig;
25292630/// Run the labeler conformance suite against a handle, DID, or endpoint URL.
2731#[derive(Debug, Args)]
···9094 pub async fn run(self, no_color: bool) -> Result<ExitCode, Report> {
9195 // Parse the target.
9296 let target =
9393- parse_target(&self.target, self.did.as_deref()).map_err(|e| miette::miette!("{e}"))?;
9797+ target::parse(&self.target, self.did.as_deref()).map_err(|e| miette::miette!("{e}"))?;
94989599 // Determine tentative endpoint for the locality check. When the target is a
96100 // DID or handle, the endpoint is known only after identity stage; for the
97101 // self-mint signer construction we need it now. We construct the signer
98102 // pessimistically (endpoint unknown) only when --force-self-mint is set.
99103 let tentative_endpoint: Option<url::Url> = match &target {
100100- pipeline::LabelerTarget::Endpoint { url, .. } => Some(url.clone()),
101101- pipeline::LabelerTarget::Identified { .. } => None,
104104+ target::LabelerTarget::Endpoint { url, .. } => Some(url.clone()),
105105+ target::LabelerTarget::Identified { .. } => None,
102106 };
103107104108 let tentative_local = tentative_endpoint
+4-3
src/commands/test/labeler/CLAUDE.md
···1717 - `LabelerCmd::run(no_color) -> Result<ExitCode, miette::Report>` (in
1818 `labeler.rs`) — constructs the shared reqwest client and calls
1919 `pipeline::run_pipeline`.
2020- - `pipeline::parse_target(raw, explicit_did) -> LabelerTarget` — the
2020+ - `target::parse(raw, explicit_did) -> LabelerTarget` — the
2121 accepted target grammar is handle, `did:*`, `https://` URL, or
2222 `http://` URL with a local hostname (loopback, RFC 1918, `.local`).
2323 Remote HTTP is rejected with a helpful error; raw endpoints with
2424 no DID simply skip identity/crypto.
2525 - `pipeline::run_pipeline(target, LabelerOptions) -> LabelerReport` — the
2626 one orchestrator that every test hits.
2727-- **Per-stage entry points**: `identity::run`, `http::run`,
2828- `subscription::run`, `crypto::run`, `create_report::run`. Each returns a
2727+- **Per-stage entry points**: `pipeline::identity::run`, `pipeline::http::run`,
2828+ `pipeline::subscription::run`, `pipeline::crypto::run`,
2929+ `pipeline::create_report::run`. Each returns a
2930 `*StageOutput` with an `Option<*Facts>` (populated only when the stage
3031 succeeds enough to let downstream stages run, or `None` when there are no
3132 meaningful facts to carry forward) plus a `Vec<CheckResult>`.