{
  "slug": "dagger-java-sdk-supports-checks-with-check-902417dc20cf",
  "title": "Dagger Java SDK supports checks with `@Check`",
  "tools": [
    "dagger"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-05T23:50:53.000Z",
  "announced_at": "2026-02-05T23:50:53.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a Java module function should validate a condition, annotate its method with both `@Function` and `@Check`. It must return `void` or throw an exception to indicate pass or failure, and can be invoked via `dagger check`.",
    "examples": [
      "@Object\npublic class MyModule {\n    @Function\n    @Check\n    public void validateBuild() {\n        // Validate conditions; throw an exception on failure.\n    }\n}"
    ],
    "gotchas": [
      "Version: v0.19.11",
      "@Check (required): Method annotation that marks a function as a check.",
      "@Function (required): Must be combined with `@Check` so the check is a callable function.",
      "Prerequisite: The check must be a callable function; the annotation documentation says it can be invoked via `dagger check`.",
      "Prerequisite: Checks return `void` or throw exceptions to indicate pass/fail."
    ]
  },
  "why_it_matters": "Mark a Java module function as a check to validate its build or other repository operation.",
  "sources": [
    "https://github.com/dagger/dagger/releases/tag/v0.19.11",
    "https://github.com/dagger/dagger/pull/11704",
    "https://github.com/dagger/dagger/blob/v0.19.11/sdk/java/dagger-java-sdk/src/main/java/io/dagger/module/annotation/Check.java"
  ],
  "rank": 0.97029,
  "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": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-454373f66e502c27-5:gate",
    "evidence_hash": "dcb281f002c1b9c67aedef0c68645f862ce8cfddb9419cd993190ce0596a32bf"
  },
  "review": {
    "draft_hash": "00247792251f24ae59079024cca6ea295ae3d9c0c45ead02db0a3597ff04249f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-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.76 (>= 0.6 needed)."
  }
}
