Skip to content
Closed
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions crates/tracedecay-sessions/src/runtime/ingest/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,3 +806,23 @@ fn project_provider_deferral_preserves_existing_deferred_work() {
}
);
}

#[test]
fn a_stopped_batch_worker_is_retryable_and_unavailable() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exercise the stated many-project dashboard journey

When this commit is relied on to verify rendering across many projects, this test cannot detect that regression: it only constructs BatchWorkerStopped and checks its pre-existing failure classification, without enrolling projects, opening project servers, requesting dashboard data, or rendering UI. It therefore remains green if the described 12-project journey still serves zero graphs; add a production-path many-project test and retain this classifier test separately if needed.

AGENTS.md reference: AGENTS.md:L9-L12

Useful? React with 👍 / 👎.

// Distinct from BatchContainsNonDurable, which is permanent: that one means
// the batch itself was invalid, while this one means no verdict was ever
// reached because the worker went away. Re-running the same input can
// succeed, so it must not be classified as permanent.
let error = claude_observation::ClaudeObservationIngestError::Application(
crate::observation::ObservationApplicationError::BatchWorkerStopped,
);

let failure = classify_claude_observation_failure(&error);

assert_eq!(failure.reason_code, "observation_batch_worker_stopped");
assert!(failure.retryable);
assert_eq!(
failure.status,
crate::admission::HostAdmissionStatus::Unavailable
);
}
Loading