hennery 0.1.3

Self-hosted cockpit for ACP coding agents
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
//! The checks that reach the collector (distribution spec §7): the host's
//! way to it, step by step, and its `hello` (check 7); the clock against
//! the collector's (check 8); and, in a collector's own directory, its
//! listeners and `public_url` (check 16). Every request goes straight to
//! the address named, never through a proxy, never following a redirect,
//! and reads a status line and a `Date` header, no body (decision 17). An
//! accepted `hello` is recorded by the collector: its Hosts view shows the
//! host as seen just now, with this binary's version.

use super::dirs::NO_HOST;
use super::service::{Holder, holder};
use super::{Doctor, Finding, Verdict};
use hennery_host::connection::Standing;
use hennery_host::identity::Paired;
use hennery_host::transport::{CollectorEndpoint, CollectorTransport, CollectorTrust};
use reqwest::Url;
use std::time::Duration;

/// Each step's budget.
pub const STEP_TIMEOUT: Duration = Duration::from_secs(5);

/// Clock skew that warns, and that fails (distribution §7, check 8).
pub const SKEW_WARN: u64 = 30;
pub const SKEW_FAIL: u64 = 300;

/// The most of a collector's own words printed.
const MAX_QUOTE: usize = 200;

/// Why checks 7 and 8 did not run.
const NOT_PAIRED: &str = "the host is not paired";
const NO_ANSWER: &str = "the collector did not answer (check 7)";

/// `text` cut to `MAX_QUOTE` characters: words that come from the network.
fn quoted(text: &str) -> String {
    let mut out: String = text.chars().take(MAX_QUOTE).collect();
    if text.chars().count() > MAX_QUOTE {
        out.push('…');
    }
    out
}

/// `url` as the report may show it: without a user name or password, which
/// are refused by the transport parser, including in legacy configuration.
pub fn shown_url(url: &str) -> String {
    match Url::parse(url) {
        Ok(mut parsed) if !parsed.username().is_empty() || parsed.password().is_some() => {
            let _ = parsed.set_username("");
            let _ = parsed.set_password(None);
            parsed.to_string()
        }
        Ok(_) => url.to_string(),
        // It could still hold `user:pass@` before what broke it.
        Err(_) => "an unreadable URL".to_string(),
    }
}

/// How long the whole `hello` may take: the probe bounds its handshake and
/// its answer (15 s each), not its close.
pub const HELLO_TIMEOUT: Duration = Duration::from_secs(35);

/// `future` run to its end on a runtime of its own, on a thread of its own:
/// doctor runs inside `main`'s runtime, which cannot be blocked on.
fn block_on<T: Send + 'static>(future: impl std::future::Future<Output = T> + Send + 'static) -> T {
    std::thread::spawn(move || {
        tokio::runtime::Builder::new_current_thread()
            .enable_all()
            .build()
            .expect("a runtime")
            .block_on(future)
    })
    .join()
    .expect("the request thread")
}

/// What a `GET /healthz` came to.
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Health {
    /// It answered: its status, and its `Date` header as Unix seconds.
    Answered {
        status: u16,
        date: Option<i64>,
    },
    /// The TLS handshake or the certificate failed.
    Tls(String),
    Failed(String),
}

/// `GET <base>/healthz`, straight to it (no proxy, no redirect), within
/// `STEP_TIMEOUT`; only its status and `Date` are read.
pub fn healthz(base: &Url) -> Health {
    healthz_with(base, CollectorTrust::System)
}
fn healthz_with(base: &Url, trust: CollectorTrust) -> Health {
    let transport =
        CollectorEndpoint::public(base.as_str()).and_then(|endpoint| CollectorTransport::new(endpoint, trust));
    match transport {
        Ok(transport) => healthz_transport(&transport),
        Err(_) => Health::Failed("collector endpoint or trust configuration failed".into()),
    }
}
fn healthz_transport(transport: &CollectorTransport) -> Health {
    let transport = transport.clone();
    block_on(async move {
        let operation = async {
            let response = transport.health().await?;
            Ok::<_, anyhow::Error>(Health::Answered {
                status: response.status().as_u16(),
                date: response
                    .headers()
                    .get(reqwest::header::DATE)
                    .and_then(|v| v.to_str().ok())
                    .and_then(http_date),
            })
        };
        match tokio::time::timeout(STEP_TIMEOUT, operation).await {
            Ok(Ok(health)) => health,
            Ok(Err(error)) if hennery_host::transport::classify(error.as_ref()).is_tls() => Health::Tls(format!(
                "{}",
                hennery_host::transport::failure(hennery_host::transport::classify(error.as_ref()))
            )),
            Ok(Err(_)) => Health::Failed("DNS/TCP/HTTP connection failed".into()),
            Err(_) => Health::Failed("collector health deadline exceeded".into()),
        }
    })
}

