stack/.github
Bilal Godil d94aa661d8 capture emulator snapshot locally during pull instead of shipping from CI
QEMU migration state isn't portable across accelerators — a KVM-captured
snapshot won't resume under HVF, and `-cpu max` feature sets differ across
hosts. Instead of trying to match every (KVM/HVF/TCG, amd64/arm64)
combination in CI, capture the snapshot on the user's own machine during
`stack emulator pull`: download the qcow2, cold-boot once, wait for all
services, QMP migrate via mapped-ram + multifd, compress. Subsequent
`stack emulator start`s fast-resume in ~3-8s as before.

- Factor qmp_session + capture_vm_state out of build-image.sh into
  common.sh so run-emulator.sh can call them.
- Add cmd_capture to run-emulator.sh. build_qemu_cmd emits the
  resume-compatible device layout (phantom ISOs, no virtfs, fsdev +
  pcie-root-port, pinned 4096MB/4CPU) with -incoming defer gated on an
  actual snapshot being present, so capture mode reuses the same path.
- Capture regenerates runtime-config.iso with STACK_EMULATOR_VM_DIR_HOST
  empty — virtfs is detached for migration compat so /host isn't mounted;
  the `install internal-pck → /host/$VM_DIR_HOST` path would otherwise
  fail and restart-loop stack.service. Mirrors build-image.sh's CI
  runtime.env shape.
- stack-cli `pull` downloads only the qcow2 then invokes run-emulator.sh
  capture. Add --skip-snapshot for CI/debug. startEmulator auto-captures
  on the auto-pull fallback.
- Revert the arm64 CI split: delete qemu-emulator-build-arm64.yaml,
  restore arm64 to the unified matrix on ubicloud-standard-8 under
  cross-arch TCG (macOS HVF runner existed only to produce a portable
  snapshot; no longer needed). Drop savevm.zst from package/upload/publish
  steps; update release notes.

Verified end-to-end on an arm64 Mac under HVF: capture 50s, fast-resume
6.5s, all services green.
2026-04-16 11:12:42 -07:00
..
assets Improved passkey UX (#325) 2024-10-29 17:21:07 -07:00
recurseml-rules Clarifying Recurse ML Naming Rules (#872) 2025-09-02 09:31:14 -07:00
workflows capture emulator snapshot locally during pull instead of shipping from CI 2026-04-16 11:12:42 -07:00
.recurseml.yaml Add Recurse ML rules for naming and code patterns (#780) 2025-07-18 09:58:23 -07:00
auto_assign.yml Run auto-assign on draft PRs 2025-04-10 10:18:47 -07:00
pull_request_template.md Update GitHub repository links in documentation 2025-02-20 10:14:55 -08:00
SECURITY.md Update branding from Stack to Stack Auth in documentation (#504) 2025-03-04 04:07:54 +01:00