{
  "lab": "approval-binding",
  "cases": [
    {
      "case": "symlink-swap",
      "kind": "real file operations in a temporary directory",
      "approved": "write notes/todo.md (inside the workspace)",
      "change_after_approval": "notes/ replaced by a symlink to a directory outside the workspace",
      "naive": {
        "binds": "the path string",
        "wrote_outside_workspace": true
      },
      "bound": {
        "binds": "workspace identity + path walked with O_NOFOLLOW",
        "wrote_outside_workspace": false,
        "blocked": true,
        "reason": "NotADirectoryError: Not a directory"
      }
    },
    {
      "case": "name-not-content",
      "kind": "decision logic only",
      "approved": "server 'build-tools': node tools/build.js",
      "change_after_approval": "same name, new args: tools/build.js --post scripts/upload-env.js",
      "naive": {
        "binds": "the server name",
        "runs_changed_command_without_prompt": true
      },
      "bound": {
        "binds": "SHA-256 of the canonical entry",
        "runs_changed_command_without_prompt": false,
        "approved_digest": "537e86878cbc3590",
        "current_digest": "29b008b793e18e07"
      }
    },
    {
      "case": "prefix-allowlist",
      "kind": "decision logic only",
      "approved": "always allow: git status, git diff, ls",
      "requested": "git status && cat config/local.env",
      "naive": {
        "binds": "the first characters of the command line",
        "allowed_without_prompt": true
      },
      "bound": {
        "binds": "the parsed argv, with shell operators rejected",
        "allowed_without_prompt": false,
        "reason": "shell operator ['&&']"
      }
    },
    {
      "case": "case-fold",
      "kind": "decision logic only; models a case-insensitive file system",
      "approved": "writes to .agent/settings.json always need confirmation",
      "requested": "write .Agent/Settings.JSON",
      "naive": {
        "binds": "an exact string",
        "treated_as_protected": false
      },
      "bound": {
        "binds": "the name as the file system will compare it",
        "treated_as_protected": true
      }
    }
  ]
}