/// An HTTP date (`Thu, 02 Oct 2026 10:00:00 GMT`) as Unix seconds.
pub fn http_date(text: &str) -> Option<i64> {
    let parts: Vec<&str> = text.split_whitespace().collect();
    let [_, day, month, year, time, "GMT"] = parts.as_slice() else {
        return None;
    };
    let month = [
        "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
    ]
    .iter()
    .position(|m| m == month)? as i64
        + 1;
    let (day, year): (i64, i64) = (day.parse().ok()?, year.parse().ok()?);
    let hms: Vec<i64> = time.split(':').map(|p| p.parse().ok()).collect::<Option<_>>()?;
    let [h, m, s] = hms.as_slice() else {
        return None;
    };
    // Days from the civil date (Howard Hinnant's algorithm).
    let y = if month <= 2 { year - 1 } else { year };
    let era = y.div_euclid(400);
    let yoe = y - era * 400;
    let mp = (month + 9) % 12;
    let doy = (153 * mp + 2) / 5 + day - 1;
    let doe = yoe * 365 + yoe / 4 - yoe / 100 + doy;
    let days = era * 146_097 + doe - 719_468;
    Some(days * 86_400 + h * 3600 + m * 60 + s)
}

/// Where the host examined reaches its collector: the http(s) base and the
/// host WebSocket. For `up`'s host, as `up` hands it on (the collector's
/// first listen address loopback reaches): `host.toml`'s may name an old
/// port.
fn collector_of(doctor: &Doctor, paired: &Paired) -> Result<(String, String), String> {
    let up = doctor.dirs.collector.as_ref().filter(|_| {
        doctor
            .dirs
            .host
            .as_ref()
            .is_some_and(|h| h.parent() == Some(doctor.dirs.root.as_path()))
    });
    if let Some(collector) = up {
        let file = crate::config::FileConfig::load(collector).map_err(|e| format!("{e:#}"))?;
        let addresses = file
            .listen(&[])
            .and_then(|given| crate::listen_addresses(&given))
            .map_err(|e| format!("{e:#}"))?;
        let base = addresses
            .iter()
            .map(|a| crate::loopback_url(a))
            .find(|base| hennery_host::pairing::collector_ws_url(base).is_ok())
            .ok_or("no listen address of the collector's is reached over loopback")?;
        let ws = hennery_host::pairing::collector_ws_url(&base).map_err(|e| format!("{e:#}"))?;
        CollectorEndpoint::stored(&paired.collector_url)
            .and_then(|stored| stored.require_compatible(&CollectorEndpoint::stored(&ws)?))
            .map_err(|e| e.to_string())?;
        return Ok((base, ws));
    }
    let ws = paired.collector_url.clone();
    let mut url = Url::parse(&ws).map_err(|_| "host.toml's collector is not a URL".to_string())?;
    let scheme = match url.scheme() {
        "wss" => "https",
        "ws" => "http",
        other => return Err(format!("host.toml's collector has the scheme {other}")),
    };
    url.set_scheme(scheme).map_err(|()| "a scheme".to_string())?;
    url.set_path("/");
    Ok((url.to_string(), ws))
}

