Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bbc7ad9
fix(retention): queue maintenance after repeated writer refusals
ScriptedAlchemy Nov 8, 2026
c13a88f
test(retention): reclaim six-generation backlog after queued writer
ScriptedAlchemy Nov 8, 2026
61fd468
fix(retention): cancel only queued writer admission
ScriptedAlchemy Nov 8, 2026
c41076a
test(retention): prove fair admission during ongoing writer churn
ScriptedAlchemy Nov 8, 2026
58a7656
fix(retention): honor shutdown and repair admission regressions
ScriptedAlchemy Nov 8, 2026
41362a6
fix(retention): queue maintenance per project without global stalls
ScriptedAlchemy Nov 8, 2026
2bd73a4
style(retention): match Bazel rustfmt on admission paths
ScriptedAlchemy Nov 8, 2026
5c37cde
fix(retention): keep queued test scope alive for Bazel
ScriptedAlchemy Nov 8, 2026
0b2a062
test(retention): queue the cancellation follower on the held store
ScriptedAlchemy Nov 8, 2026
0dbda7e
test(automation): bind scheduler fixtures to backend identities
ScriptedAlchemy Nov 8, 2026
0b520f3
test(retention): verify content resumes before owner release
ScriptedAlchemy Nov 8, 2026
b299f00
test(cli): time held responses after request admission
ScriptedAlchemy Nov 8, 2026
fedc68e
test(runtime): bound CLI startup before scripted daemon request
ScriptedAlchemy Nov 8, 2026
d70ad10
style(cli): format the pre-admission process assertion
ScriptedAlchemy Nov 9, 2026
58f6ee3
test(cli): observe daemon readiness before checking socket mode
ScriptedAlchemy Nov 8, 2026
7264f0d
test(cli): measure oversized responses from request admission
ScriptedAlchemy Nov 9, 2026
ec0b338
test(cli): share one watchdog across request admission
ScriptedAlchemy Nov 9, 2026
2155039
ci: integrate the verified prerequisite for #4834
ScriptedAlchemy Nov 9, 2026
11c9b4f
ci: carry the canonical CLI fixture below writer admission
ScriptedAlchemy Nov 9, 2026
2523312
ci: adopt authenticated cross-platform release staging
ScriptedAlchemy Nov 9, 2026
5894b86
Merge branch 'master' into codex/cli-transport-fixture-admission
ScriptedAlchemy Nov 9, 2026
75170d0
Merge master into codex/cli-transport-fixture-admission
ScriptedAlchemy Nov 9, 2026
24d8ab2
Merge codex/cli-transport-fixture-admission into fix/4616-fair-retent…
ScriptedAlchemy Nov 9, 2026
e2c9fb4
test(cli): use sandbox-writable roots for temporary path policy
ScriptedAlchemy Nov 9, 2026
05f4a29
test(transport): pace slow response bytes on one clock
ScriptedAlchemy Nov 9, 2026
eb11bce
test(cli): keep orphan store sockets within Darwin worker limits
ScriptedAlchemy Nov 9, 2026
9cb2657
test(hooks): initialize and ingest on the same ready daemon
ScriptedAlchemy Nov 9, 2026
2fd6a8f
Merge pull request #4813 from ScriptedAlchemy/fix/4616-fair-retention…
ScriptedAlchemy Nov 10, 2026
4339b7c
fix(retention): preserve progress across contended stores
ScriptedAlchemy Nov 10, 2026
5618857
fix(retention): actively own queued maintenance work
ScriptedAlchemy Nov 10, 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
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,20 @@ fn ephemeral_safe_fixture_base(test_path: &str) -> Option<PathBuf> {
assert!(!tracedecay_global_db::is_ephemeral_path(&root));
return Some(root);
}
// Worker scratch paths and macOS's per-user temporary directory can leave
// too little room for the nested child home and its Unix daemon socket.
// Use a short, private root on Unix. The private child TMPDIR
// still defines the ephemeral boundary, with durable fixtures beside it.
let scratch = if cfg!(unix) {
TempDir::new_in("/tmp")
// Linux fleet scratch can exceed the Unix socket path limit. Darwin's
// sandbox grants writes to the user's temporary directory, not /tmp.
let parent = if cfg!(target_os = "linux") {
PathBuf::from("/tmp")
} else {
TempDir::new()
}
.expect("isolated temp-policy fixture");
let temporary = scratch.path().join("temporary");
let durable = scratch.path().join("durable");
std::env::temp_dir()
};
let scratch = tempfile::Builder::new()
.prefix("f")
.tempdir_in(parent)
.expect("isolated temp-policy fixture");
// These components also prefix the child's 104-byte Darwin socket address.
let temporary = scratch.path().join("t");
let durable = scratch.path().join("d");
std::fs::create_dir(&temporary).unwrap();
std::fs::create_dir(&durable).unwrap();
crate::common::rerun_test_in_child(
Expand Down Expand Up @@ -1259,15 +1261,15 @@ fn init_wait_holds_until_first_generation_is_ready() {
);
}

