requirements.integration.symposium_cli
Requirements index · View definition
Requirement
The enabled Habeas Symposium plugin MUST request a global Cargo installation of the
habeasCLI and use that installation as its session-start hook command, so the CLI is available when the hook advises an agent to runhabeas setup.
Rationale
The requirement has two obligations: the plugin requests a global Cargo installation of the habeas CLI, and the session-start hook uses that installation as its command. The manifest meets both, and a test checks both.
- Global Cargo installation:
Cargo.toml#table[package.metadata.symposium.installations]declaresname = "habeas",source = "cargo",crate = "habeas",executable = "habeas"andglobal = true. It carries the{impl}reference atCargo.toml#table[package.metadata.symposium.installations]/pair[name]. - Hook uses that installation:
Cargo.toml#table[package.metadata.symposium.hooks]declares a hook withevent = "SessionStart"andcommand = "habeas", which matches the installation’s executable. Itsargsare["hook", "session-start"]. It carries the{impl}reference atCargo.toml#table[package.metadata.symposium.hooks]/pair[name]. - Test:
tests/repository.rs#fn[symposium_plugin_installs_the_cli_globally_for_its_session_start_hook]carries the{test}reference. It asserts exactly one installation with sourcecargo, cratehabeas, executablehabeasandglobaltrue. It also asserts exactly one hook with eventSessionStart, a command equal to the installation’s executable, and args["hook", "session-start"].
I found no unspecified behavior or untested obligation.
Inputs
Implementation
Input 2: outline Cargo.toml table[package.metadata.symposium.installations]/pair[name]
- File:
Cargo.toml - Selector:
table[package.metadata.symposium.installations]/pair[name] - Kind:
pair Cargo.toml:39–40
# {impl}`requirements.integration.symposium_cli`
name = "habeas"
Input 3: outline Cargo.toml table[package.metadata.symposium.hooks]/pair[name]
- File:
Cargo.toml - Selector:
table[package.metadata.symposium.hooks]/pair[name] - Kind:
pair Cargo.toml:47–49
# {impl}`requirements.integration.symposium_cli`
# {impl}`requirements.integration.symposium_setup_hook`
name = "habeas-setup-check"
Tests
Input 4: outline tests/repository.rs fn[symposium_plugin_installs_the_cli_globally_for_its_session_start_hook]
- File:
tests/repository.rs - Selector:
fn[symposium_plugin_installs_the_cli_globally_for_its_session_start_hook] - Kind:
fn tests/repository.rs:467–488
// {test}`requirements.integration.symposium_cli`
#[test]
fn symposium_plugin_installs_the_cli_globally_for_its_session_start_hook() {
let manifest = repository_toml("Cargo.toml");
let symposium = &manifest["package"]["metadata"]["symposium"];
let installations = symposium["installations"].as_array().unwrap();
assert_eq!(installations.len(), 1);
let installation = &installations[0];
assert_eq!(installation["source"].as_str(), Some("cargo"));
assert_eq!(installation["crate"].as_str(), Some("habeas"));
assert_eq!(installation["executable"].as_str(), Some("habeas"));
assert_eq!(installation["global"].as_bool(), Some(true));
let hooks = symposium["hooks"].as_array().unwrap();
assert_eq!(hooks.len(), 1);
assert_eq!(hooks[0]["event"].as_str(), Some("SessionStart"));
assert_eq!(hooks[0]["command"], installation["executable"]);
assert_eq!(
hooks[0]["args"],
toml::Value::Array(vec!["hook".into(), "session-start".into()])
);
}
Other sources
Input 1: requirements selection requirements.integration.symposium_cli
requirements.integration.symposium_cli:md/requirements/integration.md:52–54
:::{req} symposium_cli
The enabled Habeas Symposium plugin MUST request a global Cargo installation of the `habeas` CLI and use that installation as its session-start hook command, so the CLI is available when the hook advises an agent to run `habeas setup`.
:::