{
 "number": 36402,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36402",
 "title": "refactor: `wallet_importdescriptors` to separate `run_test()` contents into specific functions",
 "author": "nebula-21",
 "author_association": "CONTRIBUTOR",
 "created_at": "2026-10-01T17:12:40Z",
 "updated_at": "2026-10-27T11:52:08Z",
 "description_hash": "a29fad8df54ba972",
 "age_days": 31,
 "draft": false,
 "labels": [
  "Refactoring"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "e46592815ffa55d49dcce7cba316cd58e8dff383",
 "head_ref": "refactor-wallet-importdescriptors-test",
 "head_repo": "nebula-21/bitcoin",
 "head_history": [
  {
   "t": "2026-10-08T14:20:15Z",
   "sha": "03d38530e4efda8d2d582c680ebeda9fada90a47"
  },
  {
   "t": "2026-10-09T12:19:30Z",
   "sha": "e46592815ffa55d49dcce7cba316cd58e8dff383"
  }
 ],
 "additions": 543,
 "deletions": 494,
 "changed_files": 1,
 "commit_count": 1,
 "size_bucket": "XL",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_ack": [
     {
      "login": "polespinasa",
      "url": "https://github.com/bitcoin/bitcoin/pull/36402#issuecomment-6002713375"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "w0xlt": {
   "kind": "approach_ack",
   "hash": null,
   "t": "2026-10-01T18:26:28Z",
   "stale": false
  },
  "polespinasa": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-10-05T20:53:06Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 1,
  "approach_ack": 1,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "polespinasa",
   "w0xlt"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-10-09T12:25:32Z",
  "last_reviewer_activity": "2026-10-05T20:53:06Z",
  "last_reviewer": "polespinasa",
  "author_silent_days": 23,
  "waiting_on_author_days": 0,
  "days_since_update": 5
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "The motivation behind this PR came when reviewing a PR related with `wallet_importdescriptors` and I noticed that the `run_test()` function was more than 800 lines of code long, and looked messy and confusing, specially for someone not familiar with that test suite.\nI believe refactoring the contents inside `run_test()` and separating it into specific functions would make the test easier to understand and to add new future test cases.\n\nTo review this PR, I recommend using the following command to easily see that the changes are only code movement and function organization:\n```\ngit show --color-moved=dimmed-zebra\n```\n\nSuggestions about the new functions, organization, or their order are more than welcome. The approach I took is the one I felt would provide a good balance between keeping the code clean and making the changes as easy as possible to review.\n\nIf reviewers would prefer to split this into multiple commits, I'm also happy to do so.",
 "commits": [
  {
   "sha": "e46592815ffa55d49dcce7cba316cd58e8dff383",
   "date": "2026-10-09T12:19:31Z",
   "message": "refactor: `wallet_importdescriptors` to separate `run_test()` contents into specific functions"
  }
 ],
 "timeline": [
  {
   "t": "2026-10-01T18:26:28Z",
   "kind": "review",
   "who": "w0xlt",
   "assoc": "CONTRIBUTOR",
   "state": "COMMENTED",
   "commit": "78d294494476fe00d299923dceec726cb73170c6",
   "text": "Approach aCK",
   "id": "r:5383694259",
   "url": "https://github.com/bitcoin/bitcoin/pull/36402#pullrequestreview-5383694259",
   "hash": "ff64bdb3b547c2fb",
   "edited": null
  },
  {
   "t": "2026-10-05T20:53:06Z",
   "kind": "comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "text": "Concept ACK\n\nThere are some unnecessary new lines added and removed that add noise to the color-dimmed filter :)",
   "id": "c:6002713375",
   "url": "https://github.com/bitcoin/bitcoin/pull/36402#issuecomment-6002713375",
   "hash": "ffeb5026d5c8dae1",
   "edited": null
  },
  {
   "t": "2026-10-08T14:20:15Z",
   "kind": "force_push",
   "who": "nebula-21",
   "commit": "03d38530e4efda8d2d582c680ebeda9fada90a47",
   "id": "push:03d38530e4efda8d2d582c680ebeda9fada90a47"
  },
  {
   "t": "2026-10-08T15:19:27Z",
   "kind": "comment",
   "who": "nebula-21",
   "assoc": "CONTRIBUTOR",
   "text": "[quoted text omitted]\n\nI've tried to avoid them as much as possible, but some of them are necessary to re-arrange into new functions keeping the separations of the original tests intact.",
   "id": "c:6063096631",
   "url": "https://github.com/bitcoin/bitcoin/pull/36402#issuecomment-6063096631",
   "hash": "04c19184f9b31d46",
   "edited": null
  },
  {
   "t": "2026-10-09T12:19:30Z",
   "kind": "force_push",
   "who": "nebula-21",
   "commit": "e46592815ffa55d49dcce7cba316cd58e8dff383",
   "id": "push:e46592815ffa55d49dcce7cba316cd58e8dff383"
  },
  {
   "t": "2026-10-09T12:25:32Z",
   "kind": "comment",
   "who": "nebula-21",
   "assoc": "CONTRIBUTOR",
   "text": "Rebased on master",
   "id": "c:6080837037",
   "url": "https://github.com/bitcoin/bitcoin/pull/36402#issuecomment-6080837037",
   "hash": "60d41b03a1990659",
   "edited": null
  }
 ],
 "labels_log": [
  {
   "t": "2026-10-01T17:12:43Z",
   "action": "labeled",
   "label": "Refactoring",
   "who": "DrahtBot"
  },
  {
   "t": "2026-10-09T01:23:41Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-10-09T12:26:47Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1476,
 "text_tokens_estimate": 369,
 "changed_paths": [
  "test/functional/wallet_importdescriptors.py"
 ],
 "files": [
  {
   "path": "test/functional/wallet_importdescriptors.py",
   "add": 543,
   "del": 494
  }
 ],
 "test_lines": 1037,
 "git": {
  "head": "e46592815ffa55d49dcce7cba316cd58e8dff383",
  "head_matches_backup": true,
  "base": "4bacf21a13c2ed25ef9362ca38f26bf0a67d22c9",
  "patch_id": "bde177f2b06f720b",
  "commits": [
   {
    "sha": "e46592815f",
    "subject": "refactor: `wallet_importdescriptors` to separate `run_test()` contents into specific functions",
    "files": 1,
    "add": 543,
    "del": 494
   }
  ],
  "patch_truncated": true
 },
 "patch_id": "bde177f2b06f720b",
 "input_hash": "4849d0da5be1cca3",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}