diff --git a/MODULE.bazel b/MODULE.bazel index 32e9f1abbc6..580235adc37 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -2,7 +2,14 @@ module(name = "tracedecay", version = "0.0.0") bazel_dep(name = "platforms", version = "1.1.0") bazel_dep(name = "bazel_skylib", version = "1.9.2") -bazel_dep(name = "bazel_lib", version = "3.7.2") +bazel_dep(name = "bazel_lib", version = "3.8.0") +# Its sibling-script fast path must publish the batch launcher's manifest to +# the shell payload, whose path does not own the .bat.runfiles tree. +single_version_override( + module_name = "bazel_lib", + patches = ["//scripts:bazel/patches/windows-launcher-runfiles-manifest.patch"], + patch_strip = 1, +) bazel_dep(name = "rules_python", version = "2.5.1") bazel_dep(name = "rules_rust", version = "0.75.0") # Rustc adds every dependency search directory to PATH on Windows; large diff --git a/crates/tracedecay-application/src/lsp_runtime/semantic.rs b/crates/tracedecay-application/src/lsp_runtime/semantic.rs index 3b86306524b..2d9090a7dc8 100644 --- a/crates/tracedecay-application/src/lsp_runtime/semantic.rs +++ b/crates/tracedecay-application/src/lsp_runtime/semantic.rs @@ -252,8 +252,15 @@ impl UpstreamCapabilityInitializationAuthority for CompositeUpstreamCapabilities // answered `Unavailable`. A rustup host without the // `rust-analyzer` component is exactly that shape: the proxy is // on PATH, so the language routes, and only the spawn fails. - let Ok(current) = initializer.upstream_capabilities().await else { - continue; + let current = match initializer.upstream_capabilities().await { + Ok(current) => current, + Err(error) => { + tracing::debug!( + %error, + "routed analyzer initialization did not publish capabilities" + ); + continue; + } }; capabilities.supports_diagnostics |= current.supports_diagnostics; capabilities.semantic.extend(current.semantic); diff --git a/crates/tracedecay-application/src/observability/delivery_recorder.rs b/crates/tracedecay-application/src/observability/delivery_recorder.rs index a483207b590..9f5b0b6a5aa 100644 --- a/crates/tracedecay-application/src/observability/delivery_recorder.rs +++ b/crates/tracedecay-application/src/observability/delivery_recorder.rs @@ -128,18 +128,28 @@ impl BoundedDeliverySettlementRecorderV1 { }) } + #[tracing::instrument( + name = "observability.delivery_recorder.admit", + level = "trace", + skip_all, + fields(receipt_id = tracing::field::Empty) + )] pub fn try_record( &self, settlement: DeliverySettlementV1, ) -> Result { + tracing::trace!(phase = "validate", "delivery receipt admission"); settlement.validate()?; let receipt = DeliveryRecorderSourceReceiptV1::new(settlement, self.identity.clone()) .map_err(map_spool_admission_error)?; + tracing::Span::current().record("receipt_id", tracing::field::debug(receipt.receipt_id)); + tracing::trace!(phase = "admission_lock", "delivery receipt admission"); let _admission = self .core .admission .lock() .map_err(|_| "delivery_settlement_recorder_lock_poisoned")?; + tracing::trace!(phase = "check_lifecycle", "delivery receipt admission"); if self.core.state.load(Ordering::Acquire) != RECORDER_RUNNING { return Err("delivery_settlement_recorder_closed"); } @@ -152,6 +162,7 @@ impl BoundedDeliverySettlementRecorderV1 { } // A full wake queue is safe: the durable receipt is already visible to // the active worker's bounded scan and periodic restart replay. + tracing::trace!(phase = "wake", "delivery receipt admission"); match self.core.wake.try_send(()) { Ok(()) | Err(mpsc::error::TrySendError::Full(())) => { Ok(DeliverySettlementRecordOutcomeV1::Enqueued) diff --git a/crates/tracedecay-application/src/observability/delivery_spool.rs b/crates/tracedecay-application/src/observability/delivery_spool.rs index f5b23493bd8..e05168cf46a 100644 --- a/crates/tracedecay-application/src/observability/delivery_spool.rs +++ b/crates/tracedecay-application/src/observability/delivery_spool.rs @@ -147,16 +147,25 @@ impl DeliveryRecorderSpoolV1 { Ok(spool) } + #[tracing::instrument( + name = "observability.delivery_spool.append", + level = "trace", + skip_all, + fields(receipt_id = ?receipt.receipt_id) + )] pub fn append( &self, receipt: &DeliveryRecorderSourceReceiptV1, ) -> Result { + tracing::trace!(phase = "validate", "delivery spool append"); receipt.validate()?; + tracing::trace!(phase = "state_lock", "delivery spool append"); let mut state = self .state .lock() .map_err(|_| DeliveryRecorderSpoolError::LockPoisoned)?; let path = self.receipt_path(receipt.receipt_id); + tracing::trace!(phase = "read_existing", "delivery spool append"); if let Some(bytes) = read_bounded(&path, MAX_RECEIPT_BYTES).map_err(map_read_error)? { if !state.receipt_paths.contains(&path) { return Err(DeliveryRecorderSpoolError::Corrupt); @@ -170,25 +179,39 @@ impl DeliveryRecorderSpoolV1 { if state.receipt_paths.len() >= MAX_PENDING_RECEIPTS { return Err(DeliveryRecorderSpoolError::Full); } + tracing::trace!(phase = "encode", "delivery spool append"); let bytes = canonical_json_bytes(receipt) .map_err(|_| DeliveryRecorderSpoolError::InvalidReceipt)?; if bytes.is_empty() || bytes.len() > MAX_RECEIPT_BYTES { return Err(DeliveryRecorderSpoolError::InvalidReceipt); } + tracing::trace!( + phase = "publish", + bytes = bytes.len(), + "delivery spool append" + ); atomic_write(&path, "delivery", &bytes, DIRECTORY_POLICY) .map_err(|_| DeliveryRecorderSpoolError::Io)?; state.receipt_paths.insert(path); + tracing::trace!(phase = "completed", "delivery spool append"); Ok(true) } + #[tracing::instrument( + name = "observability.delivery_spool.pending", + level = "trace", + skip_all + )] pub fn pending( &self, limit: usize, ) -> Result, DeliveryRecorderSpoolError> { + tracing::trace!(phase = "state_lock", "delivery spool pending read"); let state = self .state .lock() .map_err(|_| DeliveryRecorderSpoolError::LockPoisoned)?; + tracing::trace!(phase = "read_batch", "delivery spool pending read"); let mut receipts = Vec::new(); for path in state .receipt_paths @@ -218,14 +241,21 @@ impl DeliveryRecorderSpoolV1 { /// Removes settled receipts and syncs the spool directory once for all of /// them. A removal lost before that sync only replays a settled receipt, /// which settlement answers idempotently. + #[tracing::instrument( + name = "observability.delivery_spool.acknowledge", + level = "trace", + skip_all + )] pub fn acknowledge( &self, receipt_ids: &[[u8; 16]], ) -> Result { + tracing::trace!(phase = "state_lock", "delivery spool acknowledgement"); let mut state = self .state .lock() .map_err(|_| DeliveryRecorderSpoolError::LockPoisoned)?; + tracing::trace!(phase = "unlink_batch", "delivery spool acknowledgement"); let mut removed = 0; for receipt_id in receipt_ids { let path = self.receipt_path(*receipt_id); @@ -245,6 +275,7 @@ impl DeliveryRecorderSpoolV1 { removed += 1; } if removed > 0 { + tracing::trace!(phase = "sync_directory", "delivery spool acknowledgement"); sync_directory(&self.root, DIRECTORY_POLICY) .map_err(|_| DeliveryRecorderSpoolError::Io)?; } diff --git a/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs b/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs index 660a467bd01..65adf5e1f84 100644 --- a/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs +++ b/crates/tracedecay-automation-runtime/src/automation/effect_runtime/settlement.rs @@ -1717,15 +1717,6 @@ fn settle_bound_owner_with_budget( mut state: RetainedBoundSettlement, budget: Duration, ) -> Result> { - #[cfg(test)] - let _capture = state.phase_hook.as_ref().map(|_| { - tracedecay_runtime_core::logging::FormattedTracingCapture::start_with_span_timings() - }); - #[cfg(test)] - let _capture_span = state.phase_hook.as_ref().map(|_| { - tracing::info_span!("daemon.automation.retained_owner", run_id = %state.ledger.run_id) - .entered() - }); let started = std::time::Instant::now(); let mut delay = Duration::from_millis(25); loop { diff --git a/crates/tracedecay-global-db/src/registered/workflow_schema_tests.rs b/crates/tracedecay-global-db/src/registered/workflow_schema_tests.rs index 01e87f7f53c..2973d16e469 100644 --- a/crates/tracedecay-global-db/src/registered/workflow_schema_tests.rs +++ b/crates/tracedecay-global-db/src/registered/workflow_schema_tests.rs @@ -1074,10 +1074,36 @@ mod published_artifact_ceiling { let stride = (total_polls / 12).max(1); let mut cancelled_published = 0; + // Each convergence joins its exact runtime retirement. Reuse the + // canonically initialized store, restoring the upgrade's inputs and + // proving the entire workflow state before admitting a fresh runtime. + let store = &reference.store; for cancel_at in (1..total_polls).step_by(stride) { - let daemon_store = DaemonPublishedStore::create().await; - let store = &daemon_store.store; - store.run(BULK_ROWS); + { + let mut connection = Connection::open(&store.path).unwrap(); + let transaction = connection.transaction().unwrap(); + republish(&transaction, &before.table_sql, &before.digest); + { + let mut insert = transaction + .prepare( + "INSERT INTO workflow_artifact_payloads + (rowid, payload_digest, byte_length, payload) + VALUES (?1, ?2, ?3, ?4)", + ) + .unwrap(); + for (rowid, digest, byte_length, payload) in &before.artifacts { + insert + .execute(rusqlite::params![rowid, digest, byte_length, payload]) + .unwrap(); + } + } + transaction.commit().unwrap(); + } + assert_eq!( + store.state(), + before, + "poll {cancel_at} must start from the published workflow state" + ); let (outcome, _) = converge_cancelled_at(&store.path, cancel_at).await; let state = store.state(); match outcome { diff --git a/crates/tracedecay-lsp/src/analyzer/client.rs b/crates/tracedecay-lsp/src/analyzer/client.rs index 44d17dfffbf..7e94f50be60 100644 --- a/crates/tracedecay-lsp/src/analyzer/client.rs +++ b/crates/tracedecay-lsp/src/analyzer/client.rs @@ -717,8 +717,11 @@ impl StdioLspClient { result = initialize => match result { Ok(response) => response, Err(error) => { + // Termination settles the stderr reader as well as the child. + // Include its final captured bytes in the startup failure. + let terminated = process.terminate().await; let error = enrich_start_error(command, error, &process.stderr()); - return match process.terminate().await { + return match terminated { Ok(_) => StdioLspClientStartupSettlement::Failed(error), Err(reap_error) => StdioLspClientStartupSettlement::ReapFailed( TraceDecayError::Config { diff --git a/crates/tracedecay-runtime-core/src/logging.rs b/crates/tracedecay-runtime-core/src/logging.rs index 701629d6f01..94cba0b7b6c 100644 --- a/crates/tracedecay-runtime-core/src/logging.rs +++ b/crates/tracedecay-runtime-core/src/logging.rs @@ -279,34 +279,21 @@ impl FormattedTracingCapture { /// before the first captured event. #[must_use] pub fn start() -> Self { - Self::start_with_output(false, false) + Self::start_with_output(false) } /// Also writes each line to stderr so a terminated measurement retains /// the events emitted before its deadline. #[must_use] pub fn start_with_stderr() -> Self { - Self::start_with_output(true, false) + Self::start_with_output(true) } - /// Captures span admission and completion timings as well as events, - /// retaining live stderr if the measurement is terminated before reporting. - #[must_use] - pub fn start_with_span_timings() -> Self { - Self::start_with_output(true, true) - } - - fn start_with_output(stderr: bool, span_timings: bool) -> Self { + fn start_with_output(stderr: bool) -> Self { let bytes = std::sync::Arc::new(Mutex::new(Vec::new())); let subscriber = tracing_subscriber::fmt() .with_max_level(tracing::Level::TRACE) .with_ansi(false) - .with_span_events(if span_timings { - tracing_subscriber::fmt::format::FmtSpan::NEW - | tracing_subscriber::fmt::format::FmtSpan::CLOSE - } else { - tracing_subscriber::fmt::format::FmtSpan::NONE - }) .with_writer(CaptureBuffer(std::sync::Arc::clone(&bytes), stderr)); let guard = if stderr { set_tracing_capture( diff --git a/crates/tracedecay-session-runtime/src/session_temporal_refresh_scheduler/worker.rs b/crates/tracedecay-session-runtime/src/session_temporal_refresh_scheduler/worker.rs index db75ea94891..1fb7aa5e746 100644 --- a/crates/tracedecay-session-runtime/src/session_temporal_refresh_scheduler/worker.rs +++ b/crates/tracedecay-session-runtime/src/session_temporal_refresh_scheduler/worker.rs @@ -1607,7 +1607,6 @@ async fn commit_deferred_begins<'a>( } async fn drain_staged_completions<'a>( - database: &RegisteredGlobalDbLeaseV1, access: &SessionTemporalAccess<'_, RegisteredGlobalDb>, store: &SessionTemporalStore<'_, tracedecay_global_db::RegisteredGlobalDb>, state: &'a SessionTemporalRefreshWakeState, @@ -1654,31 +1653,12 @@ async fn drain_staged_completions<'a>( } } } - let snapshot = - match native_runtime::timeout(policy.operation_deadline, database.as_ref().read_snapshot()) - .await - { - Err(error) => { - record_deadline_failure(report, "snapshot", error); - return; - } - Ok(Ok(snapshot)) => snapshot, - Ok(Err(error)) => { - report.last_error = Some(format!("{error:?}")); - report.retryable_errors += 1; - report.observe_retry(SessionTemporalRefreshRetryClass::Storage); - return; - } - }; let mut applied = Vec::with_capacity(survivors.len()); for item in survivors { match native_runtime::timeout( policy.operation_deadline, - access.apply_candidate_relation_projection( - &snapshot, - &item.projection, - &state.completion_control(), - ), + access + .apply_candidate_relation_projection(&item.projection, &state.completion_control()), ) .await { @@ -1691,9 +1671,6 @@ async fn drain_staged_completions<'a>( } } } - // The commit below is a writer phase; the verification snapshot must not - // hold its WAL read slot through it. - drop(snapshot); if applied.is_empty() { return; } @@ -2320,7 +2297,6 @@ pub async fn run_session_temporal_refresh_pass( committed.await; let drained: Pin + Send + '_>> = Box::pin(drain_staged_completions( - database, &access, &store, state, diff --git a/crates/tracedecay-session-temporal-store/src/projection/tests.rs b/crates/tracedecay-session-temporal-store/src/projection/tests.rs index 66367dbafdd..f4c08a5b474 100644 --- a/crates/tracedecay-session-temporal-store/src/projection/tests.rs +++ b/crates/tracedecay-session-temporal-store/src/projection/tests.rs @@ -868,12 +868,10 @@ async fn grouped_completion_revalidates_evidence_after_staging() { .unwrap() .remove(0) .unwrap(); - let snapshot = database.read_snapshot().await.unwrap(); let verified = access - .apply_candidate_relation_projection(&snapshot, &relation_projection, &control) + .apply_candidate_relation_projection(&relation_projection, &control) .await .unwrap(); - drop(snapshot); let generation = tracedecay_domain::SessionProjectionGenerationV1::new(verified.generation).unwrap(); let validation_snapshot = database.read_snapshot().await.unwrap(); diff --git a/crates/tracedecay-session-temporal-store/src/rebuild.rs b/crates/tracedecay-session-temporal-store/src/rebuild.rs index 16e3608ca08..12213689224 100644 --- a/crates/tracedecay-session-temporal-store/src/rebuild.rs +++ b/crates/tracedecay-session-temporal-store/src/rebuild.rs @@ -10,7 +10,7 @@ use tracing::Instrument as _; use super::projection::{base_source_frontier, canonical_parent_message_resolver}; use super::query::{ACTIVATE_OPERATION, now_micros, storage, storage_message}; use super::relation_projection::candidate_session_relation_projection; -use super::relation_receipts::{record_relation_receipt, write_relation_projection_on_snapshot}; +use super::relation_receipts::{record_relation_receipt, write_relation_projection}; use super::relations::{SessionRelationError, SessionRelationProjection}; use super::store::execution_control_graph_cancellation; use crate::handle::{SessionTemporalExec, SessionTemporalRegisteredDb, SessionTemporalWriteTxn}; @@ -52,20 +52,7 @@ pub(super) async fn rebuild_candidate_session_relations( .map_err(|error| storage(operation, error))?; checkpoint_relation_rebuild_control(control)?; - let snapshot = database - .read_snapshot() - .await - .map_err(|error| storage(operation, error))?; - let applied = apply_candidate_relation_projection( - database, - &snapshot, - &reconstructed, - control, - operation, - ) - .await; - drop(snapshot); - applied + apply_candidate_relation_projection(database, &reconstructed, control, operation).await } pub(super) async fn reconstruct_candidate_session_relations( @@ -204,10 +191,10 @@ pub(super) async fn record_relation_receipts_group( Ok(outcomes) } -/// `snapshot` already contains the pending receipt. +/// The candidate's pending receipt must already be committed. Its reader is +/// released before native graph publication and verification. pub(super) async fn apply_candidate_relation_projection( database: &impl SessionTemporalRegisteredDb, - snapshot: &tracedecay_runtime_core::db::DatabaseEngineReadSnapshot, projection: &SessionRelationProjection, control: &ExecutionControl, operation: &'static str, @@ -217,9 +204,7 @@ pub(super) async fn apply_candidate_relation_projection( .map_err(|error| storage(operation, error))?; let apply_cancellation = execution_control_graph_cancellation(control); checkpoint_relation_rebuild_control(control)?; - let applied = - write_relation_projection_on_snapshot(database, snapshot, projection, apply_cancellation) - .await; + let applied = write_relation_projection(database, projection, apply_cancellation).await; checkpoint_relation_rebuild_control(control)?; applied?; diff --git a/crates/tracedecay-session-temporal-store/src/refresh.rs b/crates/tracedecay-session-temporal-store/src/refresh.rs index 07fae9c099d..b6492f799c3 100644 --- a/crates/tracedecay-session-temporal-store/src/refresh.rs +++ b/crates/tracedecay-session-temporal-store/src/refresh.rs @@ -1325,13 +1325,11 @@ impl SessionTemporalAccess<'_, D> { pub async fn apply_candidate_relation_projection( &self, - snapshot: &tracedecay_runtime_core::db::DatabaseEngineReadSnapshot, projection: &SessionRelationProjection, execution_control: &ExecutionControl, ) -> SessionStoreResult { apply_candidate_relation_projection( self.inner(), - snapshot, projection, execution_control, COMPLETE_REFRESH, diff --git a/crates/tracedecay-session-temporal-store/src/relation_receipts.rs b/crates/tracedecay-session-temporal-store/src/relation_receipts.rs index 650e8ef0482..597cbea03a2 100644 --- a/crates/tracedecay-session-temporal-store/src/relation_receipts.rs +++ b/crates/tracedecay-session-temporal-store/src/relation_receipts.rs @@ -151,22 +151,25 @@ pub(crate) async fn write_relation_projection( .read_snapshot() .await .map_err(|error| storage(RECEIPT_OPERATION, error))?; - write_relation_projection_on_snapshot(database, &snapshot, projection, cancellation).await -} - -pub(crate) async fn write_relation_projection_on_snapshot( - database: &impl SessionTemporalRegisteredDb, - snapshot: &tracedecay_runtime_core::db::DatabaseEngineReadSnapshot, - projection: &SessionRelationProjection, - cancellation: Arc, -) -> SessionStoreResult { let (expected, _) = expected_receipt( - snapshot, + &snapshot, &projection.session_id, SessionProjectionGenerationV1::new(projection.generation) .map_err(|error| storage(RECEIPT_OPERATION, error))?, ) .await?; + // Native graph I/O does not read this snapshot. Release its WAL slot + // before publishing; the completion writer rechecks the exact receipt. + drop(snapshot); + write_relation_projection_with_receipt(database, projection, expected, cancellation) +} + +fn write_relation_projection_with_receipt( + database: &impl SessionTemporalRegisteredDb, + projection: &SessionRelationProjection, + expected: GraphWatermark, + cancellation: Arc, +) -> SessionStoreResult { let actual = projection_watermark(projection).map_err(|error| storage(RECEIPT_OPERATION, error))?; if actual != expected { @@ -332,3 +335,124 @@ async fn expected_receipt( )), } } + +#[cfg(test)] +mod tests { + use std::sync::atomic::{AtomicUsize, Ordering}; + + use tracedecay_global_db::tests::harness::{HostAdmissionScope, HostAdmissionTestRuntimeV1}; + use tracedecay_graph_db::NeverCancelled; + use tracedecay_runtime_core::db::DatabaseEngineReadConnection; + use tracedecay_store::{SessionRefreshBeginOrJoinRequestV1, SessionRefreshFrontierV1}; + use tracedecay_temporal_query::execution::ExecutionControl; + + use super::*; + use crate::SessionTemporalAccess; + + struct ReaderReleaseProbe { + reader: DatabaseEngineReadConnection, + checkpoints: AtomicUsize, + } + + impl GraphCancellation for ReaderReleaseProbe { + fn is_cancelled(&self) -> bool { + self.checkpoints.fetch_add(1, Ordering::Relaxed); + let occupancy = self.reader.reader_pool_occupancy().unwrap(); + assert_eq!( + occupancy.leased_general, 0, + "native relation work must not retain the receipt's SQL snapshot" + ); + false + } + } + + #[test] + fn receipt_reader_is_released_before_each_native_relation_publication() { + tracedecay_runtime_core::native_runtime::default_builder() + .worker_threads(2) + .build() + .unwrap() + .block_on(async { + let directory = tempfile::tempdir().unwrap(); + let runtime = HostAdmissionTestRuntimeV1::profile(directory.path()) + .await + .unwrap(); + let database = runtime + .registered_database(HostAdmissionScope::Profile) + .unwrap(); + let (scope, relations) = + SessionTemporalRegisteredDb::session_relation_store(database).unwrap(); + let access = SessionTemporalAccess::new(database); + let mut projections = Vec::new(); + for id in ["receipt-reader-a", "receipt-reader-b"] { + let session_id = SessionId::new(id).unwrap(); + let request = SessionRefreshBeginOrJoinRequestV1::new( + session_id.clone(), + SessionRefreshFrontierV1::new(0, 0).unwrap(), + ); + access + .begin_or_join_session_refresh_result(request) + .await + .unwrap(); + let recovery = access + .session_refresh_recovery_result(&session_id) + .await + .unwrap() + .unwrap(); + projections.push(SessionRelationProjection { + scope: scope.clone(), + session_id, + generation: recovery.candidate_generation().value(), + summaries: Vec::new(), + logical_copies: Vec::new(), + thread_hierarchy: Vec::new(), + agent_hierarchy: Vec::new(), + parent_session_id: None, + workflow_agents: Vec::new(), + }); + } + let expected = access + .record_relation_receipts_group(&projections, &ExecutionControl::default()) + .await + .unwrap(); + let probe = Arc::new(ReaderReleaseProbe { + reader: database.read_connection(), + checkpoints: AtomicUsize::new(0), + }); + for (projection, expected) in projections.iter().zip(expected) { + let before = probe.checkpoints.load(Ordering::Relaxed); + let applied = apply_relation_projection( + database, + projection, + Arc::clone(&probe) as Arc, + ) + .await + .unwrap(); + assert_eq!(applied, expected.unwrap()); + assert!(probe.checkpoints.load(Ordering::Relaxed) > before); + assert!( + relation_receipt_applied( + database, + &projection.session_id, + SessionProjectionGenerationV1::new(projection.generation).unwrap(), + ) + .await + .unwrap() + ); + assert_eq!( + relations + .load_projection( + &scope, + &projection.session_id, + projection.generation, + 100, + 100, + Arc::new(NeverCancelled), + ) + .unwrap(), + *projection + ); + } + }); + } +} diff --git a/crates/tracedecay-session-temporal-store/src/store.rs b/crates/tracedecay-session-temporal-store/src/store.rs index 2b40efedaa1..a7b19def724 100644 --- a/crates/tracedecay-session-temporal-store/src/store.rs +++ b/crates/tracedecay-session-temporal-store/src/store.rs @@ -332,11 +332,6 @@ impl<'a, D: SessionTemporalRegisteredDb + Sync> SessionTemporalStore<'a, D> { let mut complete_items = Vec::new(); let mut complete_sessions = Vec::new(); if !projections.is_empty() { - let apply_snapshot = &self.access().read_snapshot().await.map_err(|_| { - SessionStoreError::InvalidStateTransition { - context: "test temporal fixture apply snapshot", - } - })?; for (index, outcome) in receipt_outcomes.iter().enumerate() { if outcome.is_err() && let Some((session_id, _)) = ready[index].as_ref() @@ -354,7 +349,6 @@ impl<'a, D: SessionTemporalRegisteredDb + Sync> SessionTemporalStore<'a, D> { async move { self.access() .apply_candidate_relation_projection( - apply_snapshot, projection, &ExecutionControl::default(), ) diff --git a/crates/tracedecay/tests/runtime_acceptance_suite/runtime_surface_acceptance.rs b/crates/tracedecay/tests/runtime_acceptance_suite/runtime_surface_acceptance.rs index 1fea2c8882a..dd7f29ebf90 100644 --- a/crates/tracedecay/tests/runtime_acceptance_suite/runtime_surface_acceptance.rs +++ b/crates/tracedecay/tests/runtime_acceptance_suite/runtime_surface_acceptance.rs @@ -2562,11 +2562,13 @@ async fn production_lsp_negotiates_and_projects_canonical_context() { initialized["result"]["capabilities"]["documentSymbolProvider"], true, "a routed analyzer must negotiate the declared document-symbol capability: {initialized}\nIsolated daemon log:\n{}", - fixture.daemon_log_tail() + fixture.daemon_log() ); assert_eq!( - initialized["result"]["capabilities"]["hoverProvider"], true, - "a routed analyzer must negotiate the declared hover capability: {initialized}" + initialized["result"]["capabilities"]["hoverProvider"], + true, + "a routed analyzer must negotiate the declared hover capability: {initialized}\nIsolated daemon log:\n{}", + fixture.daemon_log() ); assert!( initialized["result"]["capabilities"]["definitionProvider"].is_null(), diff --git a/scripts/bazel/patches/windows-launcher-runfiles-manifest.patch b/scripts/bazel/patches/windows-launcher-runfiles-manifest.patch new file mode 100644 index 00000000000..73a93b63068 --- /dev/null +++ b/scripts/bazel/patches/windows-launcher-runfiles-manifest.patch @@ -0,0 +1,18 @@ +diff --git a/lib/windows_utils.bzl b/lib/windows_utils.bzl +--- a/lib/windows_utils.bzl ++++ b/lib/windows_utils.bzl +@@ -90,6 +90,14 @@ + SETLOCAL ENABLEDELAYEDEXPANSION + set RUNFILES_MANIFEST_ONLY=1 + {rlocation_function} ++rem A sibling shell payload has no runfiles tree of its own. Publish the ++rem batch launcher's manifest even when the sibling path skips rlocation. ++if exist "%~f0.runfiles\MANIFEST" ( ++ set "RUNFILES_MANIFEST_FILE=%~f0.runfiles\MANIFEST" ++) else if exist "%~f0.runfiles_manifest" ( ++ set "RUNFILES_MANIFEST_FILE=%~f0.runfiles_manifest" ++) ++ + set "run_script=%~dp0{sh_basename}" + if not exist "!run_script!" call :rlocation "{sh_script}" run_script + set "run_script=!run_script:\=/!"