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
//! Integration tests for cueloop CLI behavior against real git repositories.
//!
//! Purpose:
//! - Integration tests for cueloop CLI behavior against real git repositories.
//!
//! Responsibilities:
//! - Provide focused implementation or regression coverage for this file's owning feature.
//!
//! Scope:
//! - Limited to this file's owning feature boundary.
//!
//! Scenario: Init and validate in a fresh repo.
//!
//! Usage:
//! - Used through the crate module tree or integration test harness.
//!
//! Invariants/Assumptions:
//! - Keep behavior aligned with CueLoop's canonical CLI, machine-contract, and queue semantics.
use anyhow::Result;
mod test_support;
#[test]
fn init_and_validate_work_in_fresh_git_repo() -> Result<()> {
let dir = test_support::temp_dir_outside_repo();
test_support::git_init(dir.path())?;
let (status, stdout, stderr) =
test_support::run_in_dir(dir.path(), &["init", "--force", "--non-interactive"]);
anyhow::ensure!(
status.success(),
"cueloop init failed\nstdout:\n{stdout}\nstderr:\n{stderr}"
);
test_support::configure_runner(dir.path(), "codex", "gpt-5.3-codex", None)?;
let (status, stdout, stderr) = test_support::run_in_dir(dir.path(), &["queue", "validate"]);
anyhow::ensure!(
status.success(),
"cueloop queue validate failed\nstdout:\n{stdout}\nstderr:\n{stderr}"
);
Ok(())
}