/// Checks 7 and 8.
pub fn collector(doctor: &Doctor) -> [Finding; 2] {
    let not_run = |why| [Finding::NotRun { number: 7, why }, Finding::NotRun { number: 8, why }];
    let Some(host) = &doctor.dirs.host else {
        return not_run(NO_HOST);
    };
    let mut verdict = Verdict::default();
    match hennery_host::enrollment::inspect(host) {
        Ok(hennery_host::enrollment::EnrollmentState::Uncertain(attempt)) => {
            verdict.fail(attempt.diagnostic(), "check Hosts, revoke the possible enrollment and explicitly archive this attempt; no identity probe was sent");
            return [
                Finding::Checked(verdict.check(7, "collector")),
                Finding::NotRun {
                    number: 8,
                    why: NO_ANSWER,
                },
            ];
        }
        Err(err) => {
            verdict.fail(
                err.to_string(),
                "preserve enrollment artifacts and complete explicit recovery; no identity probe was sent",
            );
            return [
                Finding::Checked(verdict.check(7, "collector")),
                Finding::NotRun {
                    number: 8,
                    why: NO_ANSWER,
                },
            ];
        }
        _ => {}
    }
    let paired = match Paired::read(host) {
        Ok(Some(paired)) => paired,
        Ok(None) => return not_run(NOT_PAIRED),
        Err(err) => {
            let fix =
                if host.join("host.toml.pending").exists() || host.join(hennery_host::enrollment::JOURNAL).exists() {
                    "run `hennery host run` once (it finishes the pairing), then doctor again"
                } else {
                    "fix host.toml, or pair this host again (`hennery host join`)"
                };
            if host.join("host.toml.pending").exists() || host.join(hennery_host::enrollment::JOURNAL).exists() {
                verdict.warn(format!("{err}"), fix);
            } else {
                verdict.fail(format!("{err}"), fix);
            }
            return [
                Finding::Checked(verdict.check(7, "collector")),
                Finding::NotRun {
                    number: 8,
                    why: NO_ANSWER,
                },
            ];
        }
    };
    let date = reach(doctor, host, &paired, &mut verdict);
    let seven = Finding::Checked(verdict.check(7, "collector"));
    let eight = match date {
        None => Finding::NotRun {
            number: 8,
            why: NO_ANSWER,
        },
        Some(date) => Finding::Checked(skew(date, now())),
    };
    [seven, eight]
}

fn now() -> i64 {
    std::time::SystemTime::now()
        .duration_since(std::time::UNIX_EPOCH)
        .map_or(0, |d| d.as_secs() as i64)
}

/// The `/healthz` URL as the report shows it, from the shown base URL:
/// `up`'s has no path (`http://127.0.0.1:7117`), `host.toml`'s ends in `/`.
pub fn health_shown(shown: &str) -> String {
    format!("{}/healthz", shown.trim_end_matches('/'))
}

/// Check 7's steps, each stopping the check where it fails: the URL's rule,
/// DNS, TCP, TLS, `/healthz`, then the `hello`. The collector's `Date`, or
/// `None` when it did not answer (then check 8 cannot run); `Some(None)`
/// when it answered without one.
fn reach(doctor: &Doctor, host: &std::path::Path, paired: &Paired, verdict: &mut Verdict) -> Option<Option<i64>> {
    let (base, ws) = match collector_of(doctor, paired) {
        Ok(both) => both,
        Err(why) => {
            verdict.fail(why, "fix the collector's config.toml, or pair this host again");
            return None;
        }
    };
    let rejoin = "pair this host again: `hennery host join <the collector's URL>`";
    let shown = shown_url(&base);
    let health = health_shown(&shown);
    let url = match hennery_host::pairing::parse_public_url(&base) {
        Ok(url) => url,
        Err(err) => {
            // Its words quote the URL: shown without credentials.
            verdict.fail(format!("{err}").replace(&base, &shown), rejoin);
            return None;
        }
    };
    let transport = match CollectorEndpoint::public(url.as_str())
        .and_then(|endpoint| CollectorTransport::new(endpoint, paired.trust.clone()))
    {
        Ok(transport) => transport,
        Err(_) => {
            verdict.fail(
                "collector trust configuration failed",
                "install the intended CA or repair native roots; TLS validation is required",
            );
            return None;
        }
    };
    verdict.ok(format!("trust: {}", paired.trust.source()));
    if transport.root_warnings > 0 {
        verdict.warn(
            format!(
                "native root loading had {} failures with usable roots",
                transport.root_warnings
            ),
            "inspect native root sources",
        );
    }
    let name = url.host_str().unwrap_or_default().to_string();
    let endpoint = transport.endpoint.clone();
    let addresses = match block_on(async move {
        tokio::time::timeout(STEP_TIMEOUT, endpoint.addresses())
            .await
            .unwrap_or_else(|_| Err(hennery_host::transport::failure(hennery_host::transport::Stage::Dns)))
    }) {
        Ok(addresses) if !addresses.is_empty() => addresses,
        Ok(_) => {
            verdict.fail(
                format!("{name} does not resolve"),
                "check the name in DNS, or the collector's URL in host.toml",
            );
            return None;
        }
        Err(_) => {
            verdict.fail(
                format!("{name} did not resolve within {STEP_TIMEOUT:?}"),
                "check this machine's DNS",
            );
            return None;
        }
    };
    if let Err(err) = connect(&addresses) {
        verdict.fail(
            format!("nothing answers on {} ({})", addresses[0], err.kind()),
            "start the collector, or open the way to it (firewall, VPN)",
        );
        return None;
    }
    let date = match healthz_transport(&transport) {
        Health::Tls(why) => {
            verdict.fail(
                format!("{shown}: TLS failed: {why}"),
                "give the collector a certificate for its name (and check this machine's clock: an expired-looking certificate can be the clock)",
            );
            return None;
        }
        Health::Failed(why) => {
            verdict.fail(format!("{health}: {why}"), "check the collector's log");
            return None;
        }
        Health::Answered { status, .. } if status != 200 => {
            verdict.fail(
                format!("{health} answered {status}"),
                "check that this URL is the collector's, and its log",
            );
            return None;
        }
        Health::Answered { date, .. } => date,
    };
    verdict.ok(format!("{shown} answers"));
    let _ = ws;
    hello(doctor, host, paired, &transport, verdict);
    Some(date)
}

