{
  "checker": {
    "claims": [
      {
        "claim": "schema document prints the JSON Schema your transform must produce",
        "command": "<guest-path> schema document",
        "evidence": "\u2026\"model\": \"DocumentDefinition\",\n    \"schema\": {\n      \"$defs\": {\n        \"CommentDefinition\": {\n          \"description\": \"Describes a comment on a document\",\n          \"properties\": {\n            \"id\": {\n              \"title\": \"Id\",\n              \"type\": \"string\"\n            },\n            \"author\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/$defs/UserReferenceDefinition\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null\n            },\n            \"content\": {\n              \"anyOf",
        "expected": "DocumentDefinition JSON schema",
        "input": "schema document",
        "kind": "claim",
        "outcome": "Real input produced the expected result: \"model\": \"DocumentDefinition\"",
        "returncode": 0,
        "source": "`glean-idx schema document` prints the JSON Schema your `transform()` has to",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      },
      {
        "claim": "mock test runs the connector without touching the network",
        "command": "<guest-path> test --phase mock --connector complete:create_connector",
        "evidence": "\u2026\"documents\": 1\n        }\n      }\n    ]\n  }\n}\n",
        "expected": "1 document posted to mocked Glean",
        "input": "README snippet connector with static data, mock phase",
        "kind": "claim",
        "outcome": "Real input produced the expected result: \"documents\": 1",
        "returncode": 0,
        "source": "Test it without touching the network:",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      },
      {
        "claim": "every command takes --output json for a stable envelope",
        "command": "<guest-path> schema document --output json",
        "evidence": "\u2026\"ok\": true,\n  \"data\": {\n    \"name\": \"document\",\n    \"model\": \"DocumentDefinition\",\n    \"schema\": {\n      \"$defs\": {\n        \"CommentDefinition\": {\n          \"description\": \"Describes a comment on a document\",\n          \"properties\": {\n            \"id\": {\n              \"title\": \"Id\",\n              \"type\": \"string\"\n            },\n            \"author\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/$defs/UserReferenceDefinition\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"default\": null\n        ",
        "expected": "JSON envelope with ok true",
        "input": "schema document --output json",
        "kind": "claim",
        "outcome": "Real input produced the expected result: \"ok\": true",
        "returncode": 0,
        "source": "Every command takes `--output json` for a stable envelope, `--yes` to skip",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      }
    ],
    "cycle_checks": [
      {
        "claim": "the connector indexing job runs on a recurring schedule",
        "command": "<guest-path> test --phase mock --connector complete:create_connector",
        "evidence": "{\n  \"ok\": true,\n  \"data\": {\n    \"connector\": \"create_connector\",\n    \"mode\": \"full\",\n    \"clients\": [\n      \"data_client\"\n    ],\n    \"phases\": [\n      {\n        \"phase\": \"mock\",\n        \"status\": \"ran\",\n        \"fidelity\": \"mocked Glean, the connector's own data clients\",\n        \"posted\": {\n          \"documents\": 1\n        }\n      }\n    ]\n  }\n}",
        "expected": "one full-mode cycle posts 1 document to mocked Glean",
        "input": "snippet connector project, WIKI_API_TOKEN placeholder",
        "kind": "cycle",
        "method": "run-once substitute: glean-idx test --phase mock runs the same connector full-mode fetch/transform/upload path once against mocked Glean",
        "outcome": "Triggered one cycle by hand (run-once substitute: glean-idx test --phase mock runs the same connector full-mode fetch/transform/upload path once against mocked Glean; normal trigger: Kubernetes CronJob daily at 02:00 UTC (not triggered here; needs GKE/GCP secrets)): {\n  \"ok\": true,\n  \"data\": {\n    \"connector\": \"create_connector\",\n    \"mode\": \"full\",\n    \"clients\": [\n      \"data_client\"\n    ],\n    \"phases\": [\n      {\n        \"phase\": \"mock\",\n        \"status\": \"ran\",\n        \"fidelity\": \"mocked Glean, the connector's own data clients\",\n        \"posted\": {\n          \"documents\": 1\n        }\n      }\n    ]\n  }\n}",
        "returncode": 0,
        "schedule": "Kubernetes CronJob daily at 02:00 UTC (not triggered here; needs GKE/GCP secrets)",
        "source": "src/glean/indexing/deployment/config.py",
        "verdict": "yes"
      }
    ],
    "details": {
      "argv": [
        "<guest-path>",
        "test",
        "--phase",
        "mock",
        "--connector",
        "complete:create_connector"
      ],
      "kind": "cli",
      "needs_browser": false,
      "needs_credentials": false,
      "returncode": 0,
      "scope": "product operation",
      "stderr": "",
      "stdout": "{\n  \"ok\": true,\n  \"data\": {\n    \"connector\": \"create_connector\",\n    \"mode\": \"full\",\n    \"clients\": [\n      \"data_client\"\n    ],\n    \"phases\": [\n      {\n        \"phase\": \"mock\",\n        \"status\": \"ran\",\n[excerpt truncated]",
      "working": true
    },
    "evidence_strength": "readme_checked",
    "example_checks": [
      {
        "claim": "deploy init generates Docker and Terraform files for a connector project",
        "command": "<guest-path> deploy init --cloud gcp --connector-factory create_connector --output-dir <guest-path> -y",
        "deferred": false,
        "evidence": "les.tf\",\n      \"glean_deployment.yaml\",\n      \".env.example\",\n      \".dockerignore\"\n    ],\n    \"next_steps\": [\n      \"Edit glean_deployment.yaml \\u2014 set cluster_name, region, and registry.\",\n      \"GCP GKE docs: https://cloud.google.com/kubernetes-engine/docs\",\n      \"GCP Artifact Registry: https://cloud.google.com/artifact-registry/docs\",\n      \"cp .env.example .env  # fill in connector credentials\",\n      \"glean-idx datasource configure\",\n      \"glean-idx deploy build --push\",\n      \"glean-idx deploy secrets upload\",\n      \"glean-idx deploy apply\",\n      \"glean-idx deploy run\"\n    ]\n  }\n}",
        "expected": "generated_files list including glean_deployment.yaml",
        "input": "deploy init --cloud gcp --connector-factory create_connector into a fresh directory",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "README.md",
        "verdict": "yes"
      },
      {
        "claim": "repository unit tests (documented mise run test task, expanded to uv run pytest)",
        "command": "uv run pytest -q -p no:logging tests/",
        "deferred": false,
        "evidence": "gs.py:7: could not import 'watchtower': No module named 'watchtower'\nSKIPPED [1] tests/unit_tests/observability/plugins/aws/test_cloudwatch_metrics.py:5: could not import 'boto3': No module named 'boto3'\nSKIPPED [1] tests/unit_tests/observability/plugins/gcp/test_cloud_logging.py:7: could not import 'google.cloud.logging_v2': No module named 'google'\nSKIPPED [1] tests/unit_tests/observability/plugins/gcp/test_cloud_monitoring.py:5: could not import 'google.cloud.monitoring_v3': No module named 'google'\n1017 passed, 4 skipped in 36.87s\nCannot read termcap database;\nusing dumb terminal settings.",
        "expected": "all unit tests pass; 4 optional cloud-plugin tests skipped",
        "input": "tests/",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "mise.toml [tasks.test]",
        "verdict": "yes"
      }
    ],
    "status": "PASS"
  },
  "deviations": [
    "No mise installed; used the equivalent uv commands from mise.toml tasks setup and test directly.",
    "glean-idx test requires a project folder containing glean_deployment.yaml; the README snippet was run from a project made with deploy init in <guest-path>, not in the snippet folder.",
    "The README snippet's connector was used unmodified; WIKI_API_TOKEN was set to a placeholder because the snippet reads it at import time, and the mock phase never calls the source.",
    "Cycle replay: the real trigger is a Kubernetes CronJob (default cron 0 2 * * *) running generated run.py, which needs GCP Secret Manager and a GKE cluster. It was not triggered. Substitute: one run of glean-idx test --phase mock, which runs the same full-mode fetch/transform/upload path against mocked Glean. This does not test the schedule, secrets, or real upload.",
    "glean-idx doctor was run without credentials: it exits 3 with missing_credentials (GLEAN_SERVER_URL and GLEAN_INDEXING_API_TOKEN unset), matching the README's exit-code contract. No real credentials were available, so the live phases (integration/live) were not run.",
    "Claim README 'Every command takes --output json' was tested on the schema command only.",
    "The validator's example for deploy init uses a fresh output directory (<guest-path>) that the checker creates."
  ],
  "fault_owner": null,
  "main_blocker": null,
  "operation": "Build and run the glean-indexing-sdk CLI from source, generate a connector project from the README quickstart snippet, and run its offline mock test (glean-idx test --phase mock), which fetches, transforms and posts one document to mocked Glean; also glean-idx schema document.",
  "operation_scope": "Offline only. No live Glean instance, no Glean credentials, no GCP/Kubernetes. Python 3.12.3 with uv 0.13.5 (README requires Python >=3.10). Pinned commit 8b6a809814922ca77bf21f80d9b5bbbc6e1f457f (version 1.2.2). CDP endpoint http://<internal-ip>:9226/json/version returned HTTP 200 (Chrome/155), but no browser step was needed.",
  "outcome": "working",
  "plain_failure": null,
  "steps": [
    "git init; git remote add origin https://github.com/gleanwork/glean-indexing-sdk; git fetch --depth 1 origin 8b6a809814922ca77bf21f80d9b5bbbc6e1f457f; git reset --mixed FETCH_HEAD",
    "uv sync --locked --extra dev --extra test --extra lint --extra typing (mise.toml [tasks.setup])",
    "uv run glean-idx --help; uv run glean-idx schema document",
    "uv run pytest -q -p no:logging tests/ (mise.toml [tasks.test]): 1017 passed, 4 skipped",
    "glean-idx deploy init --cloud gcp --connector-factory create_connector (README CLI section) to create a connector project",
    "copy snippets/non_streaming/complete.py (README quickstart code) into the project as complete.py",
    "glean-idx test --phase mock --connector complete:create_connector (README: test without touching the network) -> \"documents\": 1"
  ],
  "stuck_step": null,
  "suggested_fix": null
}
