Skip to content

Commit 5dbaa4d

Browse files
wesbillmanCarlclaude
committed
fix(ci): restore green main after merge skew and new advisory
Main CI failed on c09730e for two unrelated reasons, and the local pre-push Rust lane also tripped on a load-sensitive test. Mobile: #8223 was tested against a base from before #8206, which removed buzzDevPushAppProfile along with app-profile selection. Its new notification toggle test still put `appProfile` in the native grant map, so the merged tree did not compile. The field no longer exists, so drop it. Security: cargo-deny now reports RUSTSEC-2024-0449 (unsafe-libyaml is unmaintained), pulled in through serde_yaml. This is an unmaintained notice, not a vulnerability. Removing the crate means migrating YAML parsing across several crates, so ignore it with a reason, like the existing unmaintained entries. buzz-acp: the spawn_script test helper returned before bash was running, and timing tests start their idle clock right away. Under full-suite load, process startup alone took longer than the idle windows, so keepalive_resets_idle_past_deadline, idle_resets_on_stdout_activity and the steer capture tests timed out before the script wrote anything. The helper now has the script print a ready line and consumes it before returning, so each clock starts once the child is executing. The two keepalive loops use brace expansion instead of $(seq), dropping an exec from their first gap, and the keepalive test gets a 250ms idle deadline (750ms floor) for more headroom; without the reset it still fails. Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Wes <[email protected]>
1 parent c09730e commit 5dbaa4d

3 files changed

Lines changed: 35 additions & 11 deletions

File tree

‎crates/buzz-acp/src/acp.rs‎

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3198,10 +3198,30 @@ mod tests {
31983198
);
31993199
}
32003200

3201+
/// Spawn `script` under bash and return once it is running.
3202+
///
3203+
/// Process startup can take hundreds of milliseconds on a loaded host,
3204+
/// which would otherwise eat into the idle and timing windows the tests
3205+
/// measure. The script prints a ready line first, consumed here, so each
3206+
/// test's clock starts only after the child is actually executing.
32013207
async fn spawn_script(script: &str) -> AcpClient {
3202-
AcpClient::spawn("bash", &["-c".into(), script.into()], &[], false)
3208+
const READY: &str = "buzz-acp-test-script-ready";
3209+
let mut client = AcpClient::spawn(
3210+
"bash",
3211+
&["-c".into(), format!("echo {READY}; {script}")],
3212+
&[],
3213+
false,
3214+
)
3215+
.await
3216+
.expect("failed to spawn test script");
3217+
let ready = tokio::time::timeout(std::time::Duration::from_secs(10), client.reader.next())
32033218
.await
3204-
.expect("failed to spawn test script")
3219+
.expect("test script should start within 10s");
3220+
assert!(
3221+
matches!(&ready, Some(Ok(line)) if line == READY),
3222+
"expected ready line, got {ready:?}"
3223+
);
3224+
client
32053225
}
32063226

32073227
#[cfg(unix)]
@@ -3367,7 +3387,7 @@ mod tests {
33673387
// Send valid JSON (session/update notifications) to reset the idle timer.
33683388
// Non-JSON lines no longer reset idle — only valid JSON notifications do.
33693389
let mut client = spawn_script(
3370-
r#"for i in $(seq 1 10); do echo '{"jsonrpc":"2.0","method":"session/update","params":{"update":{"sessionUpdate":"agent_thought_chunk","content":{"text":"thinking"}}}}'; sleep 0.05; done; sleep 10"#,
3390+
r#"for i in {1..10}; do echo '{"jsonrpc":"2.0","method":"session/update","params":{"update":{"sessionUpdate":"agent_thought_chunk","content":{"text":"thinking"}}}}'; sleep 0.05; done; sleep 10"#,
33713391
)
33723392
.await;
33733393
let max_dur = std::time::Duration::from_secs(10);
@@ -3561,10 +3581,10 @@ mod tests {
35613581

35623582
#[tokio::test]
35633583
async fn keepalive_resets_idle_past_deadline() {
3564-
// Keepalive session/update lines every 50ms against a 100ms idle deadline.
3565-
// The turn should survive well past the 100ms deadline (proves the fix).
3584+
// Keepalive session/update lines every 50ms against a 250ms idle deadline.
3585+
// The turn should survive well past the idle deadline (proves the fix).
35663586
let mut client = spawn_script(
3567-
r#"for i in $(seq 1 20); do echo '{"jsonrpc":"2.0","method":"session/update","params":{"update":{"sessionUpdate":"keepalive"}}}'; sleep 0.05; done; sleep 10"#,
3587+
r#"for i in {1..20}; do echo '{"jsonrpc":"2.0","method":"session/update","params":{"update":{"sessionUpdate":"keepalive"}}}'; sleep 0.05; done; sleep 10"#,
35683588
)
35693589
.await;
35703590
let max_dur = std::time::Duration::from_secs(10);
@@ -3574,16 +3594,16 @@ mod tests {
35743594
.read_until_response_with_idle_timeout(
35753595
"test",
35763596
999,
3577-
std::time::Duration::from_millis(100),
3597+
std::time::Duration::from_millis(250),
35783598
hard_deadline,
35793599
max_dur,
35803600
)
35813601
.await;
35823602
let elapsed = start.elapsed();
3583-
// 20 keepalives × 50ms = ~1000ms of activity, then idle fires after 100ms more.
3584-
// Must survive well past the 100ms deadline.
3603+
// 20 keepalives × 50ms = ~1000ms of activity, then idle fires after 250ms more.
3604+
// Must survive well past the 250ms deadline.
35853605
assert!(
3586-
elapsed >= std::time::Duration::from_millis(500),
3606+
elapsed >= std::time::Duration::from_millis(750),
35873607
"keepalive should reset idle past the deadline; elapsed only {elapsed:?}"
35883608
);
35893609
assert!(elapsed < std::time::Duration::from_secs(5));

‎deny.toml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ ignore = [
1515
# remove these when upstream catches up.
1616
{ id = "RUSTSEC-2026-0194", reason = "transitive via rust-s3 and mesh-llm→plist; trusted-input XML only; no upstream fix available yet" },
1717
{ id = "RUSTSEC-2026-0195", reason = "transitive via rust-s3 and mesh-llm→plist; trusted-input XML only; no upstream fix available yet" },
18+
# unsafe-libyaml 0.2.11 — unmaintained (repository archived 2024-03-25), not a
19+
# vulnerability report. Transitive dep: serde_yaml → unsafe-libyaml. The serde_yaml_ng
20+
# fork uses the same crate, so removing it means migrating YAML parsing in
21+
# buzz-agent, buzz-persona, buzz-relay, buzz-workflow and desktop.
22+
{ id = "RUSTSEC-2024-0449", reason = "transitive via serde_yaml; unmaintained, not vulnerable; removal needs a YAML parser migration" },
1823
]
1924

2025
[licenses]

‎mobile/test/features/settings/notification_toggle_test.dart‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ void main() {
7878
'installationId': 'b' * 32,
7979
'endpointGrant': 'test-endpoint-grant',
8080
'endpointHash': 'c' * 64,
81-
'appProfile': buzzDevPushAppProfile,
8281
'endpointEpoch': 1,
8382
'generation': 1,
8483
'expiresAt': DateTime.now().millisecondsSinceEpoch ~/ 1000 + 3600,

0 commit comments

Comments
 (0)