Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 26 additions & 10 deletions conformance/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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",
Expand All @@ -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).
Expand Down Expand Up @@ -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()),
}
}
Expand Down Expand Up @@ -334,6 +332,24 @@ impl Driver {
.map_err(|e| Failure(format!("identify: {e}")))
}

async fn step_signal(&self, args: &Map<String, Value>) -> 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<String, Value>) -> Result<(), Failure> {
Expand Down
Loading