Repository navigation
chore(figures): stop on unexpected tugime-cli output lines instead of skipping them - #163
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
変換の精度(lattice)
before だけ正解 0 件 / after だけ正解 0 件 片方だけが正解した問題
|
… skipping them learned(figures): tugime-cli no longer prints engine logs to stdout in debug or release builds; the logs came from azooKey's debug(), which is no longer a dependency decision(figures): every non-empty stdout line must be a result line, so a change in the CLI output format stops the figure scripts instead of silently dropping lines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd split lines in one place decision(figures): one outputLines helper owns which lines may be skipped (only the trailing newline); the lattice numbers and every segment of --explain must parse, so a format change stops the scripts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt list in --explain Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d2e958c to
e0d5b87
Compare
…t and drop its subtitle decision(safety-figure): title it "打った文字は外へ送らず残さない"; the old title said typed text reaches only the input field, which the figure's own arrow to tugime contradicts rejected(safety-figure): a subtitle saying conversion uses no server; Microsoft IME and Simeji send text only in opt-in features and the macOS and Google inputs do not, so it reads as if other inputs send text Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…malformed --whole output says --whole decision(figures): readLive becomes readPerInput, which takes the option (--live or --whole) from every caller; check-doc-examples reads --whole with it too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the conversions rather than the display Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
目的
tugime-cli の出力の形式が変わったら、図のスクリプトが気づいて止まる状態にする。図のスクリプトは、変換エンジンのログが標準出力に混ざる前提で、結果の行に見えない行を黙って読み飛ばしていた。そのため、形式が変わって結果の行を読めなくなっても、図はそのまま作られていた。
あわせて、README の安全性の図のタイトルを、図の内容と食い違わない、使う人に通じる言葉にする。
出所: 対話での依頼(#160 のスコープ外「tugime-cli が変換エンジンのログを標準出力に混ぜないようにする」と、#161 のタイトルの指摘)。調べると、ログはもう標準出力に出ていなかった。
経緯
debug()変更内容
scripts/lib/svg.tsに、tugime-cli の標準出力を行に分けるoutputLinesを置いた。出力は改行で終わり、途中に空行を含まないことを確かめる。読み飛ばしてよい行(末尾の改行)の規則はここだけにある--live・--whole)の出力を読む部品を、readLiveからreadPerInput(option, stdout, inputs)に改めた。呼び出し元は読むオプションを渡し、崩れた出力ではそのオプションの名前を示して止まる。返す値の名前も、表示に限らないのでresultにしたreadPerInput・readExplains・readLatticesと、scripts/make-pipeline.tsのreadReadingはoutputLinesで行に分け、結果の行として読めない行が来たら、その行を示して止まるreadLatticesは、始まり・終わりが整数で、点が数の表記(-12.5、1e-05の形)であることも確かめるreadExplainsは区間の並びが空の行で止まり、parseSegmentsは区間の表記を残らず読めたか(読めた区間をつなぐと元の文字列に戻るか)を確かめるscripts/make-safety.ts、docs/images/safety.svg)のタイトルを「打った文字は外へ送らず残さない」にし、サブタイトルを消した。README の図の説明文(alt)の先頭も合わせた設計判断
Package.swiftの依存に azooKey は無く、ログを出すのは llama.cpp で、標準エラーに出る)合意事項
未合意の判断
なし
スコープ外
なし
完了条件
tugime-cli --live ok testgaotitanodeの標準出力が、結果の 2 行だけであるbun scripts/make-pipeline.ts・bun scripts/make-readme-figures.ts・bun scripts/make-demo.ts・bun scripts/make-safety.ts・bun scripts/make-hero.ts・bun scripts/check-doc-examples.tsが終了コード 0 で終わり、その後のgit status --shortに差分が無い検証
.build/debug/tugime-cli --live ok testgaotitanode 2>/dev/nullと、リリース版の同じ実行の標準出力は、どちらも結果の 2 行だけだったgit status --shortに差分は無かった--liveに結果でない行、読めない区間U[x→y 1]、点が-inf)はどれも、その内容を示して止まった(395bdfb で実施)確認事項
🤖 Generated with Claude Code