Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

Revert "Merge PR #904 into main"

AkitaOnRails2c4fa067471e
diff --git a/crates/ai-memory-cli/src/commands/serve.rs b/crates/ai-memory-cli/src/commands/serve.rs
index ad8206c6..3a54085f 100644
--- a/crates/ai-memory-cli/src/commands/serve.rs
+++ b/crates/ai-memory-cli/src/commands/serve.rs
@@ -636,21 +636,6 @@ fn exposure_banner(exposure: HttpExposure, local_addr: SocketAddr) -> Option<Str
}
}
-/// The `/admin/status` view of an exposure verdict.
-///
-/// Separate from [`exposure_banner`] because the two answer different
-/// questions: the banner is read once at startup, this is polled afterwards.
-/// They must not be able to disagree, so both derive from the same
-/// [`HttpExposure`] and a test pins that.
-fn exposure_report(exposure: HttpExposure) -> ai_memory_mcp::admin::HttpExposureReport {
- use ai_memory_mcp::admin::HttpExposureReport as Report;
- match exposure {
- HttpExposure::Safe => Report::Safe,
- HttpExposure::InsecureByOverride => Report::UnauthenticatedByOverride,
- HttpExposure::UndeterminedInContainer => Report::UnauthenticatedInContainer,
- }
-}
-
/// Validate the trusted proxy's least-privilege credential and optional stable
/// root identity before binding the server.
fn validate_trusted_proxy_auth(auth: &AuthSettings) -> Result<()> {
@@ -1363,11 +1348,6 @@ pub async fn run(config: &Config, args: ServeArgs) -> Result<()> {
sanitizer: sanitizer.clone(),
data_dir: config.data_dir.clone(),
});
- // Shared with the post-bind exposure record below: the verdict needs
- // the bound address, which is not known until the listener exists.
- let http_exposure_cell: std::sync::Arc<
- std::sync::OnceLock<ai_memory_mcp::admin::HttpExposureReport>,
- > = std::sync::Arc::new(std::sync::OnceLock::new());
let admin = admin_router_with_sweep_tuning(
AdminState {
ingest_metrics: ingest_metrics.clone(),
@@ -1385,7 +1365,6 @@ pub async fn run(config: &Config, args: ServeArgs) -> Result<()> {
data_dir: config.data_dir.clone(),
db_path: store.db_path().to_path_buf(),
bind: bind.clone(),
- http_exposure: http_exposure_cell.clone(),
home_dir: config.home_dir.clone(),
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: config
@@ -1589,9 +1568,6 @@ pub async fn run(config: &Config, args: ServeArgs) -> Result<()> {
body_limit_mb = MAX_BODY_BYTES / 1024 / 1024,
"MCP HTTP server ready (POST /mcp, POST /hook, Ctrl-C to stop)",
);
- // Record the verdict for `/admin/status` before announcing it, so a
- // poller and the startup banner cannot disagree (#902).
- let _ = http_exposure_cell.set(exposure_report(exposure));
// Unconditional: see `exposure_banner` for why this does not ride
// on the tracing filter.
if let Some(banner) = exposure_banner(exposure, local_addr) {
@@ -3114,38 +3090,6 @@ mod tests {
assert_eq!(exposure_banner(authed, quick_start), None);
}
- /// The polled verdict and the startup banner must not be able to disagree:
- /// an operator seeing `safe` in `ai-memory status` while the banner said
- /// otherwise would trust the wrong one.
- #[test]
- fn the_status_report_agrees_with_the_startup_banner() {
- use ai_memory_mcp::admin::HttpExposureReport as Report;
- let addr: SocketAddr = "0.0.0.0:49374".parse().expect("valid test address");
-
- for exposure in [
- HttpExposure::Safe,
- HttpExposure::InsecureByOverride,
- HttpExposure::UndeterminedInContainer,
- ] {
- let reported = exposure_report(exposure);
- let banner = exposure_banner(exposure, addr);
- assert_eq!(
- reported == Report::Safe,
- banner.is_none(),
- "{exposure:?} reported {reported:?} but banner was {banner:?}"
- );
- }
-
- assert_eq!(
- exposure_report(HttpExposure::InsecureByOverride),
- Report::UnauthenticatedByOverride
- );
- assert_eq!(
- exposure_report(HttpExposure::UndeterminedInContainer),
- Report::UnauthenticatedInContainer
- );
- }
-
/// Regression for #407. The published image binds `0.0.0.0` because that
/// is the only way `-p` publishing works, so the host-side rule above
/// refused every container started from the documented Quick Start and
diff --git a/crates/ai-memory-cli/src/commands/status.rs b/crates/ai-memory-cli/src/commands/status.rs
index 6e1045f3..a73e22bc 100644
--- a/crates/ai-memory-cli/src/commands/status.rs
+++ b/crates/ai-memory-cli/src/commands/status.rs
@@ -25,31 +25,7 @@ struct IngestReport {
last_persisted_ms: Option<u64>,
}
-/// A server that predates #902 sends no verdict. Reported as `unknown` rather
-/// than assumed safe — guessing here would be the failure this feature exists
-/// to prevent.
-fn unknown_exposure() -> ai_memory_mcp::admin::HttpExposureReport {
- ai_memory_mcp::admin::HttpExposureReport::Unknown
-}
-
/// Server-shaped response. Mirrors `ai_memory_mcp::admin::StatusReport`.
-/// One line an operator can read without knowing the enum. The unauthenticated
-/// cases say what to do, because a status line that only names a state leaves
-/// the reader to go looking for the remedy.
-fn describe_exposure(exposure: ai_memory_mcp::admin::HttpExposureReport) -> &'static str {
- use ai_memory_mcp::admin::HttpExposureReport as E;
- match exposure {
- E::Safe => "safe (loopback-only, or authenticated)",
- E::UnauthenticatedByOverride => {
- "UNAUTHENTICATED - started with --allow-insecure-no-auth; anyone who can reach the bind address can call destructive tools"
- }
- E::UnauthenticatedInContainer => {
- "UNAUTHENTICATED - no AI_MEMORY_AUTH_TOKEN; reachability depends on the host publish spec. Run `ai-memory generate-auth-token` and set AI_MEMORY_AUTH_TOKEN"
- }
- E::Unknown => "unknown (server did not report one)",
- }
-}
-
#[derive(Debug, Deserialize, Serialize)]
struct Report {
/// Server binary version.
@@ -58,11 +34,6 @@ struct Report {
data_dir: String,
/// Server bind address.
bind: String,
- /// Whether that bind is reachable without a credential (#902).
- /// `#[serde(default)]` so this CLI still renders the rest of the report
- /// against a server old enough not to send the field.
- #[serde(default = "unknown_exposure")]
- http_exposure: ai_memory_mcp::admin::HttpExposureReport,
/// Server-side SQLite path.
db_path: String,
/// Lifetime counts.
@@ -269,7 +240,6 @@ pub async fn run(config: &Config, args: StatusArgs) -> Result<()> {
"version": report.version,
"data_dir": report.data_dir,
"bind": report.bind,
- "http_exposure": report.http_exposure,
"db_path": report.db_path,
"counts": {
"pages_latest": report.counts.pages_latest,
@@ -293,10 +263,6 @@ pub async fn run(config: &Config, args: StatusArgs) -> Result<()> {
println!(" data-dir: {}", report.data_dir);
println!(" db: {}", report.db_path);
println!(" bind: {}", report.bind);
- println!(
- " exposure: {}",
- describe_exposure(report.http_exposure)
- );
println!(
" pages: {} (all versions: {})",
report.counts.pages_latest, report.counts.pages_all
@@ -723,51 +689,4 @@ mod tests {
assert_eq!(spool_age_line(Some(3_661_000)), "1h 1m");
assert_eq!(spool_age_line(Some(172_800_000)), "2d 0h");
}
- /// A server predating #902 sends no `http_exposure`. The CLI must still
- /// render the report, and must not read the absence as "safe" — that would
- /// be the exact false reassurance this feature exists to prevent.
- #[test]
- fn an_older_server_without_the_field_reads_as_unknown_not_safe() {
- use ai_memory_mcp::admin::HttpExposureReport as E;
-
- let without: Report = serde_json::from_value(serde_json::json!({
- "version": "2.3.0",
- "data_dir": "/data",
- "bind": "0.0.0.0:49374",
- "db_path": "/data/ai-memory.db",
- "counts": { "pages_latest": 0, "pages_all": 0, "sessions": 0, "observations": 0 },
- }))
- .expect("an older server's status must still deserialise");
- assert_eq!(without.http_exposure, E::Unknown);
- assert_ne!(without.http_exposure, E::Safe);
-
- let with: Report = serde_json::from_value(serde_json::json!({
- "version": "2.4.0",
- "data_dir": "/data",
- "bind": "0.0.0.0:49374",
- "db_path": "/data/ai-memory.db",
- "counts": { "pages_latest": 0, "pages_all": 0, "sessions": 0, "observations": 0 },
- "http_exposure": "unauthenticated-in-container",
- }))
- .expect("a current server's status must deserialise");
- assert_eq!(with.http_exposure, E::UnauthenticatedInContainer);
- }
-
- /// The unauthenticated lines have to carry the remedy: an operator reading
- /// `ai-memory status` should not have to go looking for what to do.
- #[test]
- fn unauthenticated_states_are_described_with_their_remedy() {
- use ai_memory_mcp::admin::HttpExposureReport as E;
-
- assert!(describe_exposure(E::Safe).contains("safe"));
- assert!(describe_exposure(E::Unknown).contains("unknown"));
-
- let override_line = describe_exposure(E::UnauthenticatedByOverride);
- assert!(override_line.contains("UNAUTHENTICATED"));
- assert!(override_line.contains("--allow-insecure-no-auth"));
-
- let container_line = describe_exposure(E::UnauthenticatedInContainer);
- assert!(container_line.contains("UNAUTHENTICATED"));
- assert!(container_line.contains("AI_MEMORY_AUTH_TOKEN"));
- }
}
diff --git a/crates/ai-memory-mcp/src/admin.rs b/crates/ai-memory-mcp/src/admin.rs
index 3a612fe0..98e8440e 100644
--- a/crates/ai-memory-mcp/src/admin.rs
+++ b/crates/ai-memory-mcp/src/admin.rs
@@ -97,28 +97,6 @@ struct SweepTuning {
compact_cold_episodic: bool,
}
-/// How the HTTP listener is exposed, as reported by `/admin/status`.
-///
-/// `serve` already refuses to start in the genuinely indefensible cases and
-/// prints a banner for the rest (#902). This carries the same verdict to a
-/// surface an operator can poll after deploy, which is the half that catches a
-/// `.env.production` where `AI_MEMORY_AUTH_TOKEN` was never filled in — nobody
-/// is watching the startup output of a container three weeks later.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
-#[serde(rename_all = "kebab-case")]
-pub enum HttpExposureReport {
- /// Loopback-only, or authenticated.
- Safe,
- /// Unauthenticated on a non-loopback address by explicit operator override.
- UnauthenticatedByOverride,
- /// Unauthenticated inside a container, where the bind address proves
- /// nothing about reachability — the host publish spec decides.
- UnauthenticatedInContainer,
- /// The server never recorded a verdict. Reported rather than guessed: an
- /// older server behind a newer CLI, or a transport that never binds HTTP.
- Unknown,
-}
-
/// Shared state for the admin router.
#[derive(Clone)]
pub struct AdminState {
@@ -155,11 +133,6 @@ pub struct AdminState {
pub db_path: PathBuf,
/// Server's bind address — informational, surfaced in /admin/status.
pub bind: String,
- /// HTTP exposure verdict, recorded by `serve` once the listener is bound.
- /// A cell rather than a plain value because the verdict needs the *bound*
- /// address, which is only known after `AdminState` is built. Unset reads as
- /// [`HttpExposureReport::Unknown`].
- pub http_exposure: Arc<std::sync::OnceLock<HttpExposureReport>>,
/// Server home directory resolved once at config load. Used to keep admin
/// audits consistent with the hook router's cwd-prefix guard.
pub home_dir: Option<String>,
@@ -1158,10 +1131,6 @@ pub struct StatusReport {
pub data_dir: String,
/// Bind address the HTTP transport is listening on.
pub bind: String,
- /// Whether that bind is reachable without a credential (#902). Polled
- /// after deploy, this catches the unauthenticated case that a startup-only
- /// banner cannot.
- pub http_exposure: HttpExposureReport,
/// Absolute SQLite path inside `data_dir`.
pub db_path: String,
/// Lifetime counts: pages_latest, pages_all, sessions, observations.
@@ -1277,11 +1246,6 @@ async fn handle_status(
version: env!("CARGO_PKG_VERSION").to_string(),
data_dir: state.data_dir.display().to_string(),
bind: state.bind.clone(),
- http_exposure: state
- .http_exposure
- .get()
- .copied()
- .unwrap_or(HttpExposureReport::Unknown),
db_path: state.db_path.display().to_string(),
counts,
derived,
@@ -7756,7 +7720,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -7824,7 +7787,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49376".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -7950,7 +7912,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49375".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -8187,7 +8148,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -8383,7 +8343,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -8564,7 +8523,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -8922,7 +8880,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -10423,7 +10380,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -10534,7 +10490,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -10638,7 +10593,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -10748,7 +10702,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -11297,7 +11250,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: Some(pepper),
@@ -11355,7 +11307,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: Some(pepper.clone()),
@@ -11792,7 +11743,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: Some(ai_memory_store::TokenPepper::new("test-pepper-admin")),
@@ -11925,7 +11875,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: Some(ai_memory_store::TokenPepper::new("test-pepper-admin")),
@@ -12357,7 +12306,6 @@ mod tests {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_audit_log.rs b/crates/ai-memory-mcp/tests/suite/admin_audit_log.rs
index af86ab7e..99ca92f6 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_audit_log.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_audit_log.rs
@@ -27,7 +27,6 @@ async fn make_admin_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_backup.rs b/crates/ai-memory-mcp/tests/suite/admin_backup.rs
index d1a7e5da..bdb474e7 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_backup.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_backup.rs
@@ -37,7 +37,6 @@ async fn make_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_bootstrap.rs b/crates/ai-memory-mcp/tests/suite/admin_bootstrap.rs
index eed010e4..a7700657 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_bootstrap.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_bootstrap.rs
@@ -34,7 +34,6 @@ async fn make_admin_state(tmp: &TempDir) -> AdminState {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_move.rs b/crates/ai-memory-mcp/tests/suite/admin_move.rs
index 44957257..94a6f05f 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_move.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_move.rs
@@ -52,7 +52,6 @@ async fn make_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -84,7 +83,6 @@ async fn make_state_with_chain(tmp: &TempDir, chain: AdmissionChain) -> (AdminSt
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -458,7 +456,6 @@ async fn move_project_carries_source_embedding() {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -752,7 +749,6 @@ async fn true_move_notifies_admission_with_destination_names() {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -809,7 +805,6 @@ async fn make_state_with_embedder(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -1039,7 +1034,6 @@ fn build_state(store: &Store, tmp: &TempDir) -> AdminState {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -1538,7 +1532,6 @@ async fn true_move_aborts_when_admission_rejects() {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -1636,7 +1629,6 @@ async fn copy_purge_purge_admission_runs_before_db_destruction() {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -1751,7 +1743,6 @@ async fn move_copy_skips_contributors_webhook_but_runs_others() {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_move_session.rs b/crates/ai-memory-mcp/tests/suite/admin_move_session.rs
index f7a5a1a4..d1072dcb 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_move_session.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_move_session.rs
@@ -44,7 +44,6 @@ async fn make_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_phase3.rs b/crates/ai-memory-mcp/tests/suite/admin_phase3.rs
index 7382316f..4f2db548 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_phase3.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_phase3.rs
@@ -50,7 +50,6 @@ async fn make_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_provider_error_logging.rs b/crates/ai-memory-mcp/tests/suite/admin_provider_error_logging.rs
index 4bd18841..12717403 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_provider_error_logging.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_provider_error_logging.rs
@@ -105,7 +105,6 @@ async fn make_admin_state(tmp: &TempDir, llm: Option<Arc<dyn LlmProvider>>) -> A
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_purge.rs b/crates/ai-memory-mcp/tests/suite/admin_purge.rs
index 4f939289..71e2b391 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_purge.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_purge.rs
@@ -52,7 +52,6 @@ async fn make_state_with_chain(
decay_params: DecayParams::default(),
data_dir: tmp.path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -666,7 +665,6 @@ async fn purge_project_rejecting_admission_leaves_source_intact() {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -770,7 +768,6 @@ async fn purge_project_idempotent_second_call_is_404() {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_read_page.rs b/crates/ai-memory-mcp/tests/suite/admin_read_page.rs
index ae539f55..95d3c675 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_read_page.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_read_page.rs
@@ -29,7 +29,6 @@ async fn make_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_rename.rs b/crates/ai-memory-mcp/tests/suite/admin_rename.rs
index 9ea12be7..e14ee18e 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_rename.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_rename.rs
@@ -37,7 +37,6 @@ async fn make_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -318,7 +317,6 @@ async fn rename_project_pages_still_searchable() {
data_dir: tmp.path().to_path_buf(),
db_path: store.db_path().to_path_buf(),
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
@@ -393,7 +391,6 @@ async fn rename_project_after_purge_returns_404_not_silent_200() {
data_dir: state.data_dir.clone(),
db_path: state.db_path.clone(),
bind: state.bind.clone(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: state.bootstrap_lock.clone(),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_status_search.rs b/crates/ai-memory-mcp/tests/suite/admin_status_search.rs
index 90f1e920..b98a68d7 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_status_search.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_status_search.rs
@@ -31,7 +31,6 @@ async fn make_admin_state(tmp: &TempDir) -> (AdminState, Store) {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:49374".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,
diff --git a/crates/ai-memory-mcp/tests/suite/admin_write_page.rs b/crates/ai-memory-mcp/tests/suite/admin_write_page.rs
index 044c4aae..ef5c58a9 100644
--- a/crates/ai-memory-mcp/tests/suite/admin_write_page.rs
+++ b/crates/ai-memory-mcp/tests/suite/admin_write_page.rs
@@ -31,7 +31,6 @@ async fn make_state(tmp: &TempDir) -> AdminState {
data_dir: tmp.path().to_path_buf(),
db_path,
bind: "127.0.0.1:0".to_string(),
- http_exposure: std::sync::Arc::new(std::sync::OnceLock::new()),
home_dir: None,
bootstrap_lock: std::sync::Arc::new(tokio::sync::Mutex::new(())),
token_pepper: None,