/// Unix daemon endpoints must fit even when the runner's temporary directory
/// has a long sandbox prefix. The profile remains private to the fixture.
fn daemon_contract_home() -> TempDir {
if cfg!(unix) {
TempDir::new_in("/tmp")
} else {
TempDir::new()
}
.expect("private daemon fixture home")
/// Allocate a short socket path within the caller's private fixture root.
fn daemon_contract_home(root: &Path) -> TempDir {
// The outer scratch already isolates this home. Keep its component one byte
// so the default socket fits even in the native worker scratch directory.
tempfile::Builder::new()
.prefix("h")
.rand_bytes(0)
.tempdir_in(root)
.expect("private daemon fixture home")
}

fn assert_project_storage_absent(home: &Path, project: &Path) {
Expand Down Expand Up @@ -1309,7 +1311,7 @@ fn init_without_a_running_daemon_refuses_before_any_index_write() {
) else {
return;
};
let home = daemon_contract_home();
let home = daemon_contract_home(&durable);
let project = tempfile::Builder::new()
.prefix("no-daemon-init-project-")
.tempdir_in(durable)
Expand Down Expand Up @@ -1351,7 +1353,7 @@ fn status_and_query_reads_refuse_typed_daemon_unavailable_without_one() {
) else {
return;
};
let home = daemon_contract_home();
let home = daemon_contract_home(&durable);
let project = tempfile::Builder::new()
.prefix("no-daemon-read-project-")
.tempdir_in(durable)
Expand Down Expand Up @@ -1519,7 +1521,7 @@ fn pricing_and_usage_reads_make_no_http_request() {
) else {
return;
};
let home = daemon_contract_home();
let home = daemon_contract_home(&durable);
let project = tempfile::Builder::new()
.prefix("local-usage-project-")
.tempdir_in(durable)
Expand Down Expand Up @@ -2836,7 +2838,7 @@ fn list_all_reports_orphan_manifest_reconstructable_store() {
) else {
return;
};
let home = TempDir::new().unwrap();
let home = daemon_contract_home(&std::env::temp_dir());
let project = tempfile::Builder::new()
.prefix("list-orphan-project-")
.tempdir_in(durable)
Expand Down
33 changes: 3 additions & 30 deletions crates/tracedecay-cli/tests/core_cli_suite/tool_daemon_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,21 +543,6 @@ fn configuration_tool_success(
}
}

fn wait_for_daemon_socket(socket_path: &Path) {
let deadline = Instant::now() + Duration::from_secs(10);
common::poll_until(
deadline,
Duration::from_millis(25),
|| UnixStream::connect(socket_path).is_ok().then_some(()),
|| {
format!(
"timed out waiting for daemon socket at {}",
socket_path.display()
)
},
);
}

/// Enroll a project for the native hook capture contract: an enrollment
/// marker binds the project root to a profile shard, and a daemon-issued
/// hook configuration binding is published under that shard's data root so
Expand Down Expand Up @@ -1718,21 +1703,9 @@ fn daemon_socket_is_owner_only() {
let home = TempDir::new().unwrap();
let home_path = canonical_existing_path(home.path());
let socket_path = common::daemon_socket_path(&home_path);
let _ = std::fs::remove_file(&socket_path);
let mut daemon = common::DaemonProcess::new(
tracedecay_command_with_home(&home_path)
.arg("daemon")
.arg("run")
.arg("--socket")
.arg(&socket_path)
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
.expect("tracedecay daemon should start"),
);

wait_for_daemon_socket(&socket_path);
let mut daemon = common::spawn_tracedecay_daemon_with(&home_path, |command| {
command.arg("--socket").arg(&socket_path);
});
let mode = std::fs::metadata(&socket_path)
.expect("socket metadata")
.permissions()
Expand Down
Loading
Loading