{
  "schema_version": 1,
  "run_id": "alex00010--n1scan-gpt-6-luna-1796096377698558859",
  "date": "2026-12-01T03:46:49.599453+00:00",
  "repo": "alex00010/n1scan",
  "model": "gpt-6-luna",
  "kind": "repo",
  "mcp": "none",
  "commit": "b78d3923bdfaf04bdc82916ac7c5265b19223469",
  "outcome": "pass",
  "time_to_working_s": 384.3093093710486,
  "install_s": 165.267,
  "first_use_s": 161.672,
  "stuck_step": null,
  "what_failed": null,
  "suggested_fix": null,
  "what_it_did": "n1scan run --report ... -- clients/go/goclient pgx n1",
  "needs": [],
  "needs_which": null,
  "missing": null,
  "claims": [
    {
      "kind": "claim",
      "claim": "Find N+1 queries by watching PostgreSQL traffic and fail CI only for new ones",
      "source": "**Find N+1 queries by watching your app's PostgreSQL traffic, and fail CI only when a new one appears. One binary, no code changes, any language or ORM.**",
      "input": "Run the included pgx client through n1scan against PostgreSQL test data with 20 authors and their repeated post counts.",
      "expected": "n1scan reports an N+1 finding; the query's values are linked to the preceding authors query and an index suggestion is printed.",
      "command": "<guest-path> run --report <guest-path> -- <guest-path> pgx n1",
      "verdict": "yes",
      "outcome": "Real input produced the expected result: N+1",
      "evidence": "N+1 03:46:22 conn 1: same query 5+ times in 111.7ms\n    SELECT count(*) FROM (SELECT id, title FROM posts WHERE author_id = $1) p\n    after: SELECT id FROM authors ORDER BY id LIMIT ?\n    parent proven: 5/5 values of $1 came from its column \"column 1\", in row order\n    values: 5 distinct so far (hidden; --show-values prints them)\n    index: CREATE INDEX CONCURRENTLY ON public.posts (author_id);\n    sequential scan on public.posts (~200000 rows) filtering on author_id, run once per repetition; the index also adds a little work to every write on the table\n\nn1scan summary: 21 queries on 1 connect",
      "cwd": "<guest-path>",
      "hardware_prerequisite": null,
      "returncode": 0,
      "stdout": "RESULT 20 2000\n",
      "stderr": "Y ON public.posts (author_id);\n    sequential scan on public.posts (~200000 rows) filtering on author_id, run once per repetition; the index also adds a little work to every write on the table\n\nn1scan summary: 21 queries on 1 connection in 557.5ms\n\n  1. N+1  20 executions in 1 burst(s), largest 20, 457.1ms spent\n     select count(*) from (select id, title from posts where author_id = ?) p\n     after: SELECT id FROM authors ORDER BY id LIMIT ?\n     parent proven: 20/20 values of $1 came from its column \"column 1\", in row order\n     index: CREATE INDEX CONCURRENTLY ON public.posts (author_id);\n\n",
      "output_truncated": true,
      "source_checked": true,
      "source_file": "README.md"
    }
  ],
  "example_checks": [
    {
      "kind": "example",
      "claim": "Run the project CI pgx N+1 client scenario through n1scan",
      "source": ".github/workflows/ci.yml client setup and action self-test; clients/go/main.go usage",
      "input": "The CI self-test uses clients/go/goclient pgx n1 against the demo database.",
      "command": "<guest-path> run --report <guest-path> -- <guest-path> pgx n1",
      "evidence": "TLY ON public.posts (author_id);\n    sequential scan on public.posts (~200000 rows) filtering on author_id, run once per repetition; the index also adds a little work to every write on the table\n\nn1scan summary: 21 queries on 1 connection in 658.6ms\n\n  1. N+1  20 executions in 1 burst(s), largest 20, 552.1ms spent\n     select count(*) from (select id, title from posts where author_id = ?) p\n     after: SELECT id FROM authors ORDER BY id LIMIT ?\n     parent proven: 20/20 values of $1 came from its column \"column 1\", in row order\n     index: CREATE INDEX CONCURRENTLY ON public.posts (author_id);",
      "deferred": false,
      "expected": "RESULT 20 2000 and an N+1 report.",
      "hardware_prerequisite": null,
      "returncode": 0,
      "native_crash": false,
      "stdout": "RESULT 20 2000\n",
      "stderr": "Y ON public.posts (author_id);\n    sequential scan on public.posts (~200000 rows) filtering on author_id, run once per repetition; the index also adds a little work to every write on the table\n\nn1scan summary: 21 queries on 1 connection in 658.6ms\n\n  1. N+1  20 executions in 1 burst(s), largest 20, 552.1ms spent\n     select count(*) from (select id, title from posts where author_id = ?) p\n     after: SELECT id FROM authors ORDER BY id LIMIT ?\n     parent proven: 20/20 values of $1 came from its column \"column 1\", in row order\n     index: CREATE INDEX CONCURRENTLY ON public.posts (author_id);\n\n",
      "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 operation entrypoints and .github/workflows/ci.yml; n1scan is invoked per wrapped command, with no scheduled product cycle or loop to trigger independently.",
      "evidence": "Inspected README.md operation entrypoints and .github/workflows/ci.yml; n1scan is invoked per wrapped command, with no scheduled product cycle or loop to trigger independently.",
      "command": ""
    }
  ],
  "maintenance": {
    "archived": false,
    "ci_commit": "b78d3923bdfaf04bdc82916ac7c5265b19223469",
    "ci_read_at": "2026-12-01T03:09:39Z",
    "ci_state": "SUCCESS",
    "commits_90d": 35,
    "last_commit_at": "2026-12-01T03:00:46Z",
    "last_release_at": "2026-12-01T03:02:30Z",
    "median_reply_hours": null,
    "merged_prs_90d": 7,
    "note": "actively maintained: last commit 0 days ago; 35 commits and 7 merged PRs in 90 days; 7 open issues, 0 open PRs; latest release 2026-12-01",
    "open_issues": 7,
    "open_prs": 0,
    "reply_share": null,
    "reply_threads": 0,
    "verdict": "maintained"
  },
  "dependencies": [
    "Go 1.25.0 for repository build",
    "Go 1.27.0 auto-selected by clients/go/go.mod",
    "PostgreSQL 16",
    "local seeded n1demo database"
  ],
  "local_or_hosted": "local",
  "readme_deviations": [],
  "safety": {
    "version": "z2x-1",
    "summary": "Review signals: 4 known vulnerability.",
    "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": [
          "http"
        ],
        "names": [
          "_http._tcp.archive.ubuntu.com",
          "archive.ubuntu.com",
          "security.ubuntu.com",
          "our local network"
        ]
      }
    ],
    "credential_reads": [],
    "outside_writes": 0,
    "download_and_run_lines": 0,
    "malware_advisories": [],
    "vulnerabilities": [
      {
        "package": "deepmerge-ts",
        "version": "7.1.5",
        "advisory": "GHSA-ggr8-5vv4-36mx"
      },
      {
        "package": "effect",
        "version": "3.20.0",
        "advisory": "GHSA-7589-6fvf-x4pw"
      },
      {
        "package": "effect",
        "version": "3.20.0",
        "advisory": "GHSA-7589-6fvf-x4pw"
      },
      {
        "package": "effect",
        "version": "3.21.0",
        "advisory": "GHSA-7589-6fvf-x4pw"
      }
    ],
    "secrets": 0,
    "secrets_in_tests": 0,
    "download_lines_in_tests": 0,
    "dependency_versions": 394,
    "scanned": {
      "secrets": true,
      "dependencies": true,
      "source": true
    },
    "capped_kinds": [],
    "findings_capped": false,
    "malware_checked": true,
    "scan_skips": {},
    "compiled": {
      "counts": {},
      "paths": []
    },
    "installed": {
      "packages": 0,
      "malicious": [],
      "vulnerabilities": []
    },
    "installed_inventory": true,
    "installed_partial": false
  },
  "platform": "linux",
  "test_version": "readme-0a7eb0dad700a0db7fd4a3521baa98c793f56486e50984eb7d7320a3a74d97bf",
  "touched": {
    "evidence_file": "touched.json.gz",
    "linked_files": [
      "agent-events.jsonl.gz",
      "command-output.jsonl.gz"
    ],
    "network": {
      "allowed_hosts": [
        "archive.ubuntu.com",
        "security.ubuntu.com"
      ],
      "blocked_hosts": [],
      "canary_checked": true,
      "canary_sent": false,
      "canary_sent_to": [],
      "hosts": [
        "archive.ubuntu.com",
        "security.ubuntu.com"
      ],
      "package_registries": [
        "archive.ubuntu.com",
        "security.ubuntu.com"
      ],
      "private_address_attempts": 0,
      "recorded": true,
      "repo_hosts": [],
      "unanswered_hosts": [],
      "unattributed": [],
      "hosts_withheld": 9
    },
    "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"
}
