Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ea2d375
test(supervisor): cancel the mountpoint helper exactly at its private…
danshapiro Oct 23, 2026
b92157b
fix(supervisor): retry stalled Claude source reads and remove late-cr…
danshapiro Oct 23, 2026
d80fab4
test(runtime-broker): hold a helper create to reproduce a stalled Doc…
danshapiro Oct 23, 2026
3ef9c9c
test(parity): rescan the supervisor registry when SQLite removes a fi…
danshapiro Oct 23, 2026
120a8e4
refactor(supervisor): settle a helper create's name ownership in one …
danshapiro Oct 23, 2026
c219548
feat(supervisor): log helper creates Docker answers slowly
danshapiro Oct 23, 2026
23e1033
fix(supervisor): give a Claude source read room to ride out a 43s Doc…
danshapiro Oct 23, 2026
ab0dd17
test(parity): share the registry secret scan and rescan in both parit…
danshapiro Oct 23, 2026
8a6a143
test(runtime-harness): let late helper creates finish before cleanup …
danshapiro Oct 23, 2026
25bbd33
Merge origin/main into fix/managed-helper-create-retry
danshapiro Oct 23, 2026
69b58f0
fix(supervisor): keep removing a helper attempt's objects after its c…
danshapiro Oct 23, 2026
765a7ad
test(supervisor): remove a candidate scratch volume Docker creates af…
danshapiro Oct 23, 2026
f876e49
test(supervisor): give the reader retry tests windows a loaded host k…
danshapiro Oct 23, 2026
4103e65
fix(supervisor): end a recovery's Claude source read inside its recov…
danshapiro Oct 23, 2026
cee409a
feat(supervisor): name the step a timed-out helper attempt was in
danshapiro Oct 23, 2026
74f4648
test(supervisor): widen the reader retry windows for loads near 900
danshapiro Oct 23, 2026
de7cc85
test(runtime-harness): remove the candidate scratch volumes a run's s…
danshapiro Oct 23, 2026
cf0b1e4
Merge origin/main into fix/managed-helper-create-retry
danshapiro Oct 23, 2026
7ac5b72
docs(managed-runtime): record the 48 s stall and the effect of host l…
danshapiro Oct 23, 2026
350b7ca
fix(supervisor): let a helper removal use the time its retry reserved
danshapiro Oct 23, 2026
852094c
Merge origin/main into fix/managed-helper-create-retry
danshapiro Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/freshell-server/src/managed_provider_launch_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,12 @@ impl RuntimeBackend for BrokerAuthorizedBackend {
owner: &freshell_supervisor::backend::ClaudeSourceOwner,
request: &ObserveClaudeSourcesRequest,
test_run_id: &str,
until: tokio::time::Instant,
) -> Result<freshell_platform::claude_inputs::observation::ObservationReply, BackendError> {
self.authorize_claude_candidate(owner, request).await?;
let reply = match self
.real()
.observe_claude_sources(owner, request, test_run_id)
.observe_claude_sources(owner, request, test_run_id, until)
.await
{
Ok(reply) => reply,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ mod tests {
owner: &ClaudeSourceOwner,
request: &ObserveClaudeSourcesRequest,
_: &str,
_: tokio::time::Instant,
) -> Result<freshell_platform::claude_inputs::observation::ObservationReply, BackendError>
{
assert!(matches!(owner, ClaudeSourceOwner::Initial { .. }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ mod uncertain_launch {
_: &ClaudeSourceOwner,
request: &ObserveClaudeSourcesRequest,
_: &str,
_: tokio::time::Instant,
) -> Result<freshell_platform::claude_inputs::observation::ObservationReply, BackendError>
{
let r = &request.observation_request;
Expand Down
21 changes: 19 additions & 2 deletions crates/freshell-supervisor/src/backend.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mod claude_source_observation;
pub mod docker;
mod helper_lifecycle;
pub(crate) use helper_lifecycle::CLAUDE_SOURCE_READER_RETRY;
mod input_publisher;
mod native_auth;
mod native_history;
Expand Down Expand Up @@ -138,11 +140,14 @@ pub enum ClaudeSourceOwner {

#[async_trait]
pub trait RuntimeBackend: Send + Sync {
/// Observe Claude sources through the fixed reader. The read, its owned
/// cleanup included, ends by `until`.
async fn observe_claude_sources(
&self,
_owner: &ClaudeSourceOwner,
_request: &freshell_runtime_protocol::ObserveClaudeSourcesRequest,
_test_run_id: &str,
_until: tokio::time::Instant,
) -> Result<freshell_platform::claude_inputs::observation::ObservationReply, BackendError> {
Err(BackendError::Unavailable(
"Claude native source reader unavailable; retain inputs and reprepare".into(),
Expand Down Expand Up @@ -230,6 +235,8 @@ pub trait RuntimeBackend: Send + Sync {
#[derive(Clone)]
pub struct DockerEngineBackend {
socket_path: PathBuf,
/// The supervisor's lifecycle JSONL, for helper retry and cleanup events.
lifecycle_log: Option<std::sync::Arc<PathBuf>>,
input_publishers:
std::sync::Arc<std::sync::Mutex<BTreeMap<String, input_publisher::HeldPublisher>>>,
input_publication_claims: std::sync::Arc<std::sync::Mutex<std::collections::BTreeSet<String>>>,
Expand All @@ -239,11 +246,19 @@ impl DockerEngineBackend {
pub fn new(socket_path: impl Into<PathBuf>) -> Self {
Self {
socket_path: socket_path.into(),
lifecycle_log: None,
input_publishers: Default::default(),
input_publication_claims: Default::default(),
}
}

/// Record helper retry and late-cleanup events in the supervisor's
/// lifecycle JSONL.
pub fn with_lifecycle_log(mut self, path: impl Into<PathBuf>) -> Self {
self.lifecycle_log = Some(std::sync::Arc::new(path.into()));
self
}

pub async fn ping(&self) -> Result<(), BackendError> {
let response = self.request("GET", "/_ping", None).await?;
if response.status == 200 && response.body.starts_with(b"OK") {
Expand Down Expand Up @@ -709,12 +724,14 @@ impl RuntimeBackend for DockerEngineBackend {
owner: &ClaudeSourceOwner,
request: &freshell_runtime_protocol::ObserveClaudeSourcesRequest,
test_run_id: &str,
until: tokio::time::Instant,
) -> Result<freshell_platform::claude_inputs::observation::ObservationReply, BackendError> {
self.read_claude_source_helper(
self.observe_claude_sources_with(
&helper_lifecycle::CLAUDE_SOURCE_READER_RETRY,
owner,
request,
test_run_id,
std::time::Duration::from_secs(25),
until,
)
.await
}
Expand Down
Loading
Loading