Quantum jobs on a provider outlive what sent them: the record, the command line, the desktop app and the Studio #590
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/quantum-provider-jobs-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This replaces #581, which conflicted in the changelog with #578. It is #581's two commits, followed by three for the desktop app and the Studio, which need #581's API and come with it.
A job on a person's own provider now outlives whatever sent it.
Until now a run waited in its process. A job not finished in two hours was cancelled at the provider, losing its place in the queue. If the process stopped first, the job went on and its id was gone, so its counts could not be read, and it may still have been billed. A device's queue can take days.
What changes
A job is written down before it is sent, and nothing is held while it waits.
wai-quantum-qpu:job::start,check,follow,cancelandprogress_of, and aledgermodule.job::runis unchanged: it keeps no record, so it still cancels what outlasts its bound, and nothing goes on being spent with no one to collect it.wai-quantum-cli:run --providerrecords its job and says its handle, and--no-waitanswers at once. New:providers jobs,providers collectandproviders cancel.collectexits 0 done, 1 ended otherwise, 2 still at the provider, and 75 when it could not ask, which says nothing of the job.MCP:
run_on_provideranswers within a call (50 s, as the job service does) with the job running and its id, injob.v1's form. New tools:get_provider_job,cancel_provider_job,list_provider_jobs. Their answers use compact schemas: pointing them atjob.v1added about 770 KB to the tool list every host loads, and this adds about 12 KB.wai.quantum.provider/1: a new §5.7 on what a job outlasting its client asks of a provider and a client. Nothing on the wire changes.What a caller sees differently
A
run --providerthat outlasts its two hours now exits 2 with the job still at the provider, where before it cancelled the job and failed. The change is in the changelog.wai breakingreports no unacknowledged breaking change.Checked
wai-quantum-qpu:cargo test --locked, every target passed; clippy clean. The workflow's pinned library count goes from 34 to 46 for the twelve new tests, and five of them are named so CI fails if any stops running; both checks were replayed against the first CI run's log.wai-quantum-cli:cargo test --locked --release, every target passed, including two new end-to-end tests over HTTP: the sending command is killed mid-wait and the job is collected later; an agent comes back to a job by id and cancels it. Clippy clean with and without default features.smoke.sh, every check held.wai breaking, the repository checks and the public-name check are clean. The docs checker passes the changed pages apart from blocks that need the service or Rust options, which CI runs in full.Not checked
cargo-semver-checksis not on the hosts I ran this on.The desktop app and the Studio: a job on your own hardware outlives the window
The desktop app called
job::run, so a run waited in the app for up to two hours with the Studio held, then cancelled the job.wai-quantum-desktop (
src/main.rs)run_on_providerwrites the job down, sends it and waits up to ten seconds (job::start, thenjob::follow). It answers with the job done, still running with its id (pj-…), or ended with why. A run that is not free is still refused, with its plan, until the interface's dialog has asked.provider_job {id, cancel}asks after a job once (job::check), or cancels it (job::cancel) when the person pressed Cancel. A job that has ended is answered from its record, with no provider asked.provider_jobslists the jobs sent, asking no provider.Quantum Studio (
src/hardware.js,src/main.js, locales in English and Chinese)failed,cancelled) is read as an answer, not as a failed command: one with anerrorand nostatusis the failure.The release's cask (
release/manifests.py,wai-quantum-desktop.rb.in): it now passesbrew style, with a blank line between each disk image's checksum and its address anddepends_on :macos. Written from the 0.1.1 release's own assets, the cask has no finding, and the Scoop manifest andlatest.jsonare byte for byte the ones published.The views page is rebuilt for the new words in
catthehacker/ubuntu:act-22.04with Rust 1.98.0 on x86_64, as the views workflow rebuilds it. Its engine had not been rebuilt sincecc08f85a0and is current again.Tests
a_job_still_queued_is_answered_by_its_id_and_cancelled_only_when_asked.test/hardware.test.mjs): asking by id until done, the status line, Cancel at the provider, a cancel that arrives after the job finished, a failed check, Wait in the background with its result later, a reopened window following a job left waiting, and the jobs list's words.release/manifests_test.pychecks the new cask lines.Checked
build-views.mjs --check;studio.test.mjs);-D warnings, andcheck;manifests_test.py.🤖 Generated with Claude Code