v0.3.7-pre.011

This commit is contained in:
2026-09-02 19:50:01 +02:00
parent 313d2a1ea6
commit 618f940310
20 changed files with 682 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-backfill-desk/tests/desktop_contract.rs
// version: 12
// version: 13
//! Structural desktop contract checks for the Backfill Desk scaffold.
@@ -305,7 +305,7 @@ fn pre_008_start_installs_handle_before_non_blocking_spawn_and_keeps_single_run_
let frontend = read_text(root.join("frontend/ts/main.ts").as_path());
assert!(state.contains("BackfillJobRuntime::new(mapped)"));
let handle_index = state.find("let handle = runtime.handle();");
let install_index = state.find("self.backfill_runs.install(job_id.clone(), handle)");
let install_index = state.find("self.backfill_runs.install(job_id.clone(), handle, retained_request)");
assert!(handle_index.is_some());
assert!(install_index.is_some());
if let (std::option::Option::Some(handle_index), std::option::Option::Some(install_index)) = (handle_index, install_index) {
@@ -374,3 +374,33 @@ fn pre_010_cancel_is_targeted_idempotent_and_shutdown_requests_cooperative_cance
assert!(frontend.contains("backfill_cancel"));
assert!(frontend.contains("{ jobId: status.jobId }"));
}
#[test]
fn pre_011_resume_reissues_rust_only_checkpoint_for_new_backend_job_without_ipc_checkpoint_material() {
let root = app_root();
let workspace = root.join("../..");
let checkpoint = read_text(workspace.join("crates/ksp-job-backfill-lib/src/checkpoint.rs").as_path());
assert!(checkpoint.contains("reissue_for_job"));
let request = read_text(workspace.join("crates/ksp-job-backfill-lib/src/request.rs").as_path());
assert!(request.contains("pub fn resume_for_job"));
assert!(request.contains("validate_request_checkpoint"));
assert!(request.contains("checkpoint.reissue_for_job(job_id.clone())"));
let run = read_text(root.join("src/backfill_run.rs").as_path());
for required in ["TerminalBackfillRun", "request: ksp_job_backfill_lib::BackfillRequest", "snapshot().checkpoint()", "resume_for_job(job_id, checkpoint)"] {
assert!(run.contains(required), "missing Rust-only Resume ownership marker {required}");
}
let state = read_text(root.join("src/app_state.rs").as_path());
for required in ["prepare_backfill_resume", "options.composition_ready", "store_network_matches", "role_available"] {
assert!(state.contains(required), "missing Resume admission marker {required}");
}
let tauri = read_text(root.join("src/tauri.rs").as_path());
assert!(tauri.contains("backfill_resume"));
assert!(tauri.contains("spawn_backfill_launch"));
let frontend = read_text(root.join("frontend/ts/main.ts").as_path());
assert!(frontend.contains("resumeBackfillRun"));
assert!(frontend.contains("checkpointPresent"));
assert!(frontend.contains("backfill_resume"));
let html = read_text(root.join("frontend/main.html").as_path());
assert!(html.contains("resumeBackfillRun"));
assert!(html.contains("Reprendre"));
}