From 0d37a94ebfc8bd0c6b0e6fb5e9f793e369daa616 Mon Sep 17 00:00:00 2001 From: Claw Date: Tue, 30 Jun 2026 22:55:33 -0500 Subject: [PATCH] chore: drop stale scrum-WARN annotations in biometric_endpoint (comments only) Removes dated 'Caught 2026-05-0X ... WARN' inline comments; no code change. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/catalogd/src/biometric_endpoint.rs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/crates/catalogd/src/biometric_endpoint.rs b/crates/catalogd/src/biometric_endpoint.rs index c5f13d0..50a9012 100644 --- a/crates/catalogd/src/biometric_endpoint.rs +++ b/crates/catalogd/src/biometric_endpoint.rs @@ -243,8 +243,7 @@ fn constant_time_eq(a: &[u8], b: &[u8]) -> bool { /// /// The header value MAY include parameters per RFC 9110 §8.3 /// (`image/jpeg; charset=binary`, `image/jpeg; boundary=...`); we -/// strip parameters before matching on the bare media type. Caught -/// 2026-05-03 opus scrum WARN on biometric_endpoint.rs:189. +/// strip parameters before matching on the bare media type. fn extension_from_content_type(ct: Option<&str>) -> Result<&'static str, (StatusCode, &'static str)> { let bare = ct .and_then(|s| s.split(';').next()) @@ -401,7 +400,6 @@ pub async fn process_upload( // and orphans the previous photo file on disk — creating a forever-leak // pattern and a BIPA defensibility hole ("we said we erased the photo, // but the previous version of it is still under the same subject dir"). - // Caught 2026-05-05 by verify_biometric_erasure.sh against WORKER-2. if manifest.biometric_collection.is_some() { return Err((StatusCode::CONFLICT, ErrorResponse { error: "biometric_already_collected", @@ -433,10 +431,10 @@ pub async fn process_upload( let _ = std::fs::set_permissions(&subject_dir, std::fs::Permissions::from_mode(0o700)); } // Filename: timestamp-nanos + 4-byte random suffix to defeat the - // (very unlikely) two-uploads-in-the-same-nanosecond collision the - // 2026-05-03 kimi scrum WARN flagged. uuid::Uuid::new_v4 → use - // first 8 hex chars (32 bits of entropy is enough — collision over - // a per-subject namespace at sub-microsecond cadence is implausible). + // (very unlikely) two-uploads-in-the-same-nanosecond collision. + // uuid::Uuid::new_v4 → first 8 hex chars (32 bits of entropy is + // enough — collision over a per-subject namespace at sub-microsecond + // cadence is implausible). let suffix: String = uuid::Uuid::new_v4().simple().to_string().chars().take(8).collect(); let filename = format!("{}_{}.{}", collected_at.timestamp_nanos_opt().unwrap_or(0), suffix, ext); let abs_path = subject_dir.join(&filename); @@ -451,9 +449,8 @@ pub async fn process_upload( } // Store the path relative to storage_root in the manifest (matches // the BiometricCollection doc-comment: "relative to the configured - // biometric storage root"). Caught 2026-05-03 opus scrum WARN on - // shared/types.rs::BiometricCollection. Operators reading the - // manifest can rebuild the absolute path with their own storage_root. + // biometric storage root"). Operators reading the manifest can + // rebuild the absolute path with their own storage_root. let stored_path = abs_path .strip_prefix(&state.storage_root) .map(|p| p.to_string_lossy().to_string()) @@ -468,7 +465,7 @@ pub async fn process_upload( }); manifest.updated_at = collected_at; - // Transactional commit (Caught 2026-05-03 opus BLOCK + kimi WARN): + // Transactional commit: // // The three side-effects MUST be all-or-nothing for BIPA defensibility: // - photo file on disk @@ -1931,8 +1928,8 @@ mod tests { #[tokio::test] async fn content_type_with_parameters_accepted() { // Real-world clients send `image/jpeg; charset=binary` etc. - // Caught 2026-05-03 opus scrum WARN; regression test ensures - // the bare media type is matched after stripping parameters. + // Regression test ensures the bare media type is matched + // after stripping parameters. let state = fixture_state("ct_with_params").await; // Two distinct subjects so each upload exercises the "first upload" // path. Prior version used one subject and two uploads — now blocked