From 6d0a0dfe2e7747570058a3dffd695eea7e766160 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 05:38:16 +0000 Subject: [PATCH] conformance: map signal step to public track_signal API (DEV-1201) Co-Authored-By: bot_apk --- .github/workflows/conformance.yml | 2 +- conformance/src/main.rs | 36 ++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 7d3d17a..1f1b600 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -74,7 +74,7 @@ env: CARGO_TERM_COLOR: always # invisible-tools/raindrop-sdk-harness — see "Harness pin" in the header. HARNESS_REPO: invisible-tools/raindrop-sdk-harness - HARNESS_REF: 98163c965d3f08b845fda8c68bdc3531e8461b2e # main @ 2026-07-13 (31 scenarios incl. expect.traces vocabulary + wrap-capture-attachments) + HARNESS_REF: cf744e9c53185c1fd6c350888f64a016b46a10a3 # main @ 2026-07-14 (signal capability active + signal scenarios, DEV-1201) SERVER_URL: http://127.0.0.1:8787 # Driver binary produced by `cargo build --manifest-path conformance/Cargo.toml`. # conformance/ is a standalone bin crate outside the workspace that depends on diff --git a/conformance/src/main.rs b/conformance/src/main.rs index f90c8de..e10f895 100644 --- a/conformance/src/main.rs +++ b/conformance/src/main.rs @@ -29,7 +29,7 @@ use time::OffsetDateTime; use raindrop::{ AiEvent, Attachment, BeginOptions, Client, Event, FinishOptions, Interaction, PatchOptions, - User, + Signal, User, }; const DRIVER_VERSION: &str = "1.0.0"; @@ -44,13 +44,10 @@ const SDK_NAME: &str = "raindrop-rust"; /// * `events.track_partial` — `Client::begin` / `Interaction::patch` / /// `Interaction::finish`. /// * `identify` — `Client::identify`. -/// -/// Omitted deliberately: -/// -/// * `signal` — the `signal` step is out of scope for this driver (DEV-1145), -/// so it is reported unsupported (exit 3) rather than implemented. An -/// omitted key is neither supported nor structurally not-applicable, so the -/// runner skips scenarios that require it. +/// * `signal` — `Client::track_signal` (DEV-1201): the step's +/// event_id/name land on signals/track as +/// event_id/signal_name with signal_type defaulting +/// to "default". const CAPABILITIES: &[&str] = &[ "events.track", "events.track_ai", @@ -60,6 +57,7 @@ const CAPABILITIES: &[&str] = &[ "events.track_ai_partial", "events.track_partial", "identify", + "signal", ]; const NOT_APPLICABLE: &[&str] = &["wrapper.capture"]; // A not_applicable claim must argue "not fixable" (README policy). @@ -222,10 +220,10 @@ impl Driver { "patch" => self.step_patch(&args).await.map_err(StepError::from), "finish" => self.step_finish(&args).await.map_err(StepError::from), "identify" => self.step_identify(&args).await.map_err(StepError::from), + "signal" => self.step_signal(&args).await.map_err(StepError::from), "flush" => self.step_flush().await.map_err(StepError::from), "close" => self.step_close().await.map_err(StepError::from), - // `signal` (capability deliberately not advertised) and anything - // unknown take the exit-3 unsupported path. + // Anything unknown takes the exit-3 unsupported path. other => Err(Unsupported(other.to_string()).into()), } } @@ -334,6 +332,24 @@ impl Driver { .map_err(|e| Failure(format!("identify: {e}"))) } + async fn step_signal(&self, args: &Map) -> Result<(), Failure> { + let signal = Signal { + event_id: required_str(args, "event_id", "signal")?, + name: required_str(args, "name", "signal")?, + kind: optional_str(args, "signal_type"), + sentiment: optional_str(args, "sentiment"), + timestamp: timestamp(args, "signal")?, + properties: properties(args, "properties"), + attachment_id: optional_str(args, "attachment_id"), + comment: optional_str(args, "comment"), + after: optional_str(args, "after"), + }; + self.client()? + .track_signal(signal) + .await + .map_err(|e| Failure(format!("signal: {e}"))) + } + // -- partial (begin/patch/finish) lifecycle ---------------------------- // async fn step_begin(&mut self, args: &Map) -> Result<(), Failure> {