Skip to content

Stage qhost submit with Run pack_shipment / ship_project_to_dest #581

Open

Description

@yamanori99

Follow-on to yamanori99/DistSSHRun.jl#362 (Run side done: destination-aware ship APIs landed and are frozen for DistSSHRun 0.2.0).

Problem

qhost: submit still transfers the job tree to the queue host with client-side rsync (stage_job_tree! / rsync_to_qhost! in src/client/stage.jl). Queue already calls pack_ship_tree at enqueue to record enqueue_content_tree_hash; that hash path is not the transfer. The staged file set and integrity therefore still follow rsync / git_send_list, not a verified Run ship to a caller-chosen destination.

Related, but not a substitute:

  • #476 aligns the send list only and explicitly deferred Tar-over-SSH transport.
  • #574 tracks rsync's own .gitignore interpretation on non-git trees.
  • PR #530 is merged (snapshot persist on the worker hop, which already uses Run setup!(:ship_tree)).

Existing draft

PR #543 (feat!: qhost submit stages with verified ship-tree) is a draft started against Run #406. It needs rebasing onto the current frozen Run API: pack_shipment / ship_project_to_dest, record file <dest>/.distssh/shipment.toml, and rev = "main" (it still pins the #406 feature branch and older names such as ship_pack / ship.toml).

Frozen Run 0.2.0 contract (do not change these on Run for Queue wiring)

Call pack_ship_tree, pack_shipment, and/or ship_project_to_dest as documented on Run d56a722 and later 0.2.0:

  • Same pack rules as ship_tree! (.gitignore send list, path dependencies, declared-input omission).
  • Caller-chosen dest (Queue stage root). The destination must be missing or an empty directory.
  • No runs/<id>/ allocation, no run leaf metadata, no instantiate / runtime setup on this hop.
  • Snapshot identity is content_tree_hash plus optional transfer_id stored in <dest>/.distssh/shipment.toml when write_record=true (default).
  • A missing Manifest (including versioned Manifest-v*.toml via manifest_path) is a pack-time error.
  • A gitignored Manifest is force-shipped (forced_ignore_ship).
  • A failed or unverified ship must not enqueue (no ticket, no jobs.toml row). Callers must check ShipmentReceipt.ok. A failed host may leave a partial tree.
  • Additive Run extensions may land in 0.2.x. Do not require a Run signature or record-name change after the 0.2.0 tag.

Acceptance criteria

  • Client→qhost staging uses the frozen Run APIs for the actual transfer (rsync is not the authenticity path for this hop; fetch may still use rsync).
  • Staged file set matches Run ship rules, including versioned Manifest selection.
  • Pack warnings (for example a gitignored Manifest) are surfaced and recorded as on Run ship.
  • Transfer or hash failure leaves no enqueued job; success records content_tree_hash / transfer_id provenance.
  • No auto instantiate / runtime setup on the staging hop.
  • Existing stage path and cleanup policy unchanged (#478: stages are never auto-deleted).
  • Snapshot IDs stay distinct per hop (compatible with merged feat: persist ship snapshot id for instantiate, check, and detached execute #530).
  • Cross-repo E2E is green on the release heads (both Julia versions).
  • NEWS / migration notes for the file-set change (tracked-but-ignored files that rsync may have staged will follow Run rules).
  • Draft feat!: qhost submit stages with verified ship-tree (lockstep Run #406) #543 is rebased onto the frozen API or replaced by a new PR.

Activity

  1. added this to the 0.10.0 milestone on Nov 21, 2026
  2. added
    enhancement
    breaking
    area:submit
    area:client
    on Nov 21, 2026
  3. yamanori99 commented on Nov 22, 2026

    @yamanori99
    OwnerAuthor

    Also in scope for the stage transport (still current on 50e50169):

    • qhost:host:PORT passes the hop (port-aware run_on_host). Then _ssh_mkdir! and rsync use _ssh_host_args, which does not split the port (src/client/stage.jl:189-201), so they connect to a host named host:PORT on port 22.
    • Stage ssh and rsync do not set ssh_noninteractive_env().
    • Nothing compares the client tree with the qhost tree. The enqueue content_tree_hash is computed on the qhost after transfer. With ship, compare the receipt's hash with a client-side pack_ship_tree hash before enqueue.
    • Today a tracked file that .gitignore names reaches the qhost (git_send_list) but not the workers (ship_send_list).

    Fetch is tracked separately in #588.

  4. added
    when:later
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clientarea:submitbreakingenhancementwhen:later

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions