refactor(hive-c0re): drop the request_init_config tool and InitConfig approval
swarm-controller's `InitAgentConfigRepo` node already covers config-repo creation, so this deletes a duplicate rather than a capability; old `init_config` rows are skipped by `collect_lenient` with no migration, by operator decision. Refs #4398
This commit is contained in:
parent
3f086bc659
commit
a3b672d1d5
31 changed files with 134 additions and 601 deletions
|
|
@ -106,11 +106,10 @@ fn config_bind_source(name: &str) -> PathBuf {
|
|||
/// hive-c0re still reads it directly on the host (`stats::hive_stats`),
|
||||
/// which needs no bind mount into the parent.
|
||||
///
|
||||
/// ⚠️ The seeding done at `InitConfig` approval is **not** affected by the
|
||||
/// `config` flag and must not be read as a reason to widen it: that runs
|
||||
/// as hive-c0re against the host path (see `actions.rs`, which seeds the
|
||||
/// repo and wires its forge remote inline), and `read_only` on a bind
|
||||
/// constrains writers *inside* the container only.
|
||||
/// ⚠️ The config-repo seeding hive-c0re does at spawn is **not** affected by
|
||||
/// the `config` flag and must not be read as a reason to widen it: that runs
|
||||
/// as hive-c0re against the host path (see `lifecycle::setup_proposed`), and
|
||||
/// `read_only` on a bind constrains writers *inside* the container only.
|
||||
fn bind_child_agent_dirs(child: &str, binds: &mut Vec<BindMount>) {
|
||||
let Ok(child) = hive_types::Ident::parse(child) else {
|
||||
tracing::warn!(%child, "skipping child bind: invalid agent name");
|
||||
|
|
|
|||
|
|
@ -171,8 +171,6 @@ pub async fn setup_applied(
|
|||
/// valid session; credential files inside (`.credentials.json` etc.) are 0600 so
|
||||
/// secrets stay private regardless of the directory mode. Idempotent: existing
|
||||
/// dirs are left untouched (an agent's OAuth tokens survive `destroy`/recreate).
|
||||
/// Public for the `InitConfig` approval path in `actions.rs` which seeds
|
||||
/// dirs without calling the full `spawn`.
|
||||
pub fn ensure_claude_dir(claude_dir: &Path) -> Result<()> {
|
||||
use std::io;
|
||||
if !claude_dir.exists() {
|
||||
|
|
@ -208,9 +206,9 @@ pub fn ensure_claude_dir(claude_dir: &Path) -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Public for the `InitConfig` approval path in `actions.rs` which seeds
|
||||
/// dirs without calling the full `spawn`. Also creates the sibling `harness/`
|
||||
/// dir so the first harness startup can write its sqlite files immediately.
|
||||
/// Create the per-agent state dir if missing. Also creates the sibling
|
||||
/// `harness/` dir so the first harness startup can write its sqlite files
|
||||
/// immediately.
|
||||
pub fn ensure_state_dir(notes_dir: &Path) -> Result<()> {
|
||||
if !notes_dir.exists() {
|
||||
std::fs::create_dir_all(notes_dir)
|
||||
|
|
|
|||
Loading…
Reference in a new issue