CLI app for developers prototyping atproto functionality
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add prefixes to `common::report::Stage` constants

+123 -111
+7 -7
src/commands/test/labeler/pipeline.rs
··· 168 168 // HTTP stage blocked by identity failures. 169 169 report.record(blocked_by( 170 170 "http::not_run", 171 - Stage::HTTP, 171 + Stage::LABELER_HTTP, 172 172 "HTTP stage (not run)", 173 173 "identity::target_resolved", 174 174 )); ··· 176 176 // HTTP stage not run because no endpoint could be derived. 177 177 report.record(skipped_with_reason( 178 178 "http::not_run", 179 - Stage::HTTP, 179 + Stage::LABELER_HTTP, 180 180 "HTTP stage (not run)", 181 181 "identity stage produced no labeler endpoint", 182 182 )); ··· 199 199 // Subscription stage blocked by identity failures. 200 200 report.record(blocked_by( 201 201 "subscription::not_run", 202 - Stage::SUBSCRIPTION, 202 + Stage::LABELER_SUBSCRIPTION, 203 203 "Subscription stage (not run)", 204 204 "identity::target_resolved", 205 205 )); ··· 207 207 // Subscription stage not run because no endpoint could be derived. 208 208 report.record(skipped_with_reason( 209 209 "subscription::not_run", 210 - Stage::SUBSCRIPTION, 210 + Stage::LABELER_SUBSCRIPTION, 211 211 "Subscription stage (not run)", 212 212 "identity stage produced no labeler endpoint", 213 213 )); ··· 242 242 } else { 243 243 report.record(skipped_with_reason( 244 244 "crypto::not_run", 245 - Stage::CRYPTO, 245 + Stage::LABELER_CRYPTO, 246 246 "Crypto stage (not run)", 247 247 "neither HTTP nor subscription stage produced labels to verify", 248 248 )); ··· 251 251 // Crypto stage blocked by identity failures. 252 252 report.record(blocked_by( 253 253 "crypto::not_run", 254 - Stage::CRYPTO, 254 + Stage::LABELER_CRYPTO, 255 255 "Crypto stage (not run)", 256 256 "identity::target_resolved", 257 257 )); ··· 259 259 // Crypto stage not run (no identity or no endpoint). 260 260 report.record(skipped_with_reason( 261 261 "crypto::not_run", 262 - Stage::CRYPTO, 262 + Stage::LABELER_CRYPTO, 263 263 "Crypto stage (not run)", 264 264 "identity stage produced no labeler endpoint", 265 265 ));
+5 -5
src/commands/test/labeler/pipeline/create_report.rs
··· 527 527 pub fn pass(self) -> CheckResult { 528 528 CheckResult { 529 529 id: self.id(), 530 - stage: Stage::REPORT, 530 + stage: Stage::LABELER_REPORT, 531 531 status: CheckStatus::Pass, 532 532 summary: Cow::Borrowed(self.default_summary_pass()), 533 533 diagnostic: None, ··· 540 540 pub fn spec_violation(self, diagnostic: CreateReportDiagnostic) -> CheckResult { 541 541 CheckResult { 542 542 id: self.id(), 543 - stage: Stage::REPORT, 543 + stage: Stage::LABELER_REPORT, 544 544 status: CheckStatus::SpecViolation, 545 545 summary: Cow::Borrowed(self.default_summary_fail()), 546 546 diagnostic: Some(Box::new(diagnostic) as _), ··· 552 552 pub fn advisory(self, diagnostic: CreateReportDiagnostic) -> CheckResult { 553 553 CheckResult { 554 554 id: self.id(), 555 - stage: Stage::REPORT, 555 + stage: Stage::LABELER_REPORT, 556 556 status: CheckStatus::Advisory, 557 557 summary: Cow::Borrowed(self.default_summary_fail()), 558 558 diagnostic: Some(Box::new(diagnostic) as _), ··· 564 564 pub fn network_error(self, message: String) -> CheckResult { 565 565 CheckResult { 566 566 id: self.id(), 567 - stage: Stage::REPORT, 567 + stage: Stage::LABELER_REPORT, 568 568 status: CheckStatus::NetworkError, 569 569 summary: Cow::Owned(format!("{}: {message}", self.default_summary_fail())), 570 570 diagnostic: None, ··· 576 576 pub fn skip(self, reason: &'static str) -> CheckResult { 577 577 CheckResult { 578 578 id: self.id(), 579 - stage: Stage::REPORT, 579 + stage: Stage::LABELER_REPORT, 580 580 status: CheckStatus::Skipped, 581 581 summary: Cow::Borrowed(self.default_summary_pass()), 582 582 diagnostic: None,
+5 -5
src/commands/test/labeler/pipeline/crypto.rs
··· 49 49 pub fn pass(self) -> CheckResult { 50 50 CheckResult { 51 51 id: self.id(), 52 - stage: Stage::CRYPTO, 52 + stage: Stage::LABELER_CRYPTO, 53 53 status: CheckStatus::Pass, 54 54 summary: Cow::Borrowed(match self { 55 55 Check::Rollup => "All labels verified with current or historic keys", ··· 66 66 ) -> CheckResult { 67 67 CheckResult { 68 68 id: self.id(), 69 - stage: Stage::CRYPTO, 69 + stage: Stage::LABELER_CRYPTO, 70 70 status: CheckStatus::SpecViolation, 71 71 summary: Cow::Borrowed(match self { 72 72 Check::Rollup => "Labels failed verification", ··· 86 86 ) -> CheckResult { 87 87 CheckResult { 88 88 id: self.id(), 89 - stage: Stage::CRYPTO, 89 + stage: Stage::LABELER_CRYPTO, 90 90 status: CheckStatus::NetworkError, 91 91 summary: Cow::Borrowed(match self { 92 92 Check::PlcHistoryFetch => "PLC history fetch failed", ··· 100 100 pub fn advisory(self) -> CheckResult { 101 101 CheckResult { 102 102 id: self.id(), 103 - stage: Stage::CRYPTO, 103 + stage: Stage::LABELER_CRYPTO, 104 104 status: CheckStatus::Advisory, 105 105 summary: Cow::Borrowed(match self { 106 106 Check::RotatedKeysUsed => "Labels signed by rotated-out key", ··· 114 114 pub fn skip(self, reason: impl Into<Cow<'static, str>>) -> CheckResult { 115 115 CheckResult { 116 116 id: self.id(), 117 - stage: Stage::CRYPTO, 117 + stage: Stage::LABELER_CRYPTO, 118 118 status: CheckStatus::Skipped, 119 119 summary: Cow::Borrowed(match self { 120 120 Check::Rollup => "Crypto stage (no labels to verify)",
+4 -4
src/commands/test/labeler/pipeline/http.rs
··· 50 50 pub fn pass(self) -> CheckResult { 51 51 CheckResult { 52 52 id: self.id(), 53 - stage: Stage::HTTP, 53 + stage: Stage::LABELER_HTTP, 54 54 status: CheckStatus::Pass, 55 55 summary: Cow::Borrowed(match self { 56 56 Check::EndpointReachable => "Labeler endpoint reachability", ··· 70 70 ) -> CheckResult { 71 71 CheckResult { 72 72 id: self.id(), 73 - stage: Stage::HTTP, 73 + stage: Stage::LABELER_HTTP, 74 74 status: CheckStatus::SpecViolation, 75 75 summary: Cow::Borrowed(match self { 76 76 Check::QueryLabelsSchemaFirstPage => "Schema validation failed", ··· 86 86 pub fn network_error(self) -> CheckResult { 87 87 CheckResult { 88 88 id: self.id(), 89 - stage: Stage::HTTP, 89 + stage: Stage::LABELER_HTTP, 90 90 status: CheckStatus::NetworkError, 91 91 summary: Cow::Borrowed(match self { 92 92 Check::EndpointReachable => "Labeler endpoint unreachable", ··· 101 101 pub fn advisory(self) -> CheckResult { 102 102 CheckResult { 103 103 id: self.id(), 104 - stage: Stage::HTTP, 104 + stage: Stage::LABELER_HTTP, 105 105 status: CheckStatus::Advisory, 106 106 summary: Cow::Borrowed(match self { 107 107 Check::QueryLabelsEmptyAdvisory => "Labeler has no published labels",
+5 -5
src/commands/test/labeler/pipeline/identity.rs
··· 345 345 pub fn pass(self) -> CheckResult { 346 346 CheckResult { 347 347 id: self.id(), 348 - stage: Stage::IDENTITY, 348 + stage: Stage::LABELER_IDENTITY, 349 349 status: CheckStatus::Pass, 350 350 summary: Cow::Borrowed(self.summary_str()), 351 351 diagnostic: None, ··· 359 359 ) -> CheckResult { 360 360 CheckResult { 361 361 id: self.id(), 362 - stage: Stage::IDENTITY, 362 + stage: Stage::LABELER_IDENTITY, 363 363 status: CheckStatus::SpecViolation, 364 364 summary: Cow::Borrowed(self.summary_str()), 365 365 diagnostic, ··· 373 373 ) -> CheckResult { 374 374 CheckResult { 375 375 id: self.id(), 376 - stage: Stage::IDENTITY, 376 + stage: Stage::LABELER_IDENTITY, 377 377 status: CheckStatus::NetworkError, 378 378 summary: Cow::Borrowed(self.summary_str()), 379 379 diagnostic, ··· 384 384 pub fn skip(self, reason: impl Into<Cow<'static, str>>) -> CheckResult { 385 385 CheckResult { 386 386 id: self.id(), 387 - stage: Stage::IDENTITY, 387 + stage: Stage::LABELER_IDENTITY, 388 388 status: CheckStatus::Skipped, 389 389 summary: Cow::Borrowed(self.summary_str()), 390 390 diagnostic: None, ··· 398 398 ) -> CheckResult { 399 399 CheckResult { 400 400 id: self.id(), 401 - stage: Stage::IDENTITY, 401 + stage: Stage::LABELER_IDENTITY, 402 402 status: CheckStatus::Advisory, 403 403 summary: Cow::Borrowed(self.summary_str()), 404 404 diagnostic,
+5 -5
src/commands/test/labeler/pipeline/subscription.rs
··· 359 359 use crate::common::report::{CheckStatus, Stage}; 360 360 crate::common::report::CheckResult { 361 361 id: self.id(), 362 - stage: Stage::SUBSCRIPTION, 362 + stage: Stage::LABELER_SUBSCRIPTION, 363 363 status: CheckStatus::Pass, 364 364 summary: std::borrow::Cow::Borrowed(match self { 365 365 Check::Backfill => "Subscription backfill completed", ··· 378 378 use crate::common::report::{CheckStatus, Stage}; 379 379 crate::common::report::CheckResult { 380 380 id: self.id(), 381 - stage: Stage::SUBSCRIPTION, 381 + stage: Stage::LABELER_SUBSCRIPTION, 382 382 status: CheckStatus::SpecViolation, 383 383 summary: std::borrow::Cow::Borrowed(match self { 384 384 Check::FrameDecode => "Subscription frame decode failure", ··· 393 393 use crate::common::report::{CheckStatus, Stage}; 394 394 crate::common::report::CheckResult { 395 395 id: self.id(), 396 - stage: Stage::SUBSCRIPTION, 396 + stage: Stage::LABELER_SUBSCRIPTION, 397 397 status: CheckStatus::NetworkError, 398 398 summary: std::borrow::Cow::Borrowed(match self { 399 399 Check::EndpointReachable => "Subscription endpoint reachability", ··· 409 409 use crate::common::report::{CheckStatus, Stage}; 410 410 crate::common::report::CheckResult { 411 411 id: self.id(), 412 - stage: Stage::SUBSCRIPTION, 412 + stage: Stage::LABELER_SUBSCRIPTION, 413 413 status: CheckStatus::Advisory, 414 414 summary: std::borrow::Cow::Borrowed(match self { 415 415 Check::Backfill => "Subscription backfill advisory", ··· 427 427 use crate::common::report::{CheckStatus, Stage}; 428 428 crate::common::report::CheckResult { 429 429 id: self.id(), 430 - stage: Stage::SUBSCRIPTION, 430 + stage: Stage::LABELER_SUBSCRIPTION, 431 431 status: CheckStatus::Skipped, 432 432 summary: std::borrow::Cow::Borrowed(match self { 433 433 Check::LiveTail => "Subscription live-tail skipped",
+6 -6
src/commands/test/oauth/client/pipeline/discovery.rs
··· 86 86 pub fn pass(self) -> CheckResult { 87 87 CheckResult { 88 88 id: self.id(), 89 - stage: Stage::DISCOVERY, 89 + stage: Stage::OAUTH_CLIENT_DISCOVERY, 90 90 status: crate::common::report::CheckStatus::Pass, 91 91 summary: Cow::Borrowed(match self { 92 92 Check::ClientIdWellFormed => "Client ID well-formed", ··· 105 105 ) -> CheckResult { 106 106 CheckResult { 107 107 id: self.id(), 108 - stage: Stage::DISCOVERY, 108 + stage: Stage::OAUTH_CLIENT_DISCOVERY, 109 109 status: crate::common::report::CheckStatus::SpecViolation, 110 110 summary: Cow::Borrowed(match self { 111 111 Check::ClientIdWellFormed => "Client ID validation failed", ··· 124 124 ) -> CheckResult { 125 125 CheckResult { 126 126 id: self.id(), 127 - stage: Stage::DISCOVERY, 127 + stage: Stage::OAUTH_CLIENT_DISCOVERY, 128 128 status: crate::common::report::CheckStatus::NetworkError, 129 129 summary: Cow::Borrowed(match self { 130 130 Check::ClientIdWellFormed => "Client ID network error", ··· 140 140 pub fn skipped(self, reason: &'static str) -> CheckResult { 141 141 skipped_with_reason( 142 142 self.id(), 143 - Stage::DISCOVERY, 143 + Stage::OAUTH_CLIENT_DISCOVERY, 144 144 match self { 145 145 Check::ClientIdWellFormed => "Client ID well-formed", 146 146 Check::MetadataDocumentFetchable => "Metadata document fetchable", ··· 179 179 results.push(Check::MetadataDocumentFetchable.network_error(Some(diagnostic))); 180 180 results.push(blocked_by( 181 181 Check::MetadataIsJson.id(), 182 - Stage::DISCOVERY, 182 + Stage::OAUTH_CLIENT_DISCOVERY, 183 183 "Metadata is valid JSON", 184 184 Check::MetadataDocumentFetchable.id(), 185 185 )); ··· 197 197 results.push(Check::MetadataDocumentFetchable.network_error(Some(diagnostic))); 198 198 results.push(blocked_by( 199 199 Check::MetadataIsJson.id(), 200 - Stage::DISCOVERY, 200 + Stage::OAUTH_CLIENT_DISCOVERY, 201 201 "Metadata is valid JSON", 202 202 Check::MetadataDocumentFetchable.id(), 203 203 ));
+14 -14
src/commands/test/oauth/client/pipeline/interactive.rs
··· 94 94 pub fn pass(self) -> CheckResult { 95 95 CheckResult { 96 96 id: self.id(), 97 - stage: Stage::INTERACTIVE, 97 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 98 98 status: CheckStatus::Pass, 99 99 summary: Cow::Borrowed(self.summary()), 100 100 diagnostic: None, ··· 110 110 }; 111 111 CheckResult { 112 112 id: self.id(), 113 - stage: Stage::INTERACTIVE, 113 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 114 114 status: CheckStatus::SpecViolation, 115 115 summary: Cow::Borrowed(self.summary()), 116 116 diagnostic: Some(Box::new(diagnostic)), ··· 122 122 pub fn skipped(self, reason: &'static str) -> CheckResult { 123 123 CheckResult { 124 124 id: self.id(), 125 - stage: Stage::INTERACTIVE, 125 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 126 126 status: CheckStatus::Skipped, 127 127 summary: Cow::Borrowed(self.summary()), 128 128 diagnostic: None, ··· 168 168 if static_gating.scope_present != CheckStatus::Pass { 169 169 results.push(blocked_by( 170 170 Check::ClientReachedPar.id(), 171 - Stage::INTERACTIVE, 171 + Stage::OAUTH_CLIENT_INTERACTIVE, 172 172 Check::ClientReachedPar.summary(), 173 173 "oauth_client::metadata::scope_present", 174 174 )); 175 175 results.push(blocked_by( 176 176 Check::ClientUsedPkceS256.id(), 177 - Stage::INTERACTIVE, 177 + Stage::OAUTH_CLIENT_INTERACTIVE, 178 178 Check::ClientUsedPkceS256.summary(), 179 179 "oauth_client::metadata::scope_present", 180 180 )); 181 181 results.push(blocked_by( 182 182 Check::ClientIncludedDpop.id(), 183 - Stage::INTERACTIVE, 183 + Stage::OAUTH_CLIENT_INTERACTIVE, 184 184 Check::ClientIncludedDpop.summary(), 185 185 "oauth_client::metadata::scope_present", 186 186 )); 187 187 results.push(blocked_by( 188 188 Check::ClientCompletedToken.id(), 189 - Stage::INTERACTIVE, 189 + Stage::OAUTH_CLIENT_INTERACTIVE, 190 190 Check::ClientCompletedToken.summary(), 191 191 "oauth_client::metadata::scope_present", 192 192 )); ··· 206 206 if static_gating.dpop_bound_required != CheckStatus::Pass { 207 207 results.push(blocked_by( 208 208 Check::ClientReachedPar.id(), 209 - Stage::INTERACTIVE, 209 + Stage::OAUTH_CLIENT_INTERACTIVE, 210 210 Check::ClientReachedPar.summary(), 211 211 "oauth_client::metadata::dpop_bound_required", 212 212 )); 213 213 results.push(blocked_by( 214 214 Check::ClientUsedPkceS256.id(), 215 - Stage::INTERACTIVE, 215 + Stage::OAUTH_CLIENT_INTERACTIVE, 216 216 Check::ClientUsedPkceS256.summary(), 217 217 "oauth_client::metadata::dpop_bound_required", 218 218 )); 219 219 results.push(blocked_by( 220 220 Check::ClientIncludedDpop.id(), 221 - Stage::INTERACTIVE, 221 + Stage::OAUTH_CLIENT_INTERACTIVE, 222 222 Check::ClientIncludedDpop.summary(), 223 223 "oauth_client::metadata::dpop_bound_required", 224 224 )); 225 225 results.push(blocked_by( 226 226 Check::ClientCompletedToken.id(), 227 - Stage::INTERACTIVE, 227 + Stage::OAUTH_CLIENT_INTERACTIVE, 228 228 Check::ClientCompletedToken.summary(), 229 229 "oauth_client::metadata::dpop_bound_required", 230 230 )); ··· 247 247 // ClientCompletedToken is blocked by keys_have_alg. 248 248 results.push(blocked_by( 249 249 Check::ClientCompletedToken.id(), 250 - Stage::INTERACTIVE, 250 + Stage::OAUTH_CLIENT_INTERACTIVE, 251 251 Check::ClientCompletedToken.summary(), 252 252 "oauth_client::jws::keys_have_alg", 253 253 )); ··· 483 483 for check_id in scope_check_ids { 484 484 results.push(blocked_by( 485 485 check_id, 486 - Stage::INTERACTIVE, 486 + Stage::OAUTH_CLIENT_INTERACTIVE, 487 487 "Scope variation flows", 488 488 blocking_check, 489 489 )); ··· 529 529 for check_id in dpop_check_ids { 530 530 results.push(blocked_by( 531 531 check_id, 532 - Stage::INTERACTIVE, 532 + Stage::OAUTH_CLIENT_INTERACTIVE, 533 533 "DPoP edge case flows", 534 534 blocking_check, 535 535 ));
+3 -3
src/commands/test/oauth/client/pipeline/interactive/dpop_edges.rs
··· 80 80 pub fn pass(self) -> CheckResult { 81 81 CheckResult { 82 82 id: self.id(), 83 - stage: Stage::INTERACTIVE, 83 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 84 84 status: CheckStatus::Pass, 85 85 summary: Cow::Borrowed(self.summary()), 86 86 diagnostic: None, ··· 96 96 }; 97 97 CheckResult { 98 98 id: self.id(), 99 - stage: Stage::INTERACTIVE, 99 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 100 100 status: CheckStatus::SpecViolation, 101 101 summary: Cow::Borrowed(self.summary()), 102 102 diagnostic: Some(Box::new(diagnostic)), ··· 108 108 pub fn skipped(self, reason: &'static str) -> CheckResult { 109 109 CheckResult { 110 110 id: self.id(), 111 - stage: Stage::INTERACTIVE, 111 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 112 112 status: CheckStatus::Skipped, 113 113 summary: Cow::Borrowed(self.summary()), 114 114 diagnostic: None,
+3 -3
src/commands/test/oauth/client/pipeline/interactive/scope_variations.rs
··· 85 85 pub fn pass(self) -> CheckResult { 86 86 CheckResult { 87 87 id: self.id(), 88 - stage: Stage::INTERACTIVE, 88 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 89 89 status: CheckStatus::Pass, 90 90 summary: Cow::Borrowed(self.summary()), 91 91 diagnostic: None, ··· 101 101 }; 102 102 CheckResult { 103 103 id: self.id(), 104 - stage: Stage::INTERACTIVE, 104 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 105 105 status: CheckStatus::SpecViolation, 106 106 summary: Cow::Borrowed(self.summary()), 107 107 diagnostic: Some(Box::new(diagnostic)), ··· 113 113 pub fn skipped(self, reason: &'static str) -> CheckResult { 114 114 CheckResult { 115 115 id: self.id(), 116 - stage: Stage::INTERACTIVE, 116 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 117 117 status: CheckStatus::Skipped, 118 118 summary: Cow::Borrowed(self.summary()), 119 119 diagnostic: None,
+14 -9
src/commands/test/oauth/client/pipeline/jwks.rs
··· 169 169 pub fn pass(self) -> CheckResult { 170 170 CheckResult { 171 171 id: self.id(), 172 - stage: Stage::JWKS, 172 + stage: Stage::OAUTH_CLIENT_JWKS, 173 173 status: CheckStatus::Pass, 174 174 summary: Cow::Borrowed(self.summary()), 175 175 diagnostic: None, ··· 181 181 pub fn skipped(self, reason: impl Into<Cow<'static, str>>) -> CheckResult { 182 182 CheckResult { 183 183 id: self.id(), 184 - stage: Stage::JWKS, 184 + stage: Stage::OAUTH_CLIENT_JWKS, 185 185 status: CheckStatus::Skipped, 186 186 summary: Cow::Borrowed(self.summary()), 187 187 diagnostic: None, ··· 196 196 ) -> CheckResult { 197 197 CheckResult { 198 198 id: self.id(), 199 - stage: Stage::JWKS, 199 + stage: Stage::OAUTH_CLIENT_JWKS, 200 200 status: CheckStatus::NetworkError, 201 201 summary: Cow::Borrowed(self.summary()), 202 202 diagnostic: Some(diagnostic), ··· 211 211 ) -> CheckResult { 212 212 CheckResult { 213 213 id: self.id(), 214 - stage: Stage::JWKS, 214 + stage: Stage::OAUTH_CLIENT_JWKS, 215 215 status: CheckStatus::SpecViolation, 216 216 summary: Cow::Borrowed(self.summary()), 217 217 diagnostic: Some(diagnostic), ··· 243 243 let results = checks 244 244 .iter() 245 245 .map(|&check| { 246 - crate::common::report::blocked_by(check.id(), Stage::JWKS, check.summary(), blocker_id) 246 + crate::common::report::blocked_by( 247 + check.id(), 248 + Stage::OAUTH_CLIENT_JWKS, 249 + check.summary(), 250 + blocker_id, 251 + ) 247 252 }) 248 253 .collect(); 249 254 ··· 364 369 ] { 365 370 results.push(crate::common::report::blocked_by( 366 371 check.id(), 367 - Stage::JWKS, 372 + Stage::OAUTH_CLIENT_JWKS, 368 373 check.summary(), 369 374 Check::JwksUriFetchable.id(), 370 375 )); ··· 396 401 ] { 397 402 results.push(crate::common::report::blocked_by( 398 403 check.id(), 399 - Stage::JWKS, 404 + Stage::OAUTH_CLIENT_JWKS, 400 405 check.summary(), 401 406 Check::JwksUriFetchable.id(), 402 407 )); ··· 439 444 ] { 440 445 results.push(crate::common::report::blocked_by( 441 446 check.id(), 442 - Stage::JWKS, 447 + Stage::OAUTH_CLIENT_JWKS, 443 448 check.summary(), 444 449 Check::JwksIsJson.id(), 445 450 )); ··· 469 474 ] { 470 475 results.push(crate::common::report::blocked_by( 471 476 check.id(), 472 - Stage::JWKS, 477 + Stage::OAUTH_CLIENT_JWKS, 473 478 check.summary(), 474 479 Check::JwksIsJson.id(), 475 480 ));
+20 -13
src/commands/test/oauth/client/pipeline/metadata.rs
··· 381 381 pub fn pass(self) -> CheckResult { 382 382 CheckResult { 383 383 id: self.id(), 384 - stage: Stage::METADATA, 384 + stage: Stage::OAUTH_CLIENT_METADATA, 385 385 status: CheckStatus::Pass, 386 386 summary: Cow::Borrowed(self.summary()), 387 387 diagnostic: None, ··· 396 396 ) -> CheckResult { 397 397 CheckResult { 398 398 id: self.id(), 399 - stage: Stage::METADATA, 399 + stage: Stage::OAUTH_CLIENT_METADATA, 400 400 status: CheckStatus::SpecViolation, 401 401 summary: Cow::Borrowed(self.summary()), 402 402 diagnostic, ··· 441 441 let results = CHECK_ALL 442 442 .iter() 443 443 .copied() 444 - .map(|c| blocked_by(c.id(), Stage::METADATA, c.summary(), blocker_check_id)) 444 + .map(|c| { 445 + blocked_by( 446 + c.id(), 447 + Stage::OAUTH_CLIENT_METADATA, 448 + c.summary(), 449 + blocker_check_id, 450 + ) 451 + }) 445 452 .collect(); 446 453 MetadataStageOutput { 447 454 facts: None, ··· 462 469 for check in CHECK_ALL { 463 470 results.push(skipped_with_reason( 464 471 check.id(), 465 - Stage::METADATA, 472 + Stage::OAUTH_CLIENT_METADATA, 466 473 check.summary(), 467 474 "metadata is implicit for loopback clients", 468 475 )); ··· 506 513 for check in CHECK_ALL.iter().skip(1) { 507 514 results.push(blocked_by( 508 515 check.id(), 509 - Stage::METADATA, 516 + Stage::OAUTH_CLIENT_METADATA, 510 517 check.summary(), 511 518 Check::RawDocumentDeserializes.id(), 512 519 )); ··· 593 600 // Skip ApplicationTypeKnown as blocked. 594 601 results.push(blocked_by( 595 602 Check::ApplicationTypeKnown.id(), 596 - Stage::METADATA, 603 + Stage::OAUTH_CLIENT_METADATA, 597 604 Check::ApplicationTypeKnown.summary(), 598 605 Check::ApplicationTypePresent.id(), 599 606 )); ··· 701 708 // Skip these checks as blocked. 702 709 results.push(blocked_by( 703 710 Check::RedirectUrisShape.id(), 704 - Stage::METADATA, 711 + Stage::OAUTH_CLIENT_METADATA, 705 712 Check::RedirectUrisShape.summary(), 706 713 Check::ApplicationTypeKnown.id(), 707 714 )); 708 715 results.push(blocked_by( 709 716 Check::TokenEndpointAuthMethodValid.id(), 710 - Stage::METADATA, 717 + Stage::OAUTH_CLIENT_METADATA, 711 718 Check::TokenEndpointAuthMethodValid.summary(), 712 719 Check::ApplicationTypeKnown.id(), 713 720 )); 714 721 results.push(blocked_by( 715 722 Check::ConfidentialRequiresJwks.id(), 716 - Stage::METADATA, 723 + Stage::OAUTH_CLIENT_METADATA, 717 724 Check::ConfidentialRequiresJwks.summary(), 718 725 Check::ApplicationTypeKnown.id(), 719 726 )); 720 727 results.push(blocked_by( 721 728 Check::PublicForbidsJwks.id(), 722 - Stage::METADATA, 729 + Stage::OAUTH_CLIENT_METADATA, 723 730 Check::PublicForbidsJwks.summary(), 724 731 Check::ApplicationTypeKnown.id(), 725 732 )); ··· 885 892 results.push(Check::ScopePresent.spec_violation(None)); 886 893 results.push(blocked_by( 887 894 Check::ScopeIncludesAtproto.id(), 888 - Stage::METADATA, 895 + Stage::OAUTH_CLIENT_METADATA, 889 896 Check::ScopeIncludesAtproto.summary(), 890 897 Check::ScopePresent.id(), 891 898 )); 892 899 results.push(blocked_by( 893 900 Check::ScopeGrammarValid.id(), 894 - Stage::METADATA, 901 + Stage::OAUTH_CLIENT_METADATA, 895 902 Check::ScopeGrammarValid.summary(), 896 903 Check::ScopePresent.id(), 897 904 )); ··· 910 917 // Parse failed: block ScopeIncludesAtproto by grammar check. 911 918 results.push(blocked_by( 912 919 Check::ScopeIncludesAtproto.id(), 913 - Stage::METADATA, 920 + Stage::OAUTH_CLIENT_METADATA, 914 921 Check::ScopeIncludesAtproto.summary(), 915 922 Check::ScopeGrammarValid.id(), 916 923 ));
+29 -29
src/common/report.rs
··· 92 92 /// results. If a future refactor ever interleaves results across stages, the 93 93 /// render loop will need an explicit stage-order-preserving grouping pass. 94 94 #[derive(Debug, Clone, Copy, PartialEq, Eq)] 95 - pub struct Stage(pub &'static str); 95 + pub struct Stage(&'static str); 96 96 97 97 impl Stage { 98 98 /// Human-readable heading for this stage. ··· 100 100 self.0 101 101 } 102 102 103 - // Labeler stages (unchanged rendered labels). 104 - pub const IDENTITY: Stage = Stage("Identity"); 105 - pub const HTTP: Stage = Stage("HTTP"); 106 - pub const SUBSCRIPTION: Stage = Stage("Subscription"); 107 - pub const CRYPTO: Stage = Stage("Crypto"); 108 - pub const REPORT: Stage = Stage("Report"); 103 + // Labeler stages. 104 + pub const LABELER_IDENTITY: Stage = Stage("Identity"); 105 + pub const LABELER_HTTP: Stage = Stage("HTTP"); 106 + pub const LABELER_SUBSCRIPTION: Stage = Stage("Subscription"); 107 + pub const LABELER_CRYPTO: Stage = Stage("Crypto"); 108 + pub const LABELER_REPORT: Stage = Stage("Report"); 109 109 110 - // OAuth client stages. Consumed by Phase 3+. 111 - pub const DISCOVERY: Stage = Stage("Discovery"); 112 - pub const METADATA: Stage = Stage("Metadata"); 113 - pub const JWKS: Stage = Stage("JWKS"); 114 - pub const INTERACTIVE: Stage = Stage("Interactive"); 110 + // OAuth client stages. 111 + pub const OAUTH_CLIENT_DISCOVERY: Stage = Stage("Discovery"); 112 + pub const OAUTH_CLIENT_METADATA: Stage = Stage("Metadata"); 113 + pub const OAUTH_CLIENT_JWKS: Stage = Stage("JWKS"); 114 + pub const OAUTH_CLIENT_INTERACTIVE: Stage = Stage("Interactive"); 115 115 } 116 116 117 117 /// Summary counts of check results by severity. ··· 374 374 let mut report = LabelerReport::new(header); 375 375 report.record(CheckResult { 376 376 id: "test", 377 - stage: Stage::IDENTITY, 377 + stage: Stage::LABELER_IDENTITY, 378 378 status: CheckStatus::Advisory, 379 379 summary: "advisory check".into(), 380 380 diagnostic: None, ··· 394 394 let mut report = LabelerReport::new(header); 395 395 report.record(CheckResult { 396 396 id: "test", 397 - stage: Stage::IDENTITY, 397 + stage: Stage::LABELER_IDENTITY, 398 398 status: CheckStatus::NetworkError, 399 399 summary: "network check".into(), 400 400 diagnostic: None, ··· 414 414 let mut report = LabelerReport::new(header); 415 415 report.record(CheckResult { 416 416 id: "net", 417 - stage: Stage::IDENTITY, 417 + stage: Stage::LABELER_IDENTITY, 418 418 status: CheckStatus::NetworkError, 419 419 summary: "network check".into(), 420 420 diagnostic: None, ··· 422 422 }); 423 423 report.record(CheckResult { 424 424 id: "spec", 425 - stage: Stage::IDENTITY, 425 + stage: Stage::LABELER_IDENTITY, 426 426 status: CheckStatus::SpecViolation, 427 427 summary: "spec check".into(), 428 428 diagnostic: None, ··· 442 442 let mut report = LabelerReport::new(header); 443 443 report.record(CheckResult { 444 444 id: "test", 445 - stage: Stage::IDENTITY, 445 + stage: Stage::LABELER_IDENTITY, 446 446 status: CheckStatus::SpecViolation, 447 447 summary: "spec check".into(), 448 448 diagnostic: None, ··· 463 463 464 464 report.record(CheckResult { 465 465 id: "test1", 466 - stage: Stage::IDENTITY, 466 + stage: Stage::LABELER_IDENTITY, 467 467 status: CheckStatus::Pass, 468 468 summary: "pass check".into(), 469 469 diagnostic: None, ··· 472 472 473 473 report.record(CheckResult { 474 474 id: "test2", 475 - stage: Stage::IDENTITY, 475 + stage: Stage::LABELER_IDENTITY, 476 476 status: CheckStatus::SpecViolation, 477 477 summary: "fail check".into(), 478 478 diagnostic: None, ··· 481 481 482 482 report.record(CheckResult { 483 483 id: "test3", 484 - stage: Stage::HTTP, 484 + stage: Stage::LABELER_HTTP, 485 485 status: CheckStatus::NetworkError, 486 486 summary: "net check".into(), 487 487 diagnostic: None, ··· 490 490 491 491 report.record(CheckResult { 492 492 id: "test4", 493 - stage: Stage::HTTP, 493 + stage: Stage::LABELER_HTTP, 494 494 status: CheckStatus::Advisory, 495 495 summary: "warn check".into(), 496 496 diagnostic: None, ··· 499 499 500 500 report.record(CheckResult { 501 501 id: "test5", 502 - stage: Stage::SUBSCRIPTION, 502 + stage: Stage::LABELER_SUBSCRIPTION, 503 503 status: CheckStatus::Skipped, 504 504 summary: "skip check".into(), 505 505 diagnostic: None, ··· 526 526 527 527 report.record(CheckResult { 528 528 id: "test1", 529 - stage: Stage::IDENTITY, 529 + stage: Stage::LABELER_IDENTITY, 530 530 status: CheckStatus::Pass, 531 531 summary: "pass check".into(), 532 532 diagnostic: None, ··· 535 535 536 536 report.record(CheckResult { 537 537 id: "test2", 538 - stage: Stage::IDENTITY, 538 + stage: Stage::LABELER_IDENTITY, 539 539 status: CheckStatus::SpecViolation, 540 540 summary: "fail check".into(), 541 541 diagnostic: None, ··· 544 544 545 545 report.record(CheckResult { 546 546 id: "test3", 547 - stage: Stage::HTTP, 547 + stage: Stage::LABELER_HTTP, 548 548 status: CheckStatus::Skipped, 549 549 summary: "skip check".into(), 550 550 diagnostic: None, ··· 615 615 let mut report = LabelerReport::new(header); 616 616 report.record(CheckResult { 617 617 id: "test1", 618 - stage: Stage::IDENTITY, 618 + stage: Stage::LABELER_IDENTITY, 619 619 status: CheckStatus::Pass, 620 620 summary: "pass check".into(), 621 621 diagnostic: None, ··· 638 638 fn blocked_by_produces_correct_reason() { 639 639 let result = blocked_by( 640 640 "http::endpoint_reachable", 641 - Stage::HTTP, 641 + Stage::LABELER_HTTP, 642 642 "Endpoint reachable (not run)", 643 643 "identity::target_resolved", 644 644 ); 645 645 assert_eq!(result.id, "http::endpoint_reachable"); 646 - assert_eq!(result.stage, Stage::HTTP); 646 + assert_eq!(result.stage, Stage::LABELER_HTTP); 647 647 assert_eq!(result.status, CheckStatus::Skipped); 648 648 assert_eq!( 649 649 result.skipped_reason.as_deref(), ··· 655 655 fn skipped_with_reason_produces_exact_reason_string() { 656 656 let result = skipped_with_reason( 657 657 "oauth_client::discovery::metadata_document_fetchable", 658 - Stage::DISCOVERY, 658 + Stage::OAUTH_CLIENT_DISCOVERY, 659 659 "Metadata document fetchable", 660 660 "metadata is implicit for loopback clients", 661 661 );
+1 -1
tests/oauth_client_ac_coverage.rs
··· 158 158 for result in &output.results { 159 159 assert_eq!( 160 160 result.stage, 161 - Stage::INTERACTIVE, 161 + Stage::OAUTH_CLIENT_INTERACTIVE, 162 162 "interactive::run must only emit Stage::INTERACTIVE rows; got {:?} for {}", 163 163 result.stage, 164 164 result.id,
+2 -2
tests/oauth_client_endtoend.rs
··· 184 184 // Record some advisory and skipped results. 185 185 report.record(CheckResult { 186 186 id: "test::advisory", 187 - stage: Stage::INTERACTIVE, 187 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 188 188 status: CheckStatus::Advisory, 189 189 summary: Cow::Borrowed("Test advisory"), 190 190 diagnostic: None, ··· 193 193 194 194 report.record(CheckResult { 195 195 id: "test::skipped", 196 - stage: Stage::INTERACTIVE, 196 + stage: Stage::OAUTH_CLIENT_INTERACTIVE, 197 197 status: CheckStatus::Skipped, 198 198 summary: Cow::Borrowed("Test skipped"), 199 199 diagnostic: None,