Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion benchmark_data/runtime/tests/test_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_dashboard_http_variants_remain_typed_failures(self) -> None:
url,
request_timeout=0.05,
),
readiness_timeout=0.2,
readiness_timeout=2.0,
poll_interval=0.01,
termination_grace=0.05,
)
Expand Down
18 changes: 17 additions & 1 deletion crates/tracedecay-agent-hosts/src/agents/codex/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,23 @@ fn prepare_stages_the_source_and_returns_ready_for_cli_activation() {
let outcome = CodexIntegration
.prepare_non_interactive_install(&install_ctx(home.path()))
.unwrap();
assert!(matches!(outcome, NonInteractiveInstallOutcome::Ready));
// Native activation is `codex plugin add`. Without that CLI the stage is
// still complete, but the typed outcome is the same deferral preflight
// returns rather than a false Ready.
if super::plugin_registry::require_codex_plugin_cli().is_ok() {
assert!(matches!(outcome, NonInteractiveInstallOutcome::Ready));
} else {
let NonInteractiveInstallOutcome::DeferredUserAction(deferred) = outcome else {
panic!("missing Codex CLI must defer native activation, not {outcome:?}");
};
assert!(
deferred
.remediation
.contains("codex plugin add tracedecay@"),
"deferred remediation must name the native plugin add: {}",
deferred.remediation
);
}
assert!(codex_plugin_manifest_path(home.path()).is_file());
assert!(codex_personal_marketplace_path(home.path()).is_file());
assert_eq!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ pub fn try_acquire_code_generation_store_read_lock(
) -> Result<Option<CodeGenerationStoreLockV1>, CodeGenerationRetentionErrorV1> {
let store_root = canonical_store_root(store_root)?;
let lock = open_lock_file(&store_root.join(STORE_LOCK_FILE))?;
match lock
.try_lock_shared()
.map_err(std::io::Error::from)
{
match lock.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(Some(CodeGenerationStoreLockV1 {
file: lock,
store_root,
Expand Down
2 changes: 1 addition & 1 deletion crates/tracedecay-dashboard-api/src/delivery_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2474,7 +2474,7 @@ mod tests {
panic!("a gated mount must project as typed unavailable");
};
assert!(
reason.contains("configure a token"),
reason.contains("Configure a token"),
"the credential gate must tell the reader what to do: {reason}"
);

Expand Down
9 changes: 4 additions & 5 deletions crates/tracedecay-privacy/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,7 @@ fn compile_regex(
///
/// Gitleaks rules are authored for Go's RE2. RE2 and Rust's `regex` share the
/// important restrictions, no backreferences, no lookaround, which is why the
/// catalogue transfers at all. They disagree in exactly two places, and both
/// are mechanical:
/// catalogue transfers at all. They disagree in three mechanical places:
///
/// * **A literal `{`.** RE2 reads a brace that opens no valid repetition as a
/// literal; Rust refuses it. Upstream depends on the RE2 reading, the global
Expand All @@ -654,10 +653,10 @@ fn compile_regex(
/// so it is *both* a different match and vastly larger to compile: three
/// upstream rules that repeat `\w` over a wide bound
/// (`pypi-...[\w-]{50,1000}`) blow past the compiler's 10 MB program limit.
/// Expanding `\w` to its RE2 meaning fixes the semantics and the size at once
/// , every rule in the catalogue then compiles under the default limit, with
/// Expanding `\w` to its RE2 meaning fixes the semantics and the size at once,
/// every rule in the catalogue then compiles under the default limit, with
/// no memory headroom bought and no rule dropped.
////// * **`\b` / `\B`.** RE2's word boundary is ASCII. Rust's is Unicode-aware,
/// * **`\b` / `\B`.** RE2's word boundary is ASCII. Rust's is Unicode-aware,
/// and a Unicode boundary is the one construct the lazy DFA gives up on the
/// moment the haystack holds a non-ASCII byte: every file with an em-dash or
/// an emoji in a comment was then scanned by the PikeVM, the slowest engine,
Expand Down
15 changes: 3 additions & 12 deletions crates/tracedecay-runtime-core/src/lifecycle_lease.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,7 @@ pub fn acquire_shared_or_inherited(operation: &str) -> Result<LifecycleLease> {

fn acquire_shared_or_inherited_at(path: &Path, operation: &str) -> Result<LifecycleLease> {
let mut file = open_lock_file(path)?;
match file
.try_lock_shared()
.map_err(std::io::Error::from)
{
match file.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(LifecycleLease {
hold: LeaseHold::File(file),
token: None,
Expand Down Expand Up @@ -384,10 +381,7 @@ fn acquire_exclusive_at_with_timeout(
#[hotpath::measure(label = "runtime_core.lifecycle.acquire_shared")]
fn acquire_shared_at(path: &Path, operation: &str) -> Result<LifecycleLease> {
let mut file = open_lock_file(path)?;
match file
.try_lock_shared()
.map_err(std::io::Error::from)
{
match file.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(LifecycleLease {
hold: LeaseHold::File(file),
token: None,
Expand All @@ -404,10 +398,7 @@ fn acquire_shared_at(path: &Path, operation: &str) -> Result<LifecycleLease> {

fn try_acquire_shared_at(path: &Path, operation: &str) -> Result<SharedLeaseAttempt> {
let file = open_lock_file(path)?;
match file
.try_lock_shared()
.map_err(std::io::Error::from)
{
match file.try_lock_shared().map_err(std::io::Error::from) {
Ok(()) => Ok(SharedLeaseAttempt::Acquired(LifecycleLease {
hold: LeaseHold::File(file),
token: None,
Expand Down
1 change: 1 addition & 0 deletions crates/tracedecay/tests/mcp_suite/mcp_handler_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod branch_search_test;
mod branch_sensitivity_test;
mod context_test;
mod dependency_hint_test;
mod diagnose_test;
#[cfg(feature = "test-transport")]
mod edit_test;
mod graph_analysis_test;
Expand Down
Loading
Loading