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
3510429
ci: let every main push finish its checks
zerob13 Nov 20, 2026
88a9777
ci: trial full verification on Linux x64
zerob13 Nov 20, 2026
ed24aa0
ci: run the Linux trial on dim-verify runners
zerob13 Nov 20, 2026
cd17f33
Merge remote-tracking branch 'origin/main' into dimagent/ci-main-comp…
zerob13 Nov 20, 2026
906e539
Merge branch 'dimagent/ci-main-complete' into dimagent/ci-linux-verify
zerob13 Nov 20, 2026
bc3cc65
ci: probe the login shell on the Linux runners (temporary)
zerob13 Nov 20, 2026
e976a36
ci: name the profile script that prints under bubblewrap (temporary)
zerob13 Nov 20, 2026
c2703ae
ci: let the profile probe finish (temporary)
zerob13 Nov 20, 2026
97a3ba6
fix(eval): find the run home on any line of the preflight output
zerob13 Nov 20, 2026
b1e6e6d
test(eval): give the native tool probe a private socket directory
zerob13 Nov 20, 2026
d24f97a
test(host): verify descendant cleanup in the helper PID namespace
zerob13 Nov 20, 2026
3a8b861
test(permission): wait for the child approval before changing the parent
zerob13 Nov 20, 2026
6988d68
test(cli): wait for shell settlement before repeating the turn interrupt
zerob13 Nov 20, 2026
c17c285
test(node): settle session startup inputs before checking read-only p…
zerob13 Nov 20, 2026
17a5b41
test(app-server): settle startup inputs before capturing reasoning ba…
zerob13 Nov 20, 2026
210fb49
test(app-server): wait for the old background task after tool reload
zerob13 Nov 20, 2026
3fb8502
test(cli): install fixture updaters from a separate process
zerob13 Nov 20, 2026
617e9b4
Merge remote-tracking branch 'origin/main' into dimagent/ci-linux-verify
zerob13 Nov 20, 2026
23e996f
test(modality): preserve portable OCR and image coverage
zerob13 Nov 20, 2026
928c768
ci: require Linux verification and run native macOS checks on pull re…
zerob13 Nov 20, 2026
0d03596
test(session-title): observe the initial title before requiring live …
zerob13 Nov 20, 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
63 changes: 57 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
execution: ${{ steps.groups.outputs.execution }}
web: ${{ steps.groups.outputs.web }}
scripts: ${{ steps.groups.outputs.scripts }}
macos_scripts: ${{ steps.groups.outputs.macos_scripts }}
dependencies: ${{ steps.groups.outputs.dependencies }}
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
Expand Down Expand Up @@ -142,11 +143,15 @@ jobs:
if: >-
needs.changes.outputs.rust == 'true' || needs.changes.outputs.xtask == 'true' ||
needs.changes.outputs.scripts == 'true'
# PR runners must be isolated from release credentials and private networks.
runs-on: [self-hosted, macOS, ARM64]
name: verify (${{ matrix.platform }})
strategy:
fail-fast: false
matrix:
platform: ${{ fromJSON(github.event_name == 'pull_request' && '["linux"]' || github.event_name == 'push' && '["macos"]' || '["linux","macos"]') }}
runs-on: ${{ matrix.platform == 'linux' && fromJSON('["self-hosted","linux","x64","dim-verify"]') || fromJSON('["self-hosted","macOS","ARM64"]') }}
timeout-minutes: 75
env:
CARGO_BUILD_JOBS: "4"
CARGO_BUILD_JOBS: ${{ matrix.platform == 'linux' && '8' || '4' }}
CARGO_INCREMENTAL: "0"
CARGO_TARGET_DIR: ${{ github.workspace }}/target
RUSTC_WRAPPER: ""
Expand All @@ -158,6 +163,19 @@ jobs:
with:
node-version-file: .node-version
package-manager-cache: false
- uses: actions-rust-lang/setup-rust-toolchain@c8ff772090ab9d00f7f7bd7b388f3c3032282e3b
if: runner.os == 'Linux'
with:
cache: false
build-warnings: ""
- name: Report Linux host support
if: runner.os == 'Linux'
shell: bash
run: |
echo "CPUs: $(nproc)"
grep -E 'MemTotal|MemAvailable' /proc/meminfo
# Without a working bubblewrap the confined process tests return without running.
bwrap --ro-bind / / true
- name: Build and lint the Rust workspace
if: needs.changes.outputs.rust == 'true'
shell: bash
Expand Down Expand Up @@ -264,10 +282,17 @@ jobs:
set -euo pipefail
# The Python of `py:` rows: a relocatable CPython, pinned by hash, so the
# self-hosted runner needs neither a system Python 3.10+ nor sudo.
python_build="cpython-3.12.15+20261003-aarch64-apple-darwin-install_only.tar.gz"
if [[ "$RUNNER_OS" == Linux ]]; then
python_target=x86_64-unknown-linux-gnu
python_sha256=f937814031eab4698ca6d07ec606ede1825768f3f3e99af76d9db3900bee03c5
else
python_target=aarch64-apple-darwin
python_sha256=316a463172740e71d8dca1f2730784e325f3f720941137b5d674d5801a632213
fi
python_build="cpython-3.12.15+20261003-${python_target}-install_only.tar.gz"
curl -fsSL -o "$RUNNER_TEMP/python.tar.gz" \
"https://github.com/astral-sh/python-build-standalone/releases/download/20261003/${python_build/+/%2B}"
echo "316a463172740e71d8dca1f2730784e325f3f720941137b5d674d5801a632213 $RUNNER_TEMP/python.tar.gz" | shasum -a 256 -c -
echo "$python_sha256 $RUNNER_TEMP/python.tar.gz" | shasum -a 256 -c -
rm -rf "$RUNNER_TEMP/python" runtime/.venv
tar -xzf "$RUNNER_TEMP/python.tar.gz" -C "$RUNNER_TEMP"
"$RUNNER_TEMP/python/bin/python3" -m venv runtime/.venv
Expand All @@ -280,6 +305,32 @@ jobs:
- name: Verify downloaded Node runtime
if: needs.changes.outputs.node == 'true' && github.event_name != 'pull_request'
run: node scripts/run-rust-test.mjs target/test-artifacts.jsonl transport_flow runtime_manager::runtime_switches_from_system_to_downloaded_node --ignored --exact
macos-native:
needs: changes
if: github.event_name == 'pull_request' && (needs.changes.outputs.rust == 'true' || needs.changes.outputs.macos_scripts == 'true')
runs-on: [self-hosted, macOS, ARM64]
timeout-minutes: 30
env:
CARGO_BUILD_JOBS: "4"
CARGO_INCREMENTAL: "0"
CARGO_TARGET_DIR: ${{ github.workspace }}/target
RUSTC_WRAPPER: ""
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version-file: .node-version
package-manager-cache: false
- name: Test macOS native Rust flows
if: needs.changes.outputs.rust == 'true'
run: node scripts/test-macos-native.mjs
- name: Test macOS code layout and release packaging
if: needs.changes.outputs.macos_scripts == 'true'
run: |
node --test scripts/code-layout-darwin.test.mjs
node --test --test-name-pattern='^native package staging' scripts/release.test.mjs
acp-registry:
needs: changes
if: github.event_name != 'pull_request' && (needs.changes.outputs.rust == 'true' || needs.changes.outputs.scripts == 'true')
Expand Down Expand Up @@ -335,7 +386,7 @@ jobs:
retention-days: 1
ci-ok:
# The one check to require: it passes when every selected job passed and skipped jobs were not needed.
needs: [changes, dependencies, windows-cli, web, verify, acp-registry]
needs: [changes, dependencies, windows-cli, web, verify, macos-native, acp-registry]
if: always()
runs-on: self-hosted
timeout-minutes: 5
Expand Down
16 changes: 11 additions & 5 deletions crates/dim-agent-capabilities/tests/host_platform_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -918,10 +918,6 @@ async fn a_confined_helper_returns_when_its_root_exits_with_a_descendant_on_its_
std::fs::remove_dir_all(&base).unwrap();
}

