{
  "slug": "tilt-live-update-adds-initial-sync-for-pre-built-images-2ac61cd1a063",
  "title": "Tilt live_update adds initial_sync for pre-built images",
  "tools": [
    "tilt"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-30T13:15:00.000Z",
  "announced_at": "2026-04-30T13:15:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "For a pre-built image, add `initial_sync()` first in `live_update` to upload files from its `sync` paths when Tilt first observes a running container and after restarts. Then define `sync` steps and optional `run` triggers; during initial sync, untriggered `run` steps execute and triggered ones execute only when synced files match.",
    "examples": [
      "live_update=[\n    initial_sync(),\n    sync('./src', '/app/src'),\n    run('npm install', trigger=['./src/package.json']),\n]"
    ],
    "gotchas": [
      "Version: v0.37.3",
      "initial_sync(): Must be first if provided. Takes no arguments; uploads files from `sync` paths when Tilt first observes a running container and whenever it restarts.",
      "sync(local_path, remote_path) (required): Local file or directory path and destination path in the container.",
      "run(cmd, trigger) (required): `cmd` runs in the container. Optional `trigger` is a filepath or list of filepaths; the command runs if synced files match. Without a trigger, it runs after initial sync completes.",
      "live_update (required): List of live update steps supplied when building or deploying an image; `initial_sync` precedes `sync`, which precedes `run`.",
      "Prerequisite: The image or deploy must be sufficient to start a running container without relying on synced files or `run` commands.",
      "Prerequisite: `sync` paths must be within the watched build context (or custom build dependencies).",
      "`initial_sync()` must be first in the list.",
      "No compression; tested with gzip, but CPU overhead exceeded network savings for typical workloads (~20k files, ~90MB in under 20s to remote EKS).",
      "No changes to existing `live_update` behavior.",
      "Docs conflict: The release note describes `initial_sync(ignore=..., dockerignore=...)`, but the current official reference says `initial_sync()` takes no arguments and describes exclusions through the image or custom deploy's file-watching controls. Do not use the release-note parameters based on this page. The official reference's current content may be newer than v0.37.3."
    ]
  },
  "why_it_matters": "Use a pre-built image in a Tiltfile and sync local files into its container on start or restart.",
  "sources": [
    "https://github.com/tilt-dev/tilt/releases/tag/v0.37.3",
    "https://github.com/tilt-dev/tilt/pull/6737",
    "https://docs.tilt.dev/live_update_reference.html"
  ],
  "rank": 0.97042,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-47bbbd5578ab05c4-0:gate",
    "evidence_hash": "04435fe44e16c5c304a5c5671eb56e6c291dfe7502c321e8b76ee4b40641fb3b"
  },
  "review": {
    "draft_hash": "79f3acf052896e0c869dc88fed409171d17cd7b36293f6cb695dab13a87b22a7",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.77 (>= 0.6 needed)."
  }
}
