From patchwork Mon Jan 19 20:40:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1636 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855345; bh=phaa0Ri2Bpcqb/GII1/jbduQ8VGldgUI5hoklcE4FoY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=N8vp5zWNfAWl0qhf6TrcqRU7hlQ7XmtKpg3dXiDsrphbonDoGvrIjoU0Dk3LK9JUY 6YFOF9qYkZ3l60SUKpruDq4+tk6MKmelZLsYwxi1PrrUrPdfn/J8FQd1xKtDYp2r4+ xB72GEOvNFCs3TJ2iQ4rmaj6STJqdyAQYSNqtEfRWfXNkbCoMp+CT+fJPvcJKbpY+B ExWY+rqTS0ktYUBjWoSXFV/5t3mIiWL9WwwHy6JYAV47gEYH65+hb4w8uBYnRfO4yV JYzh8dJWUEbDcO8E2haA3K7G4HdLug5CoXvG/QGJpdXhYvR5YSWU2VwcKGhMN/adTF wfN+Jxl5KBOoA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 563A069504 for ; Mon, 19 Jan 2026 13:42:25 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id rG2oWtcZgpMl for ; Mon, 19 Jan 2026 13:42:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855345; bh=phaa0Ri2Bpcqb/GII1/jbduQ8VGldgUI5hoklcE4FoY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=N8vp5zWNfAWl0qhf6TrcqRU7hlQ7XmtKpg3dXiDsrphbonDoGvrIjoU0Dk3LK9JUY 6YFOF9qYkZ3l60SUKpruDq4+tk6MKmelZLsYwxi1PrrUrPdfn/J8FQd1xKtDYp2r4+ xB72GEOvNFCs3TJ2iQ4rmaj6STJqdyAQYSNqtEfRWfXNkbCoMp+CT+fJPvcJKbpY+B ExWY+rqTS0ktYUBjWoSXFV/5t3mIiWL9WwwHy6JYAV47gEYH65+hb4w8uBYnRfO4yV JYzh8dJWUEbDcO8E2haA3K7G4HdLug5CoXvG/QGJpdXhYvR5YSWU2VwcKGhMN/adTF wfN+Jxl5KBOoA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3D836694CE for ; Mon, 19 Jan 2026 13:42:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855343; bh=v+i4zl7zXzRvfZ8xK6A2BT9r2yEDUtgt+8x2aqwZXBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ojoa19rNHF2vTzkB3k8YdRTUTTUe7Rv9FHrSFx+U4os7pG3Zyrsc2aDaXeVMGeFbx uVAtJ6P2zM7cWEUTO/iySURMG29GdhSVOHuG1wvULrZHDtI7M4R7+rcPCTI3/fihoa QYJdPewlL8Fi85OWp6nvWE6P1MMiTFVIrGsI8VYzbNGIWxkHlEZUfx+hvXQ2uJDV+U qEvIaNt49Gf51R+gbWiJVVNKb+jn+QSArO6kARzAoYIshmb1qc2JPKRJxtYUuo7szo rGInBYJOcn7qJ1BNIRdAI+jSGwL/7Za32+3/8BcziyguxsVf+N/fXbsC05geFQt1IJ 6yvbxm8oraWXQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 46022694CE; Mon, 19 Jan 2026 13:42:23 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 3Lr0WS4rTcF5; Mon, 19 Jan 2026 13:42:23 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855338; bh=nPN/OwiF7XVfr6L12Js1xM/iCZXJhMOycsKA46E+RM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XKShZoaoPciHjguxfqTuDzjTRPITK92+w17iG0ffHtRy1RQtpN1Sq/bCDXmrK1aDA g9mNYfS+UdB+5+uIYAqKuX3pQYrRHQJCA0Eg3hMy/MWudJgOAoeVsakw22fDmDD7UZ tTrY+/8Uzz3O+91HXvb3DAgUxORk3dMfqUooaQumBOM0jdrJgw8oOUEOnT7XmD1s5l zKMh+g4hKPNBaHNK5RTEhm/HykeNVKkYob5c4oAfCorKmKpb2pL4Ewj2P6TXx+Frhz t6NkVRZeWBAukGk1MOiC0CdOImdnfDmZrFUiYz0qmGwuFOmeTi9Cw/UbFjae+KFxeU +KtxX5qa+V8UQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id DDAB6693BA; Mon, 19 Jan 2026 13:42:17 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 19 Jan 2026 13:40:59 -0700 Message-ID: <20260119204130.3972647-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119204130.3972647-1-sjg@u-boot.org> References: <20260119204130.3972647-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: C6C62W773NZDAETBT755WEAX3546MFJB X-Message-ID-Hash: C6C62W773NZDAETBT755WEAX3546MFJB X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/27] pickman: Handle qconfig resync commits specially List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Commits with subject "configs: Resync with savedefconfig" run savedefconfig on all boards. These cannot be cherry-picked directly because the defconfig state depends on the target branch's Kconfig options, not the source branch. Add detection for qconfig resync commits and instruct the agent to run ./tools/qconfig.py -s -Cy instead of cherry-picking. This regenerates the savedefconfig changes based on the current Kconfig state in the target branch. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/pickman/agent.py | 44 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/tools/pickman/agent.py b/tools/pickman/agent.py index b081c36b504..589d61b727a 100644 --- a/tools/pickman/agent.py +++ b/tools/pickman/agent.py @@ -24,6 +24,12 @@ SIGNAL_SUCCESS = 'success' SIGNAL_APPLIED = 'already_applied' SIGNAL_CONFLICT = 'conflict' +# Commits that need special handling (regenerate instead of cherry-pick) +# These run savedefconfig on all boards and depend on target branch Kconfig state +QCONFIG_SUBJECTS = [ + 'configs: Resync with savedefconfig', +] + # Check if claude_agent_sdk is available try: from claude_agent_sdk import query, ClaudeAgentOptions @@ -45,6 +51,18 @@ def check_available(): return True +def is_qconfig_commit(subject): + """Check if a commit subject indicates a qconfig resync commit + + Args: + subject (str): Commit subject line + + Returns: + bool: True if this is a qconfig resync commit + """ + return any(subject.startswith(pat) for pat in QCONFIG_SUBJECTS) + + async def run(commits, source, branch_name, repo_path=None): # pylint: disable=too-many-locals """Run the Claude agent to cherry-pick commits @@ -70,13 +88,18 @@ async def run(commits, source, branch_name, repo_path=None): # pylint: disable= os.remove(signal_path) # Build commit list for the prompt, marking potentially applied commits + # and qconfig resync commits commit_entries = [] has_applied = False + has_qconfig = False for commit in commits: entry = f' - {commit.chash}: {commit.subject}' if commit.applied_as: entry += f' (maybe already applied as {commit.applied_as})' has_applied = True + if is_qconfig_commit(commit.subject): + entry += ' [QCONFIG RESYNC]' + has_qconfig = True commit_entries.append(entry) commit_list = '\n'.join(commit_entries) @@ -86,7 +109,7 @@ async def run(commits, source, branch_name, repo_path=None): # pylint: disable= if has_applied: applied_note = ''' -IMPORTANT: Some commits may already be applied. Before cherry-picking commits +IMPORTANT: Some commits may already be applied. Before cherry-picking commits marked as "maybe already applied as ", verify they are truly the same commit: 1. Compare the actual changes between the original and found commits: - Use: git show --no-ext-diff > /tmp/orig.patch @@ -99,12 +122,29 @@ marked as "maybe already applied as ", verify they are truly the same comm proceed with the cherry-pick as they are different commits. ''' + # Add note about qconfig resync commits + qconfig_note = '' + if has_qconfig: + qconfig_note = ''' + +IMPORTANT: Commits marked [QCONFIG RESYNC] need special handling. These commits +run savedefconfig on all boards and cannot be cherry-picked directly because the +defconfig state depends on the target branch's Kconfig options. + +For [QCONFIG RESYNC] commits, instead of cherry-picking: +1. Skip the cherry-pick for this commit +2. Run: ./tools/qconfig.py -s -Cy + This regenerates the savedefconfig changes based on the current Kconfig state +3. The qconfig.py tool will create a commit automatically with the updated defconfigs +4. Continue with the remaining commits after qconfig.py completes +''' + # Get full hash of last commit for signal file last_commit_hash = commits[-1].hash prompt = f"""Cherry-pick the following commits from {source} branch: -{commit_list}{applied_note} +{commit_list}{applied_note}{qconfig_note} Steps to follow: 1. First run 'git status' to check the repository state is clean