/// A TCP connection to the first of `addresses` that takes one, each
/// within `STEP_TIMEOUT`, closed at once; the first address's error else.
fn connect(addresses: &[std::net::SocketAddr]) -> std::io::Result<()> {
    let addresses = addresses.to_vec();
    block_on(async move {
        tokio::time::timeout(STEP_TIMEOUT, async move {
            let mut first = None;
            for address in addresses {
                match tokio::net::TcpStream::connect(address).await {
                    Ok(_) => return Ok(()),
                    Err(err) => {
                        first.get_or_insert(err);
                    }
                }
            }
            Err(first.unwrap_or_else(|| std::io::ErrorKind::NotFound.into()))
        })
        .await
        .unwrap_or_else(|_| Err(std::io::ErrorKind::TimedOut.into()))
    })
}

/// The `hello`, only when no host runs on this directory (decision 17).
fn hello(
    doctor: &Doctor,
    host: &std::path::Path,
    paired: &Paired,
    transport: &CollectorTransport,
    verdict: &mut Verdict,
) {
    let check = transport.clone();
    if let Err(error) = block_on(async move { check.preflight().await }) {
        verdict.fail(
            format!("WSS upgrade/nonce check failed: {error}"),
            "forward the WebSocket upgrade and hennery-hello-nonce; remove ingress login redirects",
        );
        return;
    }
    if holder(doctor, &host.join(crate::lock::HOST_LOCK)) != Holder::Nobody {
        verdict.ok("WSS upgrade/nonce checked; authentication not checked: hello not sent because a host may be connected on this directory (see check 14)");
        return;
    }
    let (transport, id, key) = (transport.clone(), paired.host_id.clone(), paired.key.clone());
    let standing = block_on(async move {
        tokio::time::timeout(
            HELLO_TIMEOUT,
            hennery_host::connection::probe_transport(&transport, &id, &key),
        )
        .await
    });
    let rejoin = "pair it again: remove host.key and host.toml, then `hennery host join <url>`";
    match standing {
        Err(_) => verdict.fail(
            format!("its hello did not finish within {HELLO_TIMEOUT:?}"),
            "check the collector's log",
        ),
        Ok(Ok(Standing::Accepted)) => verdict.ok(
            "its hello is accepted (the collector records this host as seen now, with this binary's version)",
        ),
        Ok(Ok(Standing::Connected)) => verdict.warn(
            "this host's key is in use by another live connection, and no host here holds host.lock",
            "run doctor again in a minute; if it stays and no other copy of this directory is yours, revoke the host in the Hosts view and pair again (`hennery host join`)",
        ),
        Ok(Ok(Standing::Revoked)) => verdict.fail(
            "the collector revoked this host",
            "re-pair it with `hennery host join <url>` (it gets a new key and id)",
        ),
        Ok(Ok(Standing::Unknown)) => verdict.fail("the collector does not know this host or its key", rejoin),
        Ok(Err(err)) => verdict.fail(
            format!("its hello failed: {}", quoted(&err.to_string())),
            "check the collector's log",
        ),
    }
}

/// Check 8's verdict: the collector's `date` against `now`.
pub fn skew(date: Option<i64>, now: i64) -> super::Check {
    let mut verdict = Verdict::default();
    match date {
        None => verdict.warn(
            "the collector's answer had no Date",
            "check this machine's clock by hand (`date`)",
        ),
        Some(date) => {
            let off = now.abs_diff(date);
            let fix = "set this machine's clock from the network (NTP)";
            if off > SKEW_FAIL {
                verdict.fail(format!("this clock is {off} s off the collector's"), fix);
            } else if off > SKEW_WARN {
                verdict.warn(format!("this clock is {off} s off the collector's"), fix);
            } else {
                verdict.ok(format!("within {off} s of the collector's"));
            }
        }
    }
    verdict.check(8, "clock")
}

