user315: In view of castling rights, an aspiring rules lawyer could ask: when does threefold repetition support a draw claim? Technical example:
[fen ""]
[title "Illustration of castling rights"]
[startply "13"]
[startflipped "0"]

1. e4 g6 2. b3 Bg7 3. g3 BxRa1 4. e5 b6 5. Na3 Bb7 6. Qg4 BxRh1 7. Nc4 Nc6 8. Kd1 Nb8 9. Ke1 Nc6 10. Kd1 Nb8 11. Ke1

The aspiring rules lawyer's question is not actually my question today. My questions today rather are these:

Has an arbiter ever expressed an opinion, given advice or issued a ruling regarding threefold repetition in view of castling rights?
Have competent persons in any chess federation ever discussed the matter?
Do parallel or otherwise related laws, opinions, advice, rulings or discussions by arbiters, federations or competent persons exist that indicate the principles by which such a case might be judged?

The three questions are related and answers to any or all of the three—or even partial answers to any of the three—would be read with interest. I seek insight into how chess authorities have approached (or would approach) such problems.
Related question here. Related answer here. FIDE's laws of chess here.
UPDATE
The excellent, concise, informative, well-researched answers of @BrianTowers and @TonyK, taken together, perfectly illustrate the reason the question has been asked. Both answers are recommended and, naturally, both have been upvoted by me. Ironically however, under the circumstance, neither answer can be accepted over the other, can it, for only the two answers together serve to illustrate the point.
Since the two answers so perfectly capture the two sides, my preference would be that further answers (if any) avoid taking sides but rather focus on the three items listed above.
ILLUSTRATION BY @REMELLION
Incidentally, before the question was asked, @Remillion had composed a problem position to illustrate a related point. He had originally meant the position as a joke but, since he has mentioned the position in comments in the present context, we can diagram it here.
[fen "B6N/1p1pp3/4pp1P/7P/7P/2p4P/1PPP2rr/R3K2k b - - 0 1"]
[title "By @Remellion: black to move; helpmate in 2"]
[startflipped ""]


user8201: 

Has an arbiter ever expressed an opinion, given advice or issued a ruling regarding threefold repetition in view of castling rights?"


Yes, Stewart Reuben, International Arbiter and Chair of the FIDE Rules Committee has presided over progressive rationalization of the FIDE rules, and is very aware of the general questions over castling and e.p. impact on threefold repetition. I don't know if he knows of the rook-capture lacuna.


Have competent persons in any chess federation ever discussed the matter?


Apart from FIDE, members of WFCC (World Federation of Chess Composition) have certainly discussed this issue. In Fairy Chess the general principle applies that a newly minted rook is assumed never to have moved. @Remellion's problem relies on this. The rook-capture lacuna is a slightly different point, stating that original castling rights remain rather than become re-established. 
Problemists also generally concur that a king can make a double hop "castling" if a rook was given as odds. I don't know if any would go as far to agree with @Brian Towers that this could happen in a non-odds composition, as it would interact pathologically with the problem convention that castling rights are assumed to be retained unless they can be proved to have been lost.


Do parallel or otherwise related laws, opinions, advice, rulings or discussions by arbiters, federations or competent persons exist that indicate the principles by which such a case might be judged?


