magi-cli 0.264.2

Blind multi-agent implementation competition: N agents implement, M judges rank blind, deliberate, vote privately, winner survives double review + E2E gate
Documentation
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
//! Shared-target CLI selection and build-identity pinning must preserve the integration test's build.
#[allow(dead_code)]
#[path = "common/cli.rs"]
mod cli;

use std::path::{Path, PathBuf};

fn artifact(profile: &Path, hash: &str, library: u64, rustc: u64) -> PathBuf {
    let fingerprint = profile
        .join(".fingerprint")
        .join(format!("magi-cli-{hash}"));
    std::fs::create_dir_all(&fingerprint).unwrap();
    std::fs::write(
        fingerprint.join("bin-magi.json"),
        serde_json::to_vec(&serde_json::json!({
            "rustc": rustc, "deps": [[1, "magi", false, library]],
        }))
        .unwrap(),
    )
    .unwrap();
    let executable = profile
        .join("deps")
        .join(format!("magi-{hash}{}", std::env::consts::EXE_SUFFIX));
    std::fs::create_dir_all(executable.parent().unwrap()).unwrap();
    std::fs::write(&executable, "binary").unwrap();
    executable
}

fn copy_real_cli(dest: &Path) {
    if let Some(parent) = dest.parent() {
        std::fs::create_dir_all(parent).unwrap();
    }
    let mut input = std::fs::File::open(cli::magi_executable()).unwrap();
    let mut output = std::fs::File::create(dest).unwrap();
    std::io::copy(&mut input, &mut output).unwrap();
    drop(output);
    #[cfg(unix)]
    {
        use std::os::unix::fs::PermissionsExt as _;
        std::fs::set_permissions(dest, std::fs::Permissions::from_mode(0o755)).unwrap();
    }
}

