mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-09 01:49:49 -10:00
fix(ci): guard the Unix import and handle unavailable companion audio
Windows CI atbd8588ffffrejected the Unix-only Duration import after the timeout constant was guarded. Give the import the same platform boundary. The hosted macOS pet contract also assumed an audio device survives between two lease requests. A sink failure correctly releases the lease; accept that branch only when the frame explicitly reports unavailable audio and no owner. An available sink still has to refuse the competing lease. Release both test clients before proceeding. This changes no production audio behavior. Validation: hooks all-target/all-feature Clippy PASS under CI policy; 28/0 hooks tests remain valid from bd8588 (Unix behavior unchanged). Corrected black-box pet contract: 11/0 using the existing debug TUI, exercising the exclusive-lease branch on this Mac. The hardware-unavailable branch still requires hosted proof. fmt/diff checks PASS. JavaScript source unchanged from8f7744e52f: npm 810/0, 1 platform skip; check:web PASS. Local Windows GNU check stopped before hooks in ring because x86_64-w64-mingw32-gcc is absent. No Windows compile or final CI pass claimed. Failed hosted and local cross-build logs are retained in takeover receipts. Signed-off-by: CodeWhale Bot <[email protected]>
This commit is contained in:
1 parent
bd8588ffff
commit
28f5e4120d
2 files changed
+11
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
#[cfg(unix)]
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
@@ -78,9 +78,17 @@ try:
|
||||
passed('source changes reject old producers and actions; clock continues without a view')
|
||||
audio_a=str(uuid.uuid4());audio_b=str(uuid.uuid4())
|
||||
assert request(d,'/v1/audio',{'client':audio_a,'enabled':True})['granted']
|
||||
assert not request(d,'/v1/audio',{'client':audio_b,'enabled':True})['granted']
|
||||
competitor=request(d,'/v1/audio',{'client':audio_b,'enabled':True})
|
||||
if competitor['granted']:
|
||||
# Headless hosts can lose the sink and release the first lease before
|
||||
# this request. A second grant is valid only if the owner reports the
|
||||
# failed device and also releases that lease; it is no audio proof.
|
||||
frame_when(d,lambda f:f['audioUnavailable'] and not f['audioOwner'])
|
||||
passed('unavailable audio releases its lease and reports device failure (no live audio proof)')
|
||||
else:
|
||||
passed('only one view can lease the companion audio device')
|
||||
request(d,'/v1/audio',{'client':audio_a,'enabled':False})
|
||||
passed('only one view can lease the companion audio device')
|
||||
request(d,'/v1/audio',{'client':audio_b,'enabled':False})
|
||||
before_style=request(d,'/v1/export')
|
||||
appearance={'background':[238,239,235],'backgroundTop':[255,255,250],'particle':[32,79,83],'eventColors':False,'brightness':1.4,'dotScale':1.2,'glow':.25,'environment':False}
|
||||
style_action={'identity':d['identity'],'client':str(uuid.uuid4()),'seq':1,'source_revision':b['sourceRevision'],'action':{'kind':'appearance','appearance':appearance}}
|
||||
|
||||
Reference in new issue
Block a user