refactor(desktop): drop dead revision helper superseded by /revision endpoint

The current_workflow_revision helper in desktop trigger_workflow was
referenced only from #[cfg(test)] workflows_tests.rs after the exact
signed-revision binding moved server-side behind the authenticated
/workflows/{id}/revision endpoint, leaving a dead-code lint risk in
non-test desktop builds. Remove the helper and its unit test.

Co-authored-by: Wakko <0999168a3b1a4dabdf398cf43ba2893bb29b74dc06d0b31c2d3b51dbebea1612@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
This commit is contained in:
Logan Johnson
2026-08-25 10:04:37 -04:00
parent 83be4ed5d3
commit ea25c1b38a
2 changed files with 0 additions and 21 deletions

View File

@@ -377,13 +377,6 @@ pub async fn deny_approval(
// ── Helpers (pure, unit-tested in workflows_tests.rs) ─────────────────────────
fn current_workflow_revision(events: &[nostr::Event]) -> Result<String, String> {
events
.first()
.map(|event| event.id.to_hex())
.ok_or_else(|| "workflow not found".to_string())
}
fn trigger_wire_from_message(
workflow_id: String,
message: &str,

View File

@@ -273,20 +273,6 @@ fn channel_workflow_filters_accepts_empty_input() {
);
}
#[test]
fn trigger_command_uses_current_definition_event_id() {
let event = wf_event(WF, CHAN, YAML);
let revision = event.id.to_hex();
assert_eq!(
current_workflow_revision(std::slice::from_ref(&event)).as_deref(),
Ok(revision.as_str())
);
assert_eq!(
current_workflow_revision(&[]).expect_err("empty result must fail"),
"workflow not found"
);
}
#[test]
fn trigger_response_uses_persisted_run_id_contract() {
let wire = trigger_wire_from_message(