#[test]
fn cli_selection_ignores_replaced_top_level_binary_and_other_builds() {
    let tmp = tempfile::tempdir().unwrap();
    let profile = tmp.path();
    let fingerprint = profile.join(".fingerprint/magi-cli-testhash");
    std::fs::create_dir_all(&fingerprint).unwrap();
    std::fs::write(
        fingerprint.join("test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    // A version string alone cannot distinguish two builds of the same release.
    artifact(profile, "old-library", 122, 42);
    artifact(profile, "other-toolchain", 123, 41);
    let expected = artifact(profile, "matching", 123, 42);
    std::fs::write(profile.join("magi"), "replaced by an unrelated build").unwrap();
    let test = profile.join("deps/example-testhash");
    assert_eq!(
        cli::matching_cli_for_layout(&test, true),
        Some(expected.clone())
    );
    std::fs::write(profile.join("magi"), "replaced again").unwrap();
    assert_eq!(cli::matching_cli_for_layout(&test, true), Some(expected));
}

#[test]
fn relocated_tests_without_build_metadata_can_use_cargos_executable() {
    let tmp = tempfile::tempdir().unwrap();
    assert!(cli::matching_cli(&tmp.path().join("deps/example-testhash")).is_none());
}

#[test]
#[should_panic(expected = "no CLI artifact links this test's magi library")]
fn mismatched_local_build_does_not_fall_back_to_an_unrelated_cli() {
    let tmp = tempfile::tempdir().unwrap();
    let fingerprint = tmp.path().join(".fingerprint/magi-cli-testhash");
    std::fs::create_dir_all(&fingerprint).unwrap();
    std::fs::write(
        fingerprint.join("test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    artifact(tmp.path(), "unrelated", 122, 42);
    cli::matching_cli_for_layout(&tmp.path().join("deps/example-testhash"), true);
}

#[test]
fn msvc_cli_selection_uses_unhashed_dependency_executable() {
    let tmp = tempfile::tempdir().unwrap();
    let profile = tmp.path();
    let fingerprint = profile.join(".fingerprint/magi-cli-testhash");
    std::fs::create_dir_all(&fingerprint).unwrap();
    std::fs::write(
        fingerprint.join("test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    let hashed = artifact(profile, "matching", 123, 42);
    let expected = profile
        .join("deps")
        .join(format!("magi{}", std::env::consts::EXE_SUFFIX));
    std::fs::rename(hashed, &expected).unwrap();
    let test = profile.join("deps/example-testhash");
    assert_eq!(
        cli::matching_cli_for_layout(&test, false),
        Some(expected.clone())
    );
    // The ordinary profile-level executable is never used as a substitute.
    std::fs::write(profile.join("magi"), "unrelated build").unwrap();
    assert_eq!(cli::matching_cli_for_layout(&test, false), Some(expected));
}

#[test]
#[should_panic(expected = "no CLI artifact links this test's magi library")]
fn msvc_cli_selection_rejects_an_unrelated_library() {
    let tmp = tempfile::tempdir().unwrap();
    let profile = tmp.path();
    let fingerprint = profile.join(".fingerprint/magi-cli-testhash");
    std::fs::create_dir_all(&fingerprint).unwrap();
    std::fs::write(
        fingerprint.join("test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    let hashed = artifact(profile, "unrelated", 122, 42);
    let executable = profile
        .join("deps")
        .join(format!("magi{}", std::env::consts::EXE_SUFFIX));
    std::fs::rename(hashed, executable).unwrap();
    cli::matching_cli_for_layout(&profile.join("deps/example-testhash"), false);
}

fn build_dir_artifact(
    profile: &Path,
    hash: &str,
    library: u64,
    rustc: u64,
    hashed_executable: bool,
) -> PathBuf {
    let unit = profile.join("build").join("magi-cli").join(hash);
    let fingerprint = unit.join("fingerprint");
    std::fs::create_dir_all(&fingerprint).unwrap();
    std::fs::write(
        fingerprint.join("bin-magi.json"),
        serde_json::to_vec(&serde_json::json!({
            "rustc": rustc, "deps": [[1, "magi", false, library]],
        }))
        .unwrap(),
    )
    .unwrap();
    let name = if hashed_executable {
        format!("magi-{hash}{}", std::env::consts::EXE_SUFFIX)
    } else {
        format!("magi{}", std::env::consts::EXE_SUFFIX)
    };
    let executable = unit.join("out").join(name);
    std::fs::create_dir_all(executable.parent().unwrap()).unwrap();
    std::fs::write(&executable, "binary").unwrap();
    executable
}

#[test]
fn build_dir_cli_selection_matches_test_library_and_ignores_top_level_binary() {
    for hashed in [true, false] {
        let tmp = tempfile::tempdir().unwrap();
        let profile = tmp.path();
        let test_unit = profile.join("build/magi-cli/testhash");
        let fingerprint = test_unit.join("fingerprint");
        std::fs::create_dir_all(&fingerprint).unwrap();
        std::fs::write(
            fingerprint.join("test-integration-test-example.json"),
            r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
        )
        .unwrap();
        build_dir_artifact(profile, "old-library", 122, 42, hashed);
        build_dir_artifact(profile, "other-toolchain", 123, 41, hashed);
        let expected = build_dir_artifact(profile, "matching", 123, 42, hashed);
        std::fs::write(
            profile.join(format!("magi{}", std::env::consts::EXE_SUFFIX)),
            "replaced by an unrelated build",
        )
        .unwrap();
        let test = test_unit
            .join("out")
            .join(format!("example-testhash{}", std::env::consts::EXE_SUFFIX));
        assert_eq!(
            cli::matching_cli_for_layout(&test, hashed),
            Some(expected.clone())
        );
    }
}

#[test]
#[should_panic(expected = "no CLI artifact links this test's magi library")]
fn build_dir_mismatched_local_build_does_not_fall_back_to_top_level_binary() {
    let tmp = tempfile::tempdir().unwrap();
    let profile = tmp.path();
    let test_unit = profile.join("build/magi-cli/testhash");
    let fingerprint = test_unit.join("fingerprint");
    std::fs::create_dir_all(&fingerprint).unwrap();
    std::fs::write(
        fingerprint.join("test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    build_dir_artifact(profile, "unrelated", 122, 42, false);
    std::fs::write(
        profile.join(format!("magi{}", std::env::consts::EXE_SUFFIX)),
        "unrelated top-level build",
    )
    .unwrap();
    let test = test_unit
        .join("out")
        .join(format!("example-testhash{}", std::env::consts::EXE_SUFFIX));
    cli::matching_cli_for_layout(&test, false);
}

#[test]
fn msvc_shared_deps_executable_with_matching_fingerprint_fails_closed_on_build_mismatch() {
    let tmp = tempfile::tempdir().unwrap();
    let profile = tmp.path();
    let test_fp = profile.join(".fingerprint/magi-cli-testhash");
    std::fs::create_dir_all(&test_fp).unwrap();
    std::fs::write(
        test_fp.join("test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    let bin_fp = profile.join(".fingerprint/magi-cli-matching");
    std::fs::create_dir_all(&bin_fp).unwrap();
    std::fs::write(
        bin_fp.join("bin-magi.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    let shared_deps_exe = profile
        .join("deps")
        .join(format!("magi{}", std::env::consts::EXE_SUFFIX));
    copy_real_cli(&shared_deps_exe);

    let test = profile.join(format!(
        "deps/example-testhash{}",
        std::env::consts::EXE_SUFFIX
    ));
    let pin_root = tmp.path().join("pins");

    // 1. Fingerprint still matches, but the shared unhashed deps/magi.exe reports
    //    a different build identity (e.g. schema 24 vs schema 23).
    let expected = "0.255.0-0000000000000000000000000000000000000000000000000000000000000023";
    let err = cli::resolve_and_pin_cli(&test, false, &shared_deps_exe, Some(&pin_root), expected)
        .unwrap_err();
    assert!(err.contains(expected), "{err}");
    assert!(err.contains(magi::build_id::BUILD_ID), "{err}");
    assert!(
        err.contains(&shared_deps_exe.display().to_string()),
        "{err}"
    );

    // 2. Replace the shared unhashed deps/magi.exe with a binary that does not
    //    implement the build-identity probe (e.g. an older build) while leaving
    //    the matching fingerprint intact.
    std::fs::copy(std::env::current_exe().unwrap(), &shared_deps_exe).unwrap();
    let err = cli::resolve_and_pin_cli(
        &test,
        false,
        &shared_deps_exe,
        Some(&pin_root),
        magi::build_id::BUILD_ID,
    )
    .unwrap_err();
    assert!(err.contains(magi::build_id::BUILD_ID), "{err}");
    assert!(
        err.contains(&shared_deps_exe.display().to_string()),
        "{err}"
    );
}

#[test]
fn pinned_cli_remains_immutable_after_shared_deps_executable_is_overwritten() {
    let tmp = tempfile::tempdir().unwrap();
    let profile = tmp.path();
    let test_fp = profile.join(".fingerprint/magi-cli-testhash");
    std::fs::create_dir_all(&test_fp).unwrap();
    std::fs::write(
        test_fp.join("test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    let bin_fp = profile.join(".fingerprint/magi-cli-matching");
    std::fs::create_dir_all(&bin_fp).unwrap();
    std::fs::write(
        bin_fp.join("bin-magi.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    let shared_deps_exe = profile
        .join("deps")
        .join(format!("magi{}", std::env::consts::EXE_SUFFIX));
    copy_real_cli(&shared_deps_exe);

    let test = profile.join(format!(
        "deps/example-testhash{}",
        std::env::consts::EXE_SUFFIX
    ));
    let pin_root = tmp.path().join("pins");
    let pinned = cli::resolve_and_pin_cli(
        &test,
        false,
        &shared_deps_exe,
        Some(&pin_root),
        magi::build_id::BUILD_ID,
    )
    .expect("matching MSVC executable should pin and verify");
    assert_ne!(pinned, shared_deps_exe);
    assert!(pinned.starts_with(&pin_root), "{}", pinned.display());

    // Simulate another build overwriting the shared unhashed deps/magi.exe after pinning.
    std::fs::copy(std::env::current_exe().unwrap(), &shared_deps_exe).unwrap();

    // The pinned copy still executes the verified original build.
    assert_eq!(
        cli::probe_build_id(&pinned).unwrap(),
        magi::build_id::BUILD_ID
    );
    let out = std::process::Command::new(&pinned)
        .arg("--version")
        .env(magi::build_id::EXPECT_ENV, magi::build_id::BUILD_ID)
        .output()
        .unwrap();
    assert!(
        out.status.success(),
        "{}",
        String::from_utf8_lossy(&out.stderr)
    );

    // A fresh resolution against the overwritten shared path now fails closed.
    let err = cli::resolve_and_pin_cli(
        &test,
        false,
        &shared_deps_exe,
        Some(&pin_root),
        magi::build_id::BUILD_ID,
    )
    .unwrap_err();
    assert!(
        err.contains(&shared_deps_exe.display().to_string()),
        "{err}"
    );
}

#[test]
fn build_dir_and_relocated_nextest_fallbacks_verify_and_pin_build_identity() {
    let tmp = tempfile::tempdir().unwrap();
    let pin_root = tmp.path().join("pins");

    // 1. Build-dir layout verifies actual build identity, not only bin-magi.json.
    let profile = tmp.path().join("target-build-dir/debug");
    let test_unit = profile.join("build/magi-cli/testhash");
    std::fs::create_dir_all(test_unit.join("fingerprint")).unwrap();
    std::fs::write(
        test_unit.join("fingerprint/test-integration-test-example.json"),
        r#"{"rustc":42,"deps":[[1,"magi",false,123]]}"#,
    )
    .unwrap();
    let unit_exe = build_dir_artifact(&profile, "matching", 123, 42, false);
    copy_real_cli(&unit_exe);
    let test = test_unit
        .join("out")
        .join(format!("example-testhash{}", std::env::consts::EXE_SUFFIX));
    let pinned_build_dir = cli::resolve_and_pin_cli(
        &test,
        false,
        Path::new("nonexistent-fallback"),
        Some(&pin_root),
        magi::build_id::BUILD_ID,
    )
    .expect("matching build-dir executable should verify");
    assert_eq!(
        cli::probe_build_id(&pinned_build_dir).unwrap(),
        magi::build_id::BUILD_ID
    );
    let mismatch = cli::resolve_and_pin_cli(
        &test,
        false,
        Path::new("nonexistent-fallback"),
        Some(&pin_root),
        "0.255.0-other-build",
    )
    .unwrap_err();
    assert!(mismatch.contains("0.255.0-other-build"), "{mismatch}");
    assert!(mismatch.contains(magi::build_id::BUILD_ID), "{mismatch}");

    // 2. Relocated nextest archive (no Cargo fingerprints) pins and verifies fallback.
    let relocated = tmp.path().join("nextest-archive");
    let relocated_test = relocated.join(format!(
        "deps/example-testhash{}",
        std::env::consts::EXE_SUFFIX
    ));
    let fallback_cli = relocated.join(format!("magi{}", std::env::consts::EXE_SUFFIX));
    copy_real_cli(&fallback_cli);

    let pinned_fallback = cli::resolve_and_pin_cli(
        &relocated_test,
        false,
        &fallback_cli,
        Some(&pin_root),
        magi::build_id::BUILD_ID,
    )
    .expect("relocated nextest fallback should pin and verify");
    // Content-addressed pin is reused for the identical binary bytes.
    assert_eq!(pinned_fallback, pinned_build_dir);

    let relocated_mismatch = cli::resolve_and_pin_cli(
        &relocated_test,
        false,
        &fallback_cli,
        Some(&pin_root),
        "0.255.0-relocated-wrong",
    )
    .unwrap_err();
    assert!(
        relocated_mismatch.contains("0.255.0-relocated-wrong"),
        "{relocated_mismatch}"
    );
    assert!(
        relocated_mismatch.contains(&fallback_cli.display().to_string()),
        "{relocated_mismatch}"
    );

    // Overwriting the fallback after pinning does not affect the pinned copy.
    std::fs::write(&fallback_cli, b"replaced-relocated-binary").unwrap();
    assert_eq!(
        cli::probe_build_id(&pinned_fallback).unwrap(),
        magi::build_id::BUILD_ID
    );
}

#[test]
fn concurrent_pinning_reuses_one_content_addressed_copy_without_staging_leaks() {
    let tmp = tempfile::tempdir().unwrap();
    let pin_root = tmp.path().join("concurrent-pins");
    let source = cli::magi_executable().to_path_buf();

    let handles: Vec<_> = (0..4)
        .map(|_| {
            let source = source.clone();
            let pin_root = pin_root.clone();
            std::thread::spawn(move || cli::pin_executable(&source, &pin_root))
        })
        .collect();
    let results: Vec<PathBuf> = handles
        .into_iter()
        .map(|h| h.join().unwrap().expect("concurrent pin must succeed"))
        .collect();

    for path in &results {
        assert_eq!(path, &results[0]);
        assert!(path.is_file(), "{}", path.display());
    }
    let entries: Vec<_> = std::fs::read_dir(&pin_root)
        .unwrap()
        .map(|entry| entry.unwrap().file_name().to_string_lossy().into_owned())
        .collect();
    assert_eq!(entries.len(), 1, "expected one generation dir: {entries:?}");
    assert!(
        !entries[0].starts_with(".staging-"),
        "staging dir leaked: {entries:?}"
    );
}

#[test]
fn old_pin_survives_other_generations_between_child_launches() {
    let tmp = tempfile::tempdir().unwrap();
    let pin_root = tmp.path().join("pins");
    let source = tmp.path().join("source");
    std::fs::write(&source, b"original generation").unwrap();
    let original = cli::pin_executable(&source, &pin_root).unwrap();
    let old = std::time::SystemTime::now() - std::time::Duration::from_secs(7200);
    let generation = original.parent().unwrap();
    // Age the legacy usage marker without sleeping.
    let marker = std::fs::File::create(generation.join(".used")).unwrap();
    marker.set_modified(old).unwrap();
    drop(marker);

    for n in 0..10 {
        std::fs::write(&source, format!("other generation {n}")).unwrap();
        cli::pin_executable(&source, &pin_root).unwrap();
    }
    assert_eq!(std::fs::read(original).unwrap(), b"original generation");
}

#[test]
fn build_identity_mismatch_refuses_cli_before_mutating_private_queue() {
    let tmp = tempfile::tempdir().unwrap();
    let home = tmp.path().join("magi-home");
    let queue = magi::queue::Queue::at(home.join("queue"));
    let mut task = magi::queue::Task::new(
        "Protected task".into(),
        "must stay untouched on build mismatch".into(),
        tmp.path().to_path_buf(),
        magi::queue::Source::Human,
    );
    queue.put(&mut task).unwrap();
    let task_path = queue.path_of(&task.id);
    let before = std::fs::read(&task_path).unwrap();

    // Verify magi_cli_env propagates both the verified executable and expected build id.
    let nested_env = cli::magi_cli_env(&home, "TEST_CLI_BIN");
    assert_eq!(
        nested_env
            .get(magi::build_id::EXPECT_ENV)
            .map(String::as_str),
        Some(magi::build_id::BUILD_ID)
    );
    assert_eq!(
        nested_env.get("TEST_CLI_BIN").map(Path::new),
        Some(cli::magi_executable())
    );

    let wrong = "0.255.0-expected-other-build";
    let output = cli::magi_cli(&home)
        .env(magi::build_id::EXPECT_ENV, wrong)
        .args(["task", "hold", &task.id, "must not apply"])
        .output()
        .unwrap();
    assert!(
        !output.status.success(),
        "CLI must fail closed when {} mismatches",
        magi::build_id::EXPECT_ENV
    );
    let stderr = String::from_utf8_lossy(&output.stderr);
    assert!(stderr.contains(wrong), "{stderr}");
    assert!(stderr.contains(magi::build_id::BUILD_ID), "{stderr}");
    assert!(
        stderr.contains(&cli::magi_executable().display().to_string()),
        "{stderr}"
    );
    assert_eq!(
        std::fs::read(&task_path).unwrap(),
        before,
        "private queue task must remain untouched on build-identity mismatch"
    );
}

#[test]
fn current_build_layout_resolves_and_pins_a_matching_cli_artifact() {
    let test = std::env::current_exe().expect("test executable");
    let has_metadata = test
        .parent()
        .and_then(Path::parent)
        .is_some_and(|dir| dir.join("fingerprint").is_dir() || dir.join(".fingerprint").is_dir());
    if has_metadata {
        let resolved = cli::matching_cli(&test)
            .expect("local Cargo build should resolve a library-matched CLI artifact");
        assert!(resolved.is_file(), "{}", resolved.display());
        assert_ne!(
            resolved,
            PathBuf::from(env!("CARGO_BIN_EXE_magi")),
            "resolved CLI must come from the library-matched unit directory, not the shared top-level binary"
        );
    }
    let pinned = cli::magi_executable();
    assert!(pinned.is_file(), "{}", pinned.display());
    assert_ne!(
        pinned,
        PathBuf::from(env!("CARGO_BIN_EXE_magi")),
        "pinned CLI must be an immutable copy, not the shared top-level binary"
    );
    assert_eq!(
        cli::probe_build_id(pinned).unwrap(),
        magi::build_id::BUILD_ID
    );
}