Compare commits

..
Author SHA1 Message Date
dependabot[bot] cc7ebc030d ci(deps): bump the actions group across 1 directory with 4 updates
Bumps the actions group with 4 updates in the / directory: [step-security/harden-runner](https://github.com/step-security/harden-runner), [storytold/craft-common-actions/actions/rust-channel](https://github.com/storytold/craft-common-actions), [storytold/craft-common-actions/.github/workflows/nightly-release.yml](https://github.com/storytold/craft-common-actions) and [storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml](https://github.com/storytold/craft-common-actions).


Updates `step-security/harden-runner` from 2.22.4 to 2.23.0
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/1d88384fd173af6ecb012dfd0264a306b711241a...aebdcf6156ab6691adf63218240e476564a1ed4c)

Updates `storytold/craft-common-actions/actions/rust-channel` from f5141455aac7b2eb4708aa259d8ffcdf10fde939 to 4ec2a14646b538253fd5ebe109bf463a3d31b061
- [Commits](https://github.com/storytold/craft-common-actions/compare/f5141455aac7b2eb4708aa259d8ffcdf10fde939...4ec2a14646b538253fd5ebe109bf463a3d31b061)

Updates `storytold/craft-common-actions/.github/workflows/nightly-release.yml` from be00e5ccd18b68e950c8a08532f2230e7c3d0cba to 4ec2a14646b538253fd5ebe109bf463a3d31b061
- [Commits](https://github.com/storytold/craft-common-actions/compare/be00e5ccd18b68e950c8a08532f2230e7c3d0cba...4ec2a14646b538253fd5ebe109bf463a3d31b061)

Updates `storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml` from be00e5ccd18b68e950c8a08532f2230e7c3d0cba to 4ec2a14646b538253fd5ebe109bf463a3d31b061
- [Commits](https://github.com/storytold/craft-common-actions/compare/be00e5ccd18b68e950c8a08532f2230e7c3d0cba...4ec2a14646b538253fd5ebe109bf463a3d31b061)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: storytold/craft-common-actions/.github/workflows/nightly-release.yml
  dependency-version: 1754016e67ca9b74dfa4cf4678b2ac3548e9840f
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml
  dependency-version: 1754016e67ca9b74dfa4cf4678b2ac3548e9840f
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: storytold/craft-common-actions/actions/rust-channel
  dependency-version: 1754016e67ca9b74dfa4cf4678b2ac3548e9840f
  dependency-type: direct:production
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-26 11:06:49 +00:00
8 changed files with 28 additions and 81 deletions
+4 -4
View File
@@ -36,7 +36,7 @@ jobs:
RUST_BACKTRACE: 1
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -118,7 +118,7 @@ jobs:
RUST_BACKTRACE: 1
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -207,14 +207,14 @@ jobs:
RUST_BACKTRACE: 1
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: rust
uses: storytold/craft-common-actions/actions/rust-channel@f5141455aac7b2eb4708aa259d8ffcdf10fde939
uses: storytold/craft-common-actions/actions/rust-channel@4ec2a14646b538253fd5ebe109bf463a3d31b061
with:
targets: aarch64-apple-darwin
- uses: step-security/dtolnay-rust-toolchain@8dd607977d06adf4ed49b190381e74c17a9dd25f # v1.0.0
+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
checks: read
attestations: write
id-token: write
uses: storytold/craft-common-actions/.github/workflows/nightly-release.yml@be00e5ccd18b68e950c8a08532f2230e7c3d0cba
uses: storytold/craft-common-actions/.github/workflows/nightly-release.yml@4ec2a14646b538253fd5ebe109bf463a3d31b061
with:
tooling-revision: be00e5ccd18b68e950c8a08532f2230e7c3d0cba
app-name: soundcraft
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
actions: read
attestations: write
id-token: write
uses: storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml@be00e5ccd18b68e950c8a08532f2230e7c3d0cba
uses: storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml@4ec2a14646b538253fd5ebe109bf463a3d31b061
with:
tooling-revision: be00e5ccd18b68e950c8a08532f2230e7c3d0cba
app-name: soundcraft
+2 -2
View File
@@ -28,7 +28,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -61,7 +61,7 @@ jobs:
contents: read
steps:
- name: Harden runner
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+16 -15
View File
@@ -153,9 +153,6 @@ impl RunLoop {
#[cfg(test)]
mod tests {
use super::*;
use std::io::Write;
use std::os::fd::AsRawFd;
use std::os::unix::net::UnixStream;
#[test]
fn timers_and_descriptors_follow_registration() {
@@ -171,21 +168,25 @@ mod tests {
assert_eq!(due, vec![a, b], "a late frame fires each timer once");
assert!(rl.remove_timer(a) && !rl.remove_timer(a));
assert_eq!(rl.due(t0 + Duration::from_secs(2)), vec![b]);
// A connected stream has defined read and write readiness on both Linux and BSD.
let (stream, mut peer) = UnixStream::pair().unwrap();
let fd = stream.as_raw_fd();
assert!(rl.add_fd(fd, CLAP_POSIX_FD_READ));
assert!(!rl.add_fd(fd, CLAP_POSIX_FD_READ), "registered once");
let mut fds = [0; 2];
// SAFETY: `fds` holds the two descriptors `pipe` writes.
assert_eq!(unsafe { libc::pipe(fds.as_mut_ptr()) }, 0);
assert!(rl.add_fd(fds[0], CLAP_POSIX_FD_READ));
assert!(!rl.add_fd(fds[0], CLAP_POSIX_FD_READ), "registered once");
assert!(!rl.add_fd(-1, CLAP_POSIX_FD_READ));
assert!(rl.ready().is_empty(), "nothing to read");
peer.write_all(b"x").unwrap();
assert_eq!(rl.ready(), vec![(fd, CLAP_POSIX_FD_READ)]);
// The unread byte is still there, so reporting read as well would be a stale interest.
assert!(rl.modify_fd(fd, CLAP_POSIX_FD_WRITE));
assert_eq!(rl.ready(), vec![(fd, CLAP_POSIX_FD_WRITE)]);
assert!(rl.remove_fd(fd) && !rl.has_fd(fd));
assert!(rl.ready().is_empty(), "no callbacks for an unregistered descriptor");
// SAFETY: a valid one-byte buffer written to our own pipe.
assert_eq!(unsafe { libc::write(fds[1], b"x".as_ptr().cast(), 1) }, 1);
assert_eq!(rl.ready(), vec![(fds[0], CLAP_POSIX_FD_READ)]);
assert!(rl.modify_fd(fds[0], CLAP_POSIX_FD_WRITE));
assert!(rl.ready().is_empty(), "a read end never becomes writable");
assert!(rl.remove_fd(fds[0]) && !rl.has_fd(fds[0]));
rl.clear();
assert!(!rl.has_timer(b));
// SAFETY: closing the pipe we opened.
unsafe {
libc::close(fds[0]);
libc::close(fds[1]);
}
}
}
+4 -34
View File
@@ -313,16 +313,10 @@ fn add_marker(e: &mut Engine, p: &Value) -> Result<Value> {
let at = position_param(e, "markers.add", p, "at")?;
let st = position_param(e, "markers.add", p, "start")?;
let en = position_param(e, "markers.add", p, "end")?;
let kind = match p.get("kind") {
None | Some(Value::Null) => MarkerKind::Marker,
Some(v) => match v.as_str() {
Some("marker") => MarkerKind::Marker,
Some("selection") => MarkerKind::Selection,
Some("none") => MarkerKind::None,
Some(other) => return Err(bad("markers.add", format!("unknown kind `{other}`"))),
// A present non-string is neither a documented kind nor an omitted one.
None => return Err(bad("markers.add", "kind must be a string")),
},
let kind = match str_param(p, "kind") {
Some("selection") => MarkerKind::Selection,
Some("none") => MarkerKind::None,
_ => MarkerKind::Marker,
};
let (a, b) = match (at, st, en) {
(Some(a), _, _) => (a, a),
@@ -586,30 +580,6 @@ mod tests {
}
}
/// `markers.add` rejects an unknown or non-string `kind` instead of silently adding a plain
/// marker; an absent or null one still means a plain marker.
#[test]
fn markers_add_rejects_an_unknown_kind() {
let mut e = crate::Engine::default();
let err = e.execute("markers.add", &json!({"name": "x", "kind": "garbage"})).unwrap_err();
assert!(err.to_string().contains("kind"), "unexpected error: {err}");
assert!(e.session().markers.is_empty());
for bad in [json!(123), json!(true), json!(["marker"]), json!({"kind": "marker"}), json!(1.5)] {
let err = e.execute("markers.add", &json!({"name": "x", "kind": bad})).unwrap_err();
assert!(err.to_string().contains("kind"), "{bad}: unexpected error: {err}");
assert!(e.session().markers.is_empty(), "{bad}: a marker was added");
}
let plain = e.execute("markers.add", &json!({"name": "Plain", "kind": null, "at": 500})).unwrap();
assert_eq!(e.session().markers.len(), 1, "null is still an omitted kind");
let verse = e.execute("markers.add", &json!({"name": "Verse", "kind": "marker", "at": 1000})).unwrap();
let pre = e.execute("markers.add", &json!({"name": "Pre", "kind": "none", "at": 2000})).unwrap();
let kind_of =
|e: &crate::Engine, r: &serde_json::Value| e.session().markers.iter().find(|m| Some(m.id.0) == r["id"].as_u64()).map(|m| m.kind);
assert_eq!(kind_of(&e, &plain), Some(soundcraft_model::MarkerKind::Marker));
assert_eq!(kind_of(&e, &verse), Some(soundcraft_model::MarkerKind::Marker));
assert_eq!(kind_of(&e, &pre), Some(soundcraft_model::MarkerKind::None));
}
/// Constant replaces the tempo over [start, end) only; the tempo at the old end tick carries on after it.
#[test]
fn tempo_constant_is_bounded_by_its_range() {
-17
View File
@@ -52,23 +52,6 @@ fn import_audio_places_audio_offered_by_a_worker() {
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn import_audio_refuses_a_non_audio_target() {
let dir = std::env::temp_dir().join(format!("sc-import-non-audio-target-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
let wav = tone_wav(&dir, "tone.wav");
let mut e = Engine::default();
e.execute("track.new", &json!({"kind": "instrument", "name": "Keys"})).unwrap();
let err = e.execute("file.import_audio", &json!({"path": wav, "track": "Keys"})).unwrap_err();
assert!(err.to_string().contains("audio track"), "{err}");
assert_eq!(e.session().tracks.len(), 1);
assert!(e.session().sources.is_empty());
assert!(e.session().tracks[0].clips().is_empty());
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn export_session_text_needs_replace_to_overwrite() {
let dir = std::env::temp_dir().join(format!("sc-export-text-replace-{}", std::process::id()));
-7
View File
@@ -176,13 +176,6 @@ fn place_import(
let file_rate = info.sample_rate;
let s = e.session_mut();
let session_rate = s.sample_rate.hz();
// An explicit non-audio target cannot play the clip: refuse it before registering
// the source, like `clip.place_source` does.
if let Some(t) = target
&& !s.track(t).is_some_and(|tr| tr.kind == TrackKind::Audio)
{
return Err(EngineError::BadParams("file.import_audio".into(), "audio files go on audio tracks".into()));
}
let src = add_source_audio(s, name, audio, path, FileFormat::of(info));
if let (Some(bwf), Some(sx)) = (info.bwf.as_ref(), s.sources.last_mut()) {
sx.time_reference = stamp_at_rate(bwf.time_reference, file_rate, session_rate);