/// Whether the one installed service runs the collector in `dir`.
fn served(doctor: &Doctor, dir: &std::path::Path) -> bool {
    use crate::service::unit::Role;
    let cx = doctor.cx;
    let [role] = cx.installed()[..] else {
        return false;
    };
    let Some(data) = crate::service::read_command_line(cx, role).and_then(|a| crate::service::data_dir_of(&a)) else {
        return false;
    };
    let collector = match role {
        Role::Up => data.join("collector"),
        Role::Collector => data,
        Role::Host => return false,
    };
    collector.canonicalize().ok() == dir.canonicalize().ok()
        && crate::service::managed(cx, role)
            .ok()
            .flatten()
            .is_some_and(|m| m.running)
}

/// Check 16 (kernel §7): every listen address answers, and `public_url`
/// (`config.toml`'s; the one stored at setup is in the database, which is
/// not opened) answers `/healthz`.
pub fn listeners(doctor: &Doctor) -> Finding {
    let Some(collector) = &doctor.dirs.collector else {
        return Finding::NotRun {
            number: 16,
            why: "no collector data directory",
        };
    };
    let mut verdict = Verdict::default();
    let file = match crate::config::FileConfig::load(collector) {
        Ok(file) => file,
        Err(err) => {
            verdict.fail(format!("{err}"), "fix the collector's config.toml");
            return Finding::Checked(verdict.check(16, "listeners"));
        }
    };
    let addresses = match file.listen(&[]).and_then(|given| crate::listen_addresses(&given)) {
        Ok(addresses) => addresses,
        Err(err) => {
            verdict.fail(format!("{err}"), "fix listen in the collector's config.toml");
            return Finding::Checked(verdict.check(16, "listeners"));
        }
    };
    let running = served(doctor, collector);
    for address in &addresses {
        let answered = crate::healthcheck::probe_address(address)
            .and_then(|a| crate::healthcheck::check(a, crate::healthcheck::TIMEOUT));
        match answered {
            Ok(()) => verdict.ok(format!("{address} answers")),
            Err(_) if running => verdict.fail(
                format!("{address}: nothing answers, though the service runs"),
                "check listen in config.toml against the collector's log (a taken port fails its start)",
            ),
            Err(_) => verdict.warn(
                format!("{address}: no collector answers (is it running?)"),
                "start it (`hennery up`, `hennery collector`, or the service)",
            ),
        }
    }
    if doctor.cx.env.contains_key("HENNERY_LISTEN") {
        verdict.ok("HENNERY_LISTEN is set in this shell: a service does not see it");
    }
    match file.public_url(None) {
        None => verdict.ok("no public_url in config.toml (the one stored at setup is not read)"),
        Some(public) => match hennery_host::pairing::parse_public_url(&public) {
            Err(err) => verdict.warn(
                format!("{err}").replace(&public, &shown_url(&public)),
                "fix public_url in config.toml",
            ),
            Ok(url) => match if doctor.collector_trust == CollectorTrust::System {
                healthz(&url)
            } else {
                healthz_with(&url, doctor.collector_trust.clone())
            } {
                Health::Answered { status: 200, .. } => {
                    verdict.ok(format!("public_url {} answers /healthz", shown_url(&public)))
                }
                Health::Answered { status, .. } => verdict.warn(
                    format!("public_url {} answers /healthz with {status}", shown_url(&public)),
                    "point public_url, or the proxy in front, at this collector",
                ),
                Health::Tls(why) | Health::Failed(why) => verdict.warn(
                    format!("public_url {} reaches no listener or proxy: {why}", shown_url(&public)),
                    "point public_url, or the proxy in front, at this collector",
                ),
            },
        },
    }
    let configured = file.proxy_policy().expect("validated config").is_configured();
    let attribution = format!(
        "proxy-address attribution is {}; missing header uses the TCP peer; health success cannot prove header stripping or separate limiter budgets",
        if configured { "configured" } else { "unconfigured" }
    );
    if configured
        || file
            .public_url(None)
            .is_some_and(|url| Url::parse(&url).is_ok_and(|url| url.scheme() == "https"))
    {
        verdict.warn(attribution, "verify the exact peer and overwritten Hennery-Client-IP header with two clients; restrict ingress until the public deployment gate passes");
    } else {
        verdict.ok(attribution);
    }
    verdict.ok(format!("external collector trust: {}", doctor.collector_trust.source()));
    Finding::Checked(verdict.check(16, "listeners"))
}