<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>313182</bug_id>
          
          <creation_ts>2026-04-23 16:22:49 -0700</creation_ts>
          <short_desc>git-webkit create-bug --see-also causes cc_radar() to prompt about overwriting the wrong bug</short_desc>
          <delta_ts>2026-04-27 21:48:43 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=312722</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=309535</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2203930</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2026-04-23 16:22:49 -0700</bug_when>
    <thetext>When `git-webkit create-bug` is invoked with both `--see-also` (pointing to other Bugzilla bugs) and `--radar` (pointing to an existing radar), `cc_radar()` incorrectly prompts &quot;Would you like to overwrite &lt;see-also-bug&gt; with &lt;radar&gt;?&quot; -- targeting a see-also bug instead of the newly created bug.

This happens when the radar importer is already CC&apos;d on the bug (e.g., auto-CC on Security product bugs). `cc_radar()` checks `issue.references[0]` to find an already-tracked radar, but `issue.references` is a mixed list containing both radar references (from `&lt;rdar://problem/N&gt;` comments) and Bugzilla references (from see-also links). A see-also Bugzilla link in `references[0]` is mistaken for a tracked radar.

Steps to reproduce:
1. Run `git-webkit create-bug` with `--radar rdar://NNNNNNNNN` and multiple `--see-also https://bugs.webkit.org/show_bug.cgi?id=NNNNNN` arguments on a Security product bug.
2. The Security product auto-CCs the radar importer.
3. `_post_create_operations()` adds the see-also links before calling `cc_radar()`.
4. `cc_radar()` accesses `issue.references`, which now includes the see-also Bugzilla bugs.
5. `cc_radar()` picks `references[0]` (a see-also Bugzilla bug) and prompts to overwrite it with the radar.

Expected:
`cc_radar()` posts the `&lt;rdar://problem/N&gt;` comment on the newly created bug without prompting.

Actual:
`cc_radar()` prompts &quot;Would you like to overwrite &lt;see-also-bug-URL&gt; with &lt;radar-URL&gt;?&quot; and fails with &quot;EOF when reading a line&quot; in non-interactive contexts.

The `_see_also()` mock endpoint also has a fidelity gap: it does not include `related_links` (see-also URLs added via `tracker.set()`) in its response, unlike the full bug response endpoint. This prevents tests from exercising the see-also + cc_radar interaction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2203931</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-04-23 16:22:57 -0700</bug_when>
    <thetext>&lt;rdar://problem/175465077&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2203935</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2026-04-23 16:28:02 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/63481</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2205237</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-27 21:48:41 -0700</bug_when>
    <thetext>Committed 312172@main (00845d94ab4d): &lt;https://commits.webkit.org/312172@main&gt;

Reviewed commits have been landed. Closing PR #63481 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>