{
  "schema_version": 1,
  "run_id": "adsetsuko0--pg-migration-lint-gpt-6-luna-1796475720986664311",
  "date": "2026-12-05T13:06:03.338732+00:00",
  "repo": "adsetsuko0/pg-migration-lint",
  "model": "gpt-6-luna",
  "kind": "repo",
  "mcp": "none",
  "commit": "370630fd2375d88f83e855eb6a4935d1cc7cf2c1",
  "outcome": "pass",
  "time_to_working_s": 200.49196849798318,
  "install_s": 42.287,
  "first_use_s": 91.366,
  "stuck_step": null,
  "what_failed": null,
  "suggested_fix": null,
  "what_it_did": "Lint an unsafe PostgreSQL migration and report actionable findings.",
  "needs": [],
  "needs_which": null,
  "missing": null,
  "claims": [
    {
      "kind": "claim",
      "claim": "Static analyzer detects unsafe PostgreSQL migrations.",
      "source": "Static analyzer that detects **unsafe PostgreSQL migrations** before they reach production.",
      "input": "examples/bad.sql containing unsafe PostgreSQL operations",
      "expected": "MIG001 finding for CREATE INDEX without CONCURRENTLY",
      "command": "<guest-path> lint examples/bad.sql --fail-on never",
      "verdict": "yes",
      "outcome": "Real input produced the expected result: MIG001 CREATE INDEX without CONCURRENTLY",
      "evidence": "…MIG001 CREATE INDEX without CONCURRENTLY (error)\n    SQL: CREATE INDEX idx_users_email ON users (email);\n    Why: Takes a SHARE lock: all writes (INSERT/UPDATE/DELETE) to the table are \nblocked for the whole index build. Duration grows with table size.\n    Fix: Use CREATE INDEX CONCURRENTLY. In Alembic run it inside \nop.get_context().autocommit_block() since it cannot run in a transaction.\n\nexamples/bad.sql:2  MIG002 ADD COLUMN with volatile DEFAULT (error)\n    SQL: ALTER TABLE users ADD COLUMN token uuid DEFAULT gen_random_uuid();\n    Why: A volatile default (e.g. random(), gen_random_uuid())",
      "cwd": "<guest-path>",
      "hardware_prerequisite": null,
      "returncode": 0,
      "stdout": " the whole table to verify no NULLs while holding ACCESS EXCLUSIVE\nlock.\n    Fix: Add CHECK (col IS NOT NULL) NOT VALID, then VALIDATE CONSTRAINT, then \nSET NOT NULL (on PG12+ the scan is skipped).\n\nexamples/bad.sql:1  MIG010 Missing lock_timeout (warning)\n    Why: Without lock_timeout, a migration waiting for a lock queues behind a \nlong-running query, and every query arriving after it queues behind the \nmigration: the table appears frozen.\n    Fix: Run SET lock_timeout = '5s' (or SET LOCAL inside the transaction) at \nthe start of the migration and retry on failure.\n\n3 error(s), 1 warning(s)\n",
      "stderr": "",
      "output_truncated": true,
      "source_checked": true,
      "source_file": "README.md"
    },
    {
      "kind": "claim",
      "claim": "Parses SQL with PostgreSQL's real parser, not regexes.",
      "source": "Parses SQL with PostgreSQL's real parser ([pglast](https://github.com/lelit/pglast)), not regexes",
      "input": "examples/bad.sql containing PostgreSQL statements",
      "expected": "MIG001 finding for CREATE INDEX without CONCURRENTLY",
      "command": "<guest-path> lint examples/bad.sql --fail-on never",
      "verdict": "yes",
      "outcome": "Real input produced the expected result: MIG001 CREATE INDEX without CONCURRENTLY",
      "evidence": "…MIG001 CREATE INDEX without CONCURRENTLY (error)\n    SQL: CREATE INDEX idx_users_email ON users (email);\n    Why: Takes a SHARE lock: all writes (INSERT/UPDATE/DELETE) to the table are \nblocked for the whole index build. Duration grows with table size.\n    Fix: Use CREATE INDEX CONCURRENTLY. In Alembic run it inside \nop.get_context().autocommit_block() since it cannot run in a transaction.\n\nexamples/bad.sql:2  MIG002 ADD COLUMN with volatile DEFAULT (error)\n    SQL: ALTER TABLE users ADD COLUMN token uuid DEFAULT gen_random_uuid();\n    Why: A volatile default (e.g. random(), gen_random_uuid())",
      "cwd": "<guest-path>",
      "hardware_prerequisite": null,
      "returncode": 0,
      "stdout": " the whole table to verify no NULLs while holding ACCESS EXCLUSIVE\nlock.\n    Fix: Add CHECK (col IS NOT NULL) NOT VALID, then VALIDATE CONSTRAINT, then \nSET NOT NULL (on PG12+ the scan is skipped).\n\nexamples/bad.sql:1  MIG010 Missing lock_timeout (warning)\n    Why: Without lock_timeout, a migration waiting for a lock queues behind a \nlong-running query, and every query arriving after it queues behind the \nmigration: the table appears frozen.\n    Fix: Run SET lock_timeout = '5s' (or SET LOCAL inside the transaction) at \nthe start of the migration and retry on failure.\n\n3 error(s), 1 warning(s)\n",
      "stderr": "",
      "output_truncated": true,
      "source_checked": true,
      "source_file": "README.md"
    },
    {
      "kind": "claim",
      "claim": "10 rules, each with an explanation and a safe rewrite",
      "source": "10 rules, each with an explanation and a safe rewrite",
      "input": "MIG001",
      "expected": "explanation and CREATE INDEX CONCURRENTLY safe rewrite",
      "command": "<guest-path> explain MIG001",
      "verdict": "yes",
      "outcome": "Real input produced the expected result: Use CREATE INDEX CONCURRENTLY.",
      "evidence": "…Use CREATE INDEX CONCURRENTLY. In Alembic run it inside \nop.get_context().autocommit_block() since it cannot run in a transaction.\n",
      "cwd": "<guest-path>",
      "hardware_prerequisite": null,
      "returncode": 0,
      "stdout": "MIG001 CREATE INDEX without CONCURRENTLY (error)\nWhy: Takes a SHARE lock: all writes (INSERT/UPDATE/DELETE) to the table are \nblocked for the whole index build. Duration grows with table size.\nFix: Use CREATE INDEX CONCURRENTLY. In Alembic run it inside \nop.get_context().autocommit_block() since it cannot run in a transaction.\n",
      "stderr": "",
      "output_truncated": false,
      "source_checked": true,
      "source_file": "README.md"
    }
  ],
  "example_checks": [
    {
      "kind": "example",
      "claim": "Quick start: lint SQL files or whole directories.",
      "source": "README.md",
      "input": "examples/bad.sql",
      "command": "<guest-path> lint examples/bad.sql --fail-on never",
      "evidence": "s the whole table to verify no NULLs while holding ACCESS EXCLUSIVE\nlock.\n    Fix: Add CHECK (col IS NOT NULL) NOT VALID, then VALIDATE CONSTRAINT, then \nSET NOT NULL (on PG12+ the scan is skipped).\n\nexamples/bad.sql:1  MIG010 Missing lock_timeout (warning)\n    Why: Without lock_timeout, a migration waiting for a lock queues behind a \nlong-running query, and every query arriving after it queues behind the \nmigration: the table appears frozen.\n    Fix: Run SET lock_timeout = '5s' (or SET LOCAL inside the transaction) at \nthe start of the migration and retry on failure.\n\n3 error(s), 1 warning(s)",
      "deferred": false,
      "expected": "MIG001 finding for CREATE INDEX without CONCURRENTLY",
      "hardware_prerequisite": null,
      "returncode": 0,
      "native_crash": false,
      "stdout": " the whole table to verify no NULLs while holding ACCESS EXCLUSIVE\nlock.\n    Fix: Add CHECK (col IS NOT NULL) NOT VALID, then VALIDATE CONSTRAINT, then \nSET NOT NULL (on PG12+ the scan is skipped).\n\nexamples/bad.sql:1  MIG010 Missing lock_timeout (warning)\n    Why: Without lock_timeout, a migration waiting for a lock queues behind a \nlong-running query, and every query arriving after it queues behind the \nmigration: the table appears frozen.\n    Fix: Run SET lock_timeout = '5s' (or SET LOCAL inside the transaction) at \nthe start of the migration and retry on failure.\n\n3 error(s), 1 warning(s)\n",
      "stderr": "",
      "output_truncated": true,
      "verdict": "yes",
      "outcome": "command completed successfully"
    }
  ],
  "cycle_checks": [
    {
      "kind": "cycle",
      "claim": "Scheduled or looping main behavior",
      "source": "repository entry points",
      "input": "source inspection",
      "expected": "identify the product trigger",
      "verdict": "yes",
      "outcome": "Inspected README.md, action.yml, and src/pg_migration_lint/cli.py plus dynamic.py. The CLI exposes one-shot lint/explain/measure operations; no scheduled cycle, cron, webhook, or --once/--now trigger exists. Dynamic mode has internal lock-probe loops but is a single measure operation, not a recurring product cycle.",
      "evidence": "Inspected README.md, action.yml, and src/pg_migration_lint/cli.py plus dynamic.py. The CLI exposes one-shot lint/explain/measure operations; no scheduled cycle, cron, webhook, or --once/--now trigger exists. Dynamic mode has internal lock-probe loops but is a single measure operation, not a recurring product cycle.",
      "command": ""
    }
  ],
  "maintenance": {
    "archived": false,
    "ci_commit": "370630fd2375d88f83e855eb6a4935d1cc7cf2c1",
    "ci_read_at": "2026-12-05T12:47:43Z",
    "ci_state": "PENDING",
    "commits_90d": 21,
    "last_commit_at": "2026-12-05T12:44:23Z",
    "last_release_at": "2026-12-05T11:28:56Z",
    "median_reply_hours": null,
    "merged_prs_90d": 0,
    "note": "actively maintained: last commit 0 days ago; 21 commits and 0 merged PRs in 90 days; 2 open issues, 0 open PRs; latest release 2026-12-05",
    "open_issues": 2,
    "open_prs": 0,
    "reply_share": null,
    "reply_threads": 0,
    "verdict": "maintained"
  },
  "dependencies": [
    "Python 3.12.3",
    "pg-migration-lint editable install in <guest-path>",
    "pglast",
    "typer",
    "rich"
  ],
  "local_or_hosted": "local",
  "readme_deviations": [],
  "safety": {
    "version": "z2x-1",
    "summary": "Nothing suspicious seen in this run.",
    "limitations": [
      "A short run cannot establish that code is safe.",
      "Connections show IP addresses; proxies can hide the final hostname.",
      "Tracing covers dispatched commands and their children, not the whole OS; guest root can interfere with tracing."
    ]
  },
  "observed": {
    "traced": true,
    "trace_truncated": false,
    "network_rule": true,
    "unsorted_contacts": false,
    "protocols_recorded": false,
    "lookups_recorded": true,
    "unsorted_blocked_ports": [],
    "contacts": [],
    "contacts_not_listed": 0,
    "lookups": [
      {
        "owner": "installer",
        "programs": [
          "git-remote-https"
        ],
        "names": [
          "github.com"
        ]
      },
      {
        "owner": "installer",
        "programs": [
          "python"
        ],
        "names": [
          "files.pythonhosted.org",
          "pypi.org"
        ]
      }
    ],
    "credential_reads": [],
    "outside_writes": 0,
    "download_and_run_lines": 0,
    "malware_advisories": [],
    "vulnerabilities": [],
    "secrets": 0,
    "secrets_in_tests": 0,
    "download_lines_in_tests": 0,
    "dependency_versions": 42,
    "scanned": {
      "secrets": true,
      "dependencies": true,
      "source": true
    },
    "capped_kinds": [],
    "findings_capped": false,
    "malware_checked": true,
    "scan_skips": {},
    "compiled": {
      "counts": {},
      "paths": []
    },
    "installed": {
      "packages": 22,
      "malicious": [],
      "vulnerabilities": [
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-4xh5-x5gv-qwph"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-58qw-9mgm-455v"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-6vgw-5pg2-w6jp"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-jp4c-xjxw-mgf9"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-qwm4-qh6w-59xr"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-wf93-45jw-7689"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-1795"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-1796"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-196"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-2875"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-2876"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-3721"
        }
      ]
    },
    "installed_inventory": true,
    "installed_partial": false
  },
  "platform": "linux",
  "test_version": "readme-4243f19282e59714a358f5d27849c5ebf3ef413d1667fe1ae5969f004abbb1d7",
  "touched": {
    "evidence_file": "touched.json.gz",
    "linked_files": [
      "agent-events.jsonl.gz",
      "command-output.jsonl.gz"
    ],
    "network": {
      "allowed_hosts": [
        "files.pythonhosted.org",
        "pypi.org"
      ],
      "blocked_hosts": [],
      "canary_checked": true,
      "canary_sent": false,
      "canary_sent_to": [],
      "hosts": [
        "files.pythonhosted.org",
        "pypi.org"
      ],
      "package_registries": [
        "files.pythonhosted.org",
        "pypi.org"
      ],
      "private_address_attempts": 0,
      "recorded": true,
      "repo_hosts": [],
      "unanswered_hosts": [],
      "unattributed": [],
      "hosts_withheld": 2
    },
    "secret_files": {
      "opened_by_agent": [],
      "opened_by_other": [],
      "opened_by_repo": [],
      "planted": [
        "~/.env",
        "~/.ssh/id_ed25519",
        "~/.aws/credentials",
        "~/.config/gh/hosts.yml"
      ],
      "recorded": true
    },
    "version": 1
  },
  "evidence_strength": "readme_checked"
}