/// A descendant that left the process group keeps the pipes open past the
/// drain bound. The call still returns with the root's status and the bytes
/// read so far, and the escaped process is the caller's to kill: that is the
/// limit the confinement documents for macOS and unconfined Linux.
#[tokio::test]
async fn a_confined_helper_returns_when_an_escaped_descendant_holds_its_pipes() {
let Some(perl) = perl() else {
Expand All @@ -933,7 +929,8 @@ async fn a_confined_helper_returns_when_an_escaped_descendant_holds_its_pipes()
std::fs::create_dir_all(&write).unwrap();
let pid_file = write.join("escapee.pid");
let escape = format!(
"setpgrp(0, 0); open my $f, q(>), q({}) or die; print $f $$; close $f; sleep 100;",
"use Fcntl qw(:flock); setpgrp(0, 0); open my $f, q(>), q({}) or die; \
flock($f, LOCK_EX) or die; syswrite($f, $$) or die; sleep 100;",
pid_file.display()
);
let script = format!(
Expand All @@ -959,6 +956,15 @@ async fn a_confined_helper_returns_when_an_escaped_descendant_holds_its_pipes()
elapsed < Duration::from_secs(5),
"the call took {elapsed:?} with the drain bound at one second"
);
#[cfg(target_os = "linux")]
if output.confined {
std::fs::File::open(&pid_file)
.unwrap()
.try_lock()
.expect("the descendant must release its file lock when the PID namespace ends");
std::fs::remove_dir_all(&base).unwrap();
return;
}
let pid: i32 = std::fs::read_to_string(&pid_file)
.expect("the escapee records its pid")
.trim()
Expand Down
14 changes: 6 additions & 8 deletions crates/dim-agent-capabilities/tests/permission_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,12 @@ async fn full_access_releases_all_waiting_calls_without_user_responses() {
.await
.unwrap();
let child_approval = session.service::<Approval>(&child).unwrap();
let child_request = loop {
if let Some(request) = child_approval.pending().pop() {
break request.approval_id;
}
tokio::task::yield_now().await;
};
submit_exec(&session, "echo model call").await;
let model_request = approval_request(&session, "echo model call").await;
let approval = session.service::<Approval>("main").unwrap();
Expand Down Expand Up @@ -1288,14 +1294,6 @@ async fn full_access_releases_all_waiting_calls_without_user_responses() {
);
}
approval.replay(|request| panic!("stale approval: {request:?}"));
let child_request = loop {
let mut requests = Vec::new();
child_approval.replay(|request| requests.push(request.approval_id.clone()));
if let Some(request) = requests.pop() {
break request;
}
tokio::task::yield_now().await;
};
child_approval
.respond(&child_request, ApprovalDecision::Deny)
.await
Expand Down
26 changes: 24 additions & 2 deletions crates/dim-app-server/tests/transport_flow/default_effort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,28 @@ fn summarising(model_id: &str, default: Option<&str>, options: &[&str]) -> Value
value
}

async fn baseline_turn(client: &mut Client, session_id: &Value) {
let at = json!({"sessionId":session_id,"branchId":"main"});
tokio::time::timeout(Duration::from_secs(10), async {
loop {
let pending = client.rpc("session.input.pending", at.clone()).await;
assert_ok(&pending);
let inputs = pending["result"]["inputs"].as_array().unwrap();
if inputs
.iter()
.filter(|input| input["applied"] == true)
.count()
== 4
{
break;
}
}
})
.await
.expect("four startup inputs reach the branch before the baseline request");
turn(client, session_id, "hello").await;
}

/// The request body with the prompt replaced by its message roles. Every
/// fixture sends the same session prompt and none of these tests is about it,
/// but every other field is compared exactly as sent.
Expand Down Expand Up @@ -1500,7 +1522,7 @@ async fn a_summary_declaration_with_no_effort_sends_nothing() {
.await;
assert_ok(&created);
let session_id = created["result"]["sessionId"].clone();
turn(&mut client, &session_id, "hello").await;
baseline_turn(&mut client, &session_id).await;
let wire = last_body(&capture);
assert!(wire.get("reasoning").is_none(), "{wire}");
// The baseline body captured at 1efbd75df for this fixture.
Expand Down Expand Up @@ -1619,7 +1641,7 @@ async fn a_model_that_declares_no_summary_sends_the_baseline_body() {
.await;
assert_ok(&created);
let session_id = created["result"]["sessionId"].clone();
turn(&mut client, &session_id, "hello").await;
baseline_turn(&mut client, &session_id).await;
let wire = last_body(&capture);
// Baseline at 1efbd75df: the adapter's own default already sends
// `detailed` beside a concrete effort, so the body is unchanged.
Expand Down
11 changes: 11 additions & 0 deletions crates/dim-app-server/tests/transport_flow/sessions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,17 @@ async fn node_session_permissions_reads_live_policy_and_survives_index_reload()
);
let starter = client_session(&mut client, &agent, json!({"preset":"full-access"})).await;
let at = json!({"sessionId":starter.id(),"branchId":"main"});
let mut inputs = starter
.on::<dim_agent_runtime::InputSnapshot>("main")
.unwrap()
.unwrap();
tokio::time::timeout(
Duration::from_secs(10),
inputs.wait_for(|state| state.queued == 2),
)
.await
.expect("client presence and execution settings inputs are published")
.unwrap();
let before = starter.sequence("main").unwrap();
let initial = client.rpc("permissions.branch", at.clone()).await;
assert_ok(&initial);
Expand Down
7 changes: 7 additions & 0 deletions crates/dim-app-server/tests/transport_flow/shell_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,13 @@ async fn reloading_workspace_tools_answers_the_page_method_with_service_reloadin
.expect("the page method answers service_reloading while WorkspaceTools reloads");
drop(hold);
restart.await.unwrap().unwrap();
loop {
let notice = shell.client.notice("session.event").await;
let event = &notice["params"]["event"];
if event["type"] == "exec" && event["name"] == "ended" {
break;
}
}
assert_ok(
&shell
.client
Expand Down
Loading