{
  "slug": "dagger-container-exists-adds-an-expand-option-6909c7c4d812",
  "title": "Dagger container.exists adds an expand option",
  "tools": [
    "dagger"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-10T16:12:50.000Z",
  "announced_at": "2026-06-10T16:12:50.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When checking whether a container path exists, set `expand: true` to expand `$VAR` or `${VAR}` using the container’s environment variables. `expand` defaults to `false`.",
    "examples": [
      "query { container { exists(path: \"/$VAR/foo\", expand: true) } }"
    ],
    "gotchas": [
      "Version: v0.21.5",
      "path (required): Path to check, such as `/file.txt`.",
      "expand: Boolean; defaults to `false`. When true, expands `$VAR` or `${VAR}` in `path` using the container’s environment variables.",
      "expectedType: If specified, also validates the file type; allowed values include `REGULAR_TYPE`, `DIRECTORY_TYPE`, and `SYMLINK_TYPE`.",
      "doNotFollowSymlinks: If specified, do not follow symlinks."
    ]
  },
  "why_it_matters": "Check whether a container exists while accounting for expanded container state.",
  "sources": [
    "https://github.com/dagger/dagger/releases/tag/v0.21.5",
    "https://github.com/dagger/dagger/pull/13310",
    "https://github.com/dagger/dagger/blob/v0.21.5/core/schema/container.go"
  ],
  "rank": 0.94027,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3-rejudge+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-e07a452ac09da829-0:rescue",
    "evidence_hash": "a06a2371e2f35740d8f67f7f122be315ef87f16120b2011639ea940dbaa45759"
  },
  "review": {
    "draft_hash": "2fa90cb05cfbd34186eb4fa64bd62192978989153421e1d56e92764858b3ab1b",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:rescue",
    "reason": "Rescue path: first rejected only because the extracted card lacked usage; judged again on the enriched card, 3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.76 (>= 0.6 needed)."
  }
}