EDIT: (thanks itub) I now have an idea what USCF opines, since their rules are now published uschess.org/content/view/7752/369. Draw by repetition is constrained by rights of castling and e.p. But the concept of "rights" is not defined in the movement rules. This is actually quite important since under FIDE, the interpretation is subtly different between castling and e.p. The paragraph which in FIDE laws contains the rook-capture hole does not appear in USCF.
(Sidebar: my initial impression of the USCF rules is quite positive. They seem fluently written, with some authorial personality (e.g. "Tournament Director Tips") and there's are some good ideas which are new to me (e.g. can only claim a draw at the beginning of your turn, any claim also implies an offer of a draw). However the first time we try to get a clear answer, about "rights" we are a little let down.)
So the FIDE rook-capture lacuna is surely just a hole, and it may be filled in the future. In the mean time, FIDE arbiters have discretion to interpret the rules using their judgement, as @TonyK stated.
In the mean time, as Brian surmised, at least one joke problem relies on specifically this point. Place both kings and two knights on an empty board so that with White to move there is a unique way to draw by repetition in 4.0 moves. (A.Buchanan, version Retros Mailing List 3/1/2019). Note that this relies on the aforementioned castling convention.

user15543: I have found a real game (link to chessgames.com) in which an arbiter denying a draw claim by threefold repetition due to the fact that Black had the right to castle in the first position.
What happened was that the position on the board was repeated three times, and Karpov was low on time. He announced to arbiter Geurt Gijsseh his intention to play 26. Nb5, thus claiming a draw by threefold repetition. While Miles agreed, resulting in a draw anyhow, the arbiter denied Karpov his claim, stating that Black had the right to castle in the first position.
I have found a detailed source in the issue Virginia News Chess, 2013-#5, “The bimonthly publication of the Virginia Chess Federation," on pages 16 and 17.
I will quote the entire story here, even if a little repetitive. However, the arbiter's name I mentioned earlier was pulled from the chessgames.com comments page on the game, so it may not be accurate.
“There are other possible sources of misunderstanding. Perhaps the most diabolical example is what happened in the game Karpov-Miles, Tilburg 1986. This was the position after Karpov moved 22 Nb5. Ra4 25 Nc3 Ra8 and now, just like my opponent Justin, Karpov summoned the arbiter, declared his intention to play 26 Nb5, and claimed a draw since the position would be the same as after his 22nd and 24th turns. Miles agreed and the game ended, but in fact Karpov’s claim was incorrect. Even though the position ‘looks the same’ (all pieces on the same squares) each time, the first
occurrence (the one in the diagram above) is actually a different position from the later two because Black still has the legal move22...0-0-0 as an option. He can no longer castle after that first ...Ra8-a3-a8 foray, so the potential for play is different later, and thus not the “same position” under the rules. This could have been a real tragedy for Karpov if Miles had disputed the claim. The rules in force at the time called for a three minute penalty off the clock of a player making an incorrect claim. Karpov had less than five minutes remaining to reach move 40, perhaps even less than three minutes. He might easily have time forfeited or even been declared to have forfeited straightaway.”
[Title "Anatoly Karpov-Anthony Miles, Interpolis 10th, Tilburg Netherlands, 11/4/198"]
[FEN ""]
[startply "42"]

1. d4 Nf6 2. c4 c5 3. d5 b5 4. cxb5 a6 5. e3 Bb7 6. Nc3 Qa5 7. Bd2 axb5 8. Bxb5 Qb6 9. Qb3 e6 10. e4 Nxe4 11. Nxe4 Bxd5 12. Qd3 Qb7 13. f3 c4 14. Bxc4 Bxc4 15. Qxc4 d5 16. Qc2 dxe4 17. Qxe4 Qxe4+ 18. fxe4 Nd7 19. Ne2 Nc5 20. Nc3 Nd3+ 21. Ke2 Nxb2 22. Nb5 Ra4 23. Nc3 Ra8 24. Nb5 Ra4 25. Nc3 Ra8 26. Nb5

Also, just for fun, here is a miniature version of @Remellion’s hilarious helpmate idea.
[Title "me, chessstackexchange.com, 9/6/2019, Helpmate In 2"]
[FEN "8/8/8/8/8/7p/rr6/k3K1B1 w - - 0 1"]
[startflipped ""]

Solution:

 1... h2 2. Bd4 h1=White Rook! 3. 0-0#!


user4418: This is dealt with explicitly in article 9.2.2 -

9.2.2 Positions are considered the same if and only if the same player has the move, pieces of the same kind and colour occupy the same
  squares and the possible moves of all the pieces of both players are
  the same. Thus positions are not the same if:
  9.2.2.1 at the start of the sequence a pawn could have been captured en passant
  9.2.2.2 a king had castling rights with a rook that has not been moved, but forfeited these after moving. The castling rights are lost
  only after the king or rook is moved.

Neither of white's rooks move hence castling rights are not affected until the king moves. 
In general provided white has not moved his king he may castle on the side on which a rook which has not moved has been captured. I believe there are even puzzles which rely on this for the solution.

user12189: This seems to be an omission in law 9.2.2.2:

9.2.2.2 a king had castling rights with a rook that has not been moved, but forfeited these after moving. The castling rights are lost only after the king or rook is moved.

It should read "The castling rights are lost only after the king or rook is moved, or the rook is captured." Indeed, that is how I hope an experienced arbiter would interpret it; the idea of having castling rights with non-existent rooks is absurd.

315: <p>In view of castling rights, an aspiring rules lawyer could ask: when does threefold repetition support a draw claim? Technical example:</p>
<pre><code>[fen &quot;&quot;]
[title &quot;Illustration of castling rights&quot;]
[startply &quot;13&quot;]
[startflipped &quot;0&quot;]

1. e4 g6 2. b3 Bg7 3. g3 BxRa1 4. e5 b6 5. Na3 Bb7 6. Qg4 BxRh1 7. Nc4 Nc6 8. Kd1 Nb8 9. Ke1 Nc6 10. Kd1 Nb8 11. Ke1
</code></pre>
<p>The aspiring rules lawyer's question is not actually my question today. My questions today rather are these:</p>
<ol>
<li>Has an arbiter ever expressed an opinion, given advice or issued a ruling regarding threefold repetition in view of castling rights?</li>
<li>Have competent persons in any chess federation ever discussed the matter?</li>
<li>Do parallel or otherwise related laws, opinions, advice, rulings or discussions by arbiters, federations or competent persons exist that indicate the principles by which such a case might be judged?</li>
</ol>
<p>The three questions are related and answers to any or all of the three—or even <em>partial</em> answers to any of the three—would be read with interest. I seek insight into how chess authorities have approached (or would approach) such problems.</p>
<p>Related question <a href="https://chess.stackexchange.com/q/6188/315">here.</a> Related answer <a href="https://chess.stackexchange.com/a/21317/315">here.</a> FIDE's laws of chess <a href="https://www.fide.com/fide/handbook.html?id=208&amp;view=article" rel="nofollow noreferrer">here.</a></p>
<p><strong>UPDATE</strong></p>
<p>The excellent, concise, informative, well-researched answers of <a href="https://chess.stackexchange.com/a/23926/315">@BrianTowers</a> and <a href="https://chess.stackexchange.com/a/23927/315">@TonyK,</a> taken together, perfectly illustrate the reason the question has been asked. Both answers are recommended and, naturally, both have been upvoted by me. Ironically however, under the circumstance, neither answer can be accepted over the other, can it, for only the two answers <em>together</em> serve to illustrate the point.</p>
<p>Since the two answers so perfectly capture the two sides, my preference would be that further answers (if any) avoid taking sides but rather focus on the three items listed above.</p>
<p><strong>ILLUSTRATION BY @REMELLION</strong></p>
<p>Incidentally, before the question was asked, @Remillion had composed a problem position to illustrate a related point. He had originally meant the position as a joke but, since he has mentioned the position in comments in the present context, we can diagram it here.</p>
<pre><code>[fen &quot;B6N/1p1pp3/4pp1P/7P/7P/2p4P/1PPP2rr/R3K2k b - - 0 1&quot;]
[title &quot;By @Remellion: black to move; helpmate in 2&quot;]
[startflipped &quot;&quot;]
</code></pre>
 8201: <blockquote>
  <ol>
  <li>Has an arbiter ever expressed an opinion, given advice or issued a ruling regarding threefold repetition in view of castling rights?"</li>
  </ol>
</blockquote>

<p>Yes, Stewart Reuben, International Arbiter and Chair of the FIDE Rules Committee has presided over progressive rationalization of the FIDE rules, and is very aware of the general questions over castling and e.p. impact on threefold repetition. I don't know if he knows of the rook-capture lacuna.</p>

<blockquote>
  <ol start="2">
  <li>Have competent persons in any chess federation ever discussed the matter?</li>
  </ol>
</blockquote>

<p>Apart from FIDE, members of WFCC (World Federation of Chess Composition) have certainly discussed this issue. In Fairy Chess the general principle applies that a newly minted rook is assumed never to have moved. @Remellion's problem relies on this. The rook-capture lacuna is a slightly different point, stating that original castling rights remain rather than become re-established. </p>

<p>Problemists also generally concur that a king can make a double hop "castling" if a rook was given as odds. I don't know if any would go as far to agree with @Brian Towers that this could happen in a non-odds composition, as it would interact pathologically with the problem convention that castling rights are assumed to be retained unless they can be proved to have been lost.</p>

<blockquote>
  <ol start="3">
  <li>Do parallel or otherwise related laws, opinions, advice, rulings or discussions by arbiters, federations or competent persons exist that indicate the principles by which such a case might be judged?</li>
  </ol>
</blockquote>

<p>EDIT: (thanks itub) I now have an idea what USCF opines, since their rules are now published uschess.org/content/view/7752/369. Draw by repetition is constrained by rights of castling and e.p. But the concept of "rights" is not defined in the movement rules. This is actually quite important since under FIDE, the interpretation is subtly different between castling and e.p. The paragraph which in FIDE laws contains the rook-capture hole does not appear in USCF.</p>

<p>(Sidebar: my initial impression of the USCF rules is quite positive. They seem fluently written, with some authorial personality (e.g. "Tournament Director Tips") and there's are some good ideas which are new to me (e.g. can only claim a draw at the beginning of your turn, any claim also implies an offer of a draw). However the first time we try to get a clear answer, about "rights" we are a little let down.)</p>

<p>So the FIDE rook-capture lacuna is surely just a hole, and it may be filled in the future. In the mean time, FIDE arbiters have discretion to interpret the rules using their judgement, as @TonyK stated.</p>

<p>In the mean time, as Brian surmised, at least one joke problem relies on specifically this point. Place both kings and two knights on an empty board so that with White to move there is a unique way to draw by repetition in 4.0 moves. (A.Buchanan, version Retros Mailing List 3/1/2019). Note that this relies on the aforementioned castling convention.</p>
 15543: <p>I have found a <a href="http://www.chessgames.com/perl/chessgame?gid=1068512" rel="nofollow noreferrer">real game</a> (link to chessgames.com) in which an arbiter denying a draw claim by threefold repetition due to the fact that Black had the right to castle in the first position.</p>
<p>What happened was that the position on the board was repeated three times, and Karpov was low on time. He announced to arbiter Geurt Gijsseh his intention to play 26. Nb5, thus claiming a draw by threefold repetition. While Miles agreed, resulting in a draw anyhow, the arbiter denied Karpov his claim, stating that Black had the right to castle in the first position.</p>
<p>I have found a detailed source in the issue <a href="http://vachess.org/news/2013-5.pdf" rel="nofollow noreferrer">Virginia News Chess, 2013-#5</a>, “The bimonthly publication of the Virginia Chess Federation,&quot; on pages 16 and 17.</p>
<p>I will quote the entire story here, even if a little repetitive. However, the arbiter's name I mentioned earlier was pulled from the chessgames.com comments page on the game, so it may not be accurate.</p>
<p>“There are other possible sources of misunderstanding. Perhaps the most diabolical example is what happened in the game Karpov-Miles, Tilburg 1986. This was the position after Karpov moved 22 Nb5. Ra4 25 Nc3 Ra8 and now, just like my opponent Justin, Karpov summoned the arbiter, declared his intention to play 26 Nb5, and claimed a draw since the position would be the same as after his 22nd and 24th turns. Miles agreed and the game ended, but in fact Karpov’s claim was incorrect. Even though the position ‘looks the same’ (all pieces on the same squares) each time, the first
occurrence (the one in the diagram above) is actually a different position from the later two because Black still has the legal move22...0-0-0 as an option. He can no longer castle after that first ...Ra8-a3-a8 foray, so the potential for play is different later, and thus not the “same position” under the rules. This could have been a real tragedy for Karpov if Miles had disputed the claim. The rules in force at the time called for a three minute penalty off the clock of a player making an incorrect claim. Karpov had less than five minutes remaining to reach move 40, perhaps even less than three minutes. He might easily have time forfeited or even been declared to have forfeited straightaway.”</p>
<pre><code>[Title &quot;Anatoly Karpov-Anthony Miles, Interpolis 10th, Tilburg Netherlands, 11/4/198&quot;]
[FEN &quot;&quot;]
[startply &quot;42&quot;]

1. d4 Nf6 2. c4 c5 3. d5 b5 4. cxb5 a6 5. e3 Bb7 6. Nc3 Qa5 7. Bd2 axb5 8. Bxb5 Qb6 9. Qb3 e6 10. e4 Nxe4 11. Nxe4 Bxd5 12. Qd3 Qb7 13. f3 c4 14. Bxc4 Bxc4 15. Qxc4 d5 16. Qc2 dxe4 17. Qxe4 Qxe4+ 18. fxe4 Nd7 19. Ne2 Nc5 20. Nc3 Nd3+ 21. Ke2 Nxb2 22. Nb5 Ra4 23. Nc3 Ra8 24. Nb5 Ra4 25. Nc3 Ra8 26. Nb5
</code></pre>
<p>Also, just for fun, here is a miniature version of @Remellion’s hilarious helpmate idea.</p>
<pre><code>[Title &quot;me, chessstackexchange.com, 9/6/2019, Helpmate In 2&quot;]
[FEN &quot;8/8/8/8/8/7p/rr6/k3K1B1 w - - 0 1&quot;]
[startflipped &quot;&quot;]
</code></pre>
<p>Solution:</p>
<blockquote class="spoiler">
<p> 1... h2 2. Bd4 h1=White Rook! 3. 0-0#!</p>
</blockquote>
 4418: <p>This is dealt with explicitly in article 9.2.2 -</p>

<blockquote>
  <p>9.2.2 Positions are considered the same if and only if the same player has the move, pieces of the same kind and colour occupy the same
  squares and the possible moves of all the pieces of both players are
  the same. Thus positions are not the same if:<br>
  9.2.2.1 at the start of the sequence a pawn could have been captured en passant<br>
  9.2.2.2 a king had castling rights with a rook that has not been moved, but forfeited these after moving. The castling rights are lost
  only after the king or rook is moved.</p>
</blockquote>

<p>Neither of white's rooks move hence castling rights are not affected until the king moves. </p>

<p>In general provided white has not moved his king he may castle on the side on which a rook which has not moved has been captured. I believe there are even puzzles which rely on this for the solution.</p>
 12189: <p>This seems to be an omission in law 9.2.2.2:</p>

<blockquote>
  <p>9.2.2.2 a king had castling rights with a rook that has not been moved, but forfeited these after moving. The castling rights are lost only after the king or rook is moved.</p>
</blockquote>

<p>It should read "The castling rights are lost only after the king or rook is moved, or the rook is captured." Indeed, that is how I hope an experienced arbiter would interpret it; the idea of having castling rights with non-existent rooks is absurd.</p>
