From 9c0e24854f8e58d843b4222c9dd3d66cc5236bd9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 17 May 2026 23:49:03 +0100 Subject: [PATCH] Test remote thread store path boundary --- state/ledgers.msgpack | Bin 123782 -> 124072 bytes .../codex-rs/thread-store/src/remote/mod.rs | 26 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index a2831d733a5419ad8d96c9b4dda69f457ab058a3..f082c2f7b378b73de448c29aebcfbb6995cc03f4 100644 GIT binary patch delta 279 zcmXw!F-rqM5QSMGq_fp>K*VZ8Jd8>jv9hobG?mSz?@=gzV_ho*`kh@~KSf5A2o zut_gg);2=GAL4S+c0RuM-aNc_Uq8A}8!JC(asH>~t;#_qLo2U}vMPBDRz)Z%g;sQ|RV8EXJq1oHl>1*Imxbx3$)yC%-~-V` p4^B~A)K@Jrcq^B!GIH}7#rj(BZkF}4UD+SV?Y&W!4clMOe*xOPW?cXP delta 49 zcmZ2+lD+LX`vhgC$37cXr!g}6HSb~EzK4-<%R{k-Ek*`LX1WHZx`yT ThreadStoreError { message: format!("remote thread store does not implement {method} yet"), } } + +#[cfg(test)] +mod tests { + use super::*; + + #[tokio::test] + async fn rollout_path_read_rejects_remote_store_without_downcast() { + let store = RemoteThreadStore::new("http://127.0.0.1:9"); + + let error = store + .read_thread_by_rollout_path(ReadThreadByRolloutPathParams { + rollout_path: "rollout.jsonl".into(), + include_archived: true, + include_history: false, + }) + .await + .expect_err("remote rollout path read should be rejected before network access"); + + match error { + ThreadStoreError::InvalidRequest { message } => { + assert!(message.contains("local thread stores")); + } + other => panic!("expected invalid request, got {other:?}"), + } + } +}