{
 "number": 35762,
 "input_hash": "6b7f0160b987c23e",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T16:20:29+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 22947,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 3432
 },
 "cost_usd": 0.03008025,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Run Python functional tests through CTest alongside unit tests",
    "Enable standard CTest filtering, reruns, and IDE integration for functional tests"
   ],
   "reviewability": [
    "Ready for review",
    "Code is up to date and passes CI"
   ],
   "agreement": [
    "Concerns about 500 lines of CMake complexity and maintaining two test orchestration paths (maflcko)",
    "Unresolved concern that CTest does not support testing win64 cross-builds like Python does (maflcko)",
    "No other contributors have reviewed or commented"
   ],
   "categories": [
    {
     "name": "build",
     "why": [
      "P3 because integrating functional tests into CTest standardizes test invocation across build targets but adds build complexity and remains opt-in",
      "It improves developer build-system ergonomics without affecting release integrity or platform support"
     ]
    },
    {
     "name": "tests",
     "why": [
      "P3 because unified CTest orchestration improves developer testing workflows and IDE integration",
      "It offers clear ergonomics value but does not resolve test flakiness or expand test coverage"
     ]
    }
   ]
  },
  "summary": "This pull request adds support for discovering and executing Python functional tests through CTest alongside existing unit tests. It adds a `--dump-ctest` manifest export and `--ctest-direct` single-test execution mode to `test_runner.py`, implements CTest test discovery via CMake 4.4's `discover_tests()` with a backward-compatibility shim for older CMake versions, and enables this runner in the macOS native CI job.",
  "problem": "Bitcoin Core's functional tests currently require running `test_runner.py` directly, separating them from CTest unit tests and preventing developers from using standard CTest features such as `-R`, `-L`, `--rerun-failed`, and CTest-aware IDE integrations.",
  "discussion": {
   "open_concerns": [
    "maflcko questioned the 500 lines of added logic complexity versus an alternative in Python, noting that CTest does not work for win64 cross-testing.",
    "maflcko noted that maintaining both CTest and legacy test runner workflows in CI can be confusing and overlapping."
   ],
   "resolved_concerns": [
    "Author removed the need to pass `--configfile` by invoking the generated test runner copy in the build directory as suggested by maflcko.",
    "Author added logic to fail explicitly when `TEST_RUNNER_EXTRA` is supplied under CTest mode so options are not silently ignored."
   ],
   "author_status": "Active; addressed reviewer nits and force-pushed updates on 2026-08-17."
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "The branch is clean, CI passes, and the author addressed recent review feedback."
  },
  "agreement": {
   "state": "Mild",
   "summary": "Mild: maflcko questioned added complexity and noted win64 cross-testing limitations; no ACKs.",
   "reason": "Only one reviewer has commented, raising questions about whether 500 lines of CMake orchestration logic is justified given Python alternatives and win64 cross-testing constraints.",
   "evidence": [
    "maflcko: 'This pull is adding 500 LOC of logic complexity, so my preference would be to at least keep the overhead low. Recall the alternative to this would be to write it in a few trivial lines of Python'",
    "maflcko: 'Also, recall that Python would work when testing win64-cross builds, but CTest does not.'"
   ]
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "build",
    "member": true,
    "evidence": "Adds CMake functional test registration logic, discovery templates, and updates macOS native CI configuration.",
    "band": "P3",
    "reason_tag": "new feature",
    "score": 0.35,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 1,
     "leverage": 1
    },
    "rationale": "Integrating functional tests into CTest standardizes how tests are registered and invoked across the CMake build system. It is developer-facing ergonomics work that does not touch release integrity or fix platform breakages, making it P3."
   },
   {
    "name": "tests",
    "member": true,
    "evidence": "Modifies test_runner.py to provide CTest manifest generation and single-test direct execution mode.",
    "band": "P3",
    "reason_tag": "new feature",
    "score": 0.35,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 2,
     "leverage": 1
    },
    "rationale": "Allows developers to execute functional tests using standard CTest flags like -R, -L, and --rerun-failed, and surfaces tests to CTest-aware IDEs. While valuable for testing workflows, it does not fix test flakiness or add missing coverage to critical areas, placing it in P3."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [],
  "card": "This PR integrates Python functional tests into CTest, adding manifest export and direct-execution modes to test_runner.py along with CMake discovery rules and a macOS CI demonstration. It allows developers to run unit and functional tests through a uniform CTest interface and leverage standard CTest filtering and IDE tools. It offers worthwhile workflow ergonomics but does not address test suite flakiness or missing test coverage. maflcko raised concerns regarding 500 lines of added logic complexity versus Python alternatives and noted that CTest does not support win64 cross-testing. The PR is ready for review with no open dependency blockers."
 },
 "raw_text": null
}