{
  "slug": "jj-templates-add-try-expr-fallback-b54c13ecd23c",
  "title": "jj templates add try(expr, fallback...)",
  "tools": [
    "jj"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-06T01:42:10.000Z",
  "announced_at": "2026-08-06T01:42:10.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a template expression can fail at runtime, wrap it in `try(...)` to return the first successful expression and suppress earlier runtime errors; parsing errors still pass through.",
    "examples": [
      "jj log -T 'try(expr, fallback)'"
    ],
    "gotchas": [
      "Version: v0.44.0",
      "expr (required): Template expression evaluated first.",
      "fallback...: Zero or more expressions evaluated in order; returns the first successful result. Earlier runtime errors are suppressed; parsing errors, including type errors, pass through."
    ]
  },
  "why_it_matters": "When a template expression may fail at runtime, provide a fallback value.",
  "sources": [
    "https://github.com/jj-vcs/jj/releases/tag/v0.44.0",
    "https://github.com/jj-vcs/jj/blob/v0.44.0/docs/templates.md"
  ],
  "rank": 0.95024,
  "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": "wave1b-tools-20261017",
    "verdict_id": "wave1b-tools-20261017:wave1b-tools-20261017-308141f59d306654-8:gate",
    "evidence_hash": "45541c81170897c549c60174d7b60409c4ed2f6670195de1cd807c7d79ca2b19"
  },
  "review": {
    "draft_hash": "a6a9007fc710285c9264e967f19007d978d7a48c3c09b44de041d42eba17b0fc",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-tools-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.71 (>= 0.6 needed)."
  }
}
