{
  "slug": "helmfile-dir-selector-filters-releases-and-skips-sub-helmfile-traversal-72c8262a73c1",
  "title": "helmfile `dir=` selector filters releases and skips sub-helmfile traversal",
  "tools": [
    "helmfile"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-16T15:21:51.000Z",
  "announced_at": "2026-10-16T15:21:51.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When syncing a service in nested Helmfiles, run `helmfile -l dir=<path> sync` to select releases whose defining Helmfile is in that directory or a subdirectory; Helmfile skips sub-Helmfile branches whose location rules out a match.",
    "examples": [
      "helmfile -l dir=apps/<single-service> sync"
    ],
    "gotchas": [
      "Version: v1.8.2",
      "-l, --selector <key=value>: Select releases matching labels; `dir=<path>` uses the defining Helmfile's directory relative to the root and matches that directory and its subdirectories. The option can be specified multiple times; comma-separated selectors in a group are all required, while separate groups are resolved independently.",
      "dir=<path> (required): For this task, provide a relative directory path. Trailing slashes and `./` prefixes are stripped. Absolute paths, escaping `..` segments, and bare `.` are rejected. `dir` is reserved; user-defined `dir` labels are ignored for selector matching and cause a warning.",
      "Prerequisite: Helmfile v1.8.2 documentation describes this selector. Helm must be installed for Helmfile operation.",
      "Directory matching is relative to the root directory: the file passed via `-f` (or that directory itself when `-f` points to one), or the current directory when no `-f` is given.",
      "`dir=` uses directory-prefix matching, so a path matches releases in that directory and its subdirectories.",
      "Values are normalized by stripping trailing slashes and `./` prefixes.",
      "Absolute paths, `..` segments that escape the root, and bare `.` are rejected at parse time; omit the selector to match every release.",
      "The `dir` label key is reserved; user-defined `dir` labels are ignored for selector matching and produce a warning."
    ]
  },
  "why_it_matters": "When syncing one service in a project with nested helmfiles, select its directory to filter releases and skip sub-helmfile branches that cannot match.",
  "before": "Before this change, CLI selectors could skip a nested Helmfile before loading or rendering it only when that entry had explicit `selectors:` provably incompatible with the CLI selectors; otherwise the nested branches were parsed and templated before release filtering.",
  "sources": [
    "https://github.com/helmfile/helmfile/releases/tag/v1.8.2",
    "https://github.com/helmfile/helmfile/pull/2609",
    "https://github.com/helmfile/helmfile/blob/v1.8.2/docs/index.md"
  ],
  "rank": 0.97047,
  "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": "daily-20261017-12",
    "verdict_id": "daily-20261017-12:daily-20261017-12-b81e945054efb6ec-1:gate",
    "evidence_hash": "605f24f42205aa89205eb11dd629dd5ba0a61b9797fd43897d8102a7bae4a278"
  },
  "review": {
    "draft_hash": "d5d738ac519f138c8398a8119eea72484bf74e6b981aa05f7648a6aa45f46450",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-16T15:21:51.000Z",
    "decision": "daily-20261017-12: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)."
  }
}
