Repository navigation
docs: rewrite the README - #59
Conversation
Rewrite the README for people and agents who want to use texrun, and move the detailed reference out of it: the options, JSON schema, error and note kinds, exit codes and backend comparison go to docs/cli.md, and the engine image's publishing, verification and licenses go to docs/engine-image.md. Point the kind-list test and the references in the code and docs at the new files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Describe the host and container backends in SECURITY.md and align the in-scope and out-of-scope lists with docs/security.md §2, instead of the earlier description that predates the container backend. Co-Authored-By: Claude Opus 5.5 <[email protected]>
nishide-dev
left a comment
There was a problem hiding this comment.
Verdict: CHANGES_REQUESTED
README の構成(概要 → Why → Installation → Quick start → Backends → JSON / exit codes → Security → License)は初見の利用者に分かりやすく、長さも適切です。詳細を docs/cli.md / docs/engine-image.md に移した判断も良いと思います。直してほしい点は should-fix 1 件だけです。
確認したこと
- PR ブランチ(e533abd)を clone して
cargo check/fmt --check/clippy -D warnings/test(すべて--locked)を実行し、すべて通過(cli_docs_list_the_cli_error_kindsを含む)。gh pr checks 59もすべて pass。 texrun --help/texrun compile --help/--version(0.1.0)と比べ、docs/cli.md のオプション表・既定値・exit code 表・出力の説明は一致。Quick start の human 出力の形式(Failed to compile ... in ... (1 error, 0 warnings)、log:、PDF:、preview: ... (1 of 1 pages, mupdf))もhuman.rsの書式と一致。raw_excerptはtexrun_core::Diagnosticに実在。Docker 20.10 / Podman 4.0 の最低版はruntime.rsと一致。rust-version = "1.98"と「Rust 1.98 or newer」も一致。- README / SECURITY / CONTRIBUTING / docs/*.md の相対リンクと見出しアンカーはスクリプトで全件解決(0 件の不備)。
- 版数:
git grep '0\.1\.0' -- README.md docs/の 9 箇所はすべて 0.1.0 で、docs/development.md に挙げた箇所と一致。 - 情報の欠落: 旧 README の CLI・JSON・BibTeX・resource limit・error/note kind・exit code・backend 比較・rootless・engine image・ライセンス表・source の提供は docs/cli.md / docs/engine-image.md にすべてあります。開発関連(
--locked付きゲート、cargo-deny、cargo-nextest、docker composeの integration 実行、SKIPPED、Rust 1.98.1 の pin)は CONTRIBUTING.md / docs/development.md にあります。落ちたのは開発経緯(MVP architecture / scope / Non-goals、#13)で、これは意図どおりと理解しています(Non-goals については下の nit 4)。 - GPL / AGPL の source: README の License と docs/engine-image.md「Source code」で、同じ tag の GitHub release の asset(
texrun-engine-<version>-sources.tar)として提供すると書かれており、written offer の記述はありません。オーナー判断どおりです。 - SECURITY.md の In scope / Out of scope は docs/security.md §2(保証する 1〜5、sandbox backend で追加で保証する 1〜6、保証しない)と矛盾しません。host では「process-tree limits without a delegated cgroup」を out of scope に挙げているので、in scope の「escaping ... the size and resource limits」とも整合しています。
should-fix
1. README「Security」: host backend で memory とプロセス数の上限を常に掛けているように読める
It disables shell escape, ..., passes a minimal environment, and enforces a timeout and limits on output size, CPU time, memory and processes.
docs/security.md §3.10 / §2「保証しない」では、委譲された cgroup が無い host backend(macOS、通常の Linux 端末 session、Docker コンテナの中など、つまり多くの環境)では、プロセス数の上限は無く、memory はプロセスごとの RLIMIT_AS(Linux のみ。macOS では無し)だけです。直後の「these measures do not make a complete sandbox」だけでは、この差は読み取れません。旧 README は「a timeout and output limits」で、この PR で保証の範囲が広がって見えるようになっています。SECURITY.md が README と同じ文言を in scope の根拠に読まれる可能性もあるので、直しておきたいです。修正案:
It disables shell escape, runs latexmk with its own configuration instead of any
latexmkrcin the project, restricts TeX's file access to the workspace where kpathsea allows it, passes a minimal environment, and enforces a timeout and limits on output size and CPU time. Memory and process limits for the whole compile need the container backend, or a delegated cgroup on Linux (--cgroup).
nit
-
冒頭の 1 文目と 2 文目: 「compiles and inspects」の inspect に当たるコマンドは無く、2 文目の列挙も「the PDF and PNG previews of its pages, as text or ...」の切れ目が読みにくいです。案:
texrun compiles TeX documents through a safe, predictable command-line interface. It is built as much for AI agents and automated pipelines as for people: instead of a long latexmk log, you get structured diagnostics, the PDF, and PNG previews of its pages, either as readable text or as a single JSON document.
-
「also when」→「even when」: 「
--jsonprints exactly one JSON document on stdout, also when the compile fails」は英語として不自然です。案: 「..., even when the compile fails or texrun itself hits an error.」 docs/cli.md の「also on compile failure, timeout and runtime errors」も「even on compile failure, ...」に。 -
Why texrun の「Isolation.」: 既定の host backend は完全な sandbox ではないので、見出しが強めです。「Safe defaults.」などにし、2 文目を「The container backend adds OS-level isolation with no network access.」とすると Backends 節の説明と揃います。
-
Installation の言い回し: 「Then install what the backend you use needs:」→「Then install the tools for the backend you plan to use:」。「the engine image of your texrun version」→「the engine image that matches your texrun version」。また、旧 Non-goals のうち利用者に関係する「compile 中にパッケージを自動でインストールしない」は、Installation の Host backend の項に「texrun does not install missing LaTeX packages; install them with TeX Live (for example,
tlmgr).」のように 1 文あると親切です(任意)。 -
「a container of the engine image」: README / docs/cli.md / SECURITY.md で繰り返される表現ですが、英語では「a container built from the engine image」または「a container running the engine image」の方が自然です。
-
Backends の「on a read-only filesystem」: output directory と
/tmpは書けるので、「with a read-only root filesystem」の方が正確です。 -
Platform support 節: 1 文だけで、冒頭の note と重複しています。Installation の冒頭に「texrun runs on Linux and macOS; Windows is not supported.」として節を減らしてもよいと思います。
-
SECURITY.md の Out of scope: host の例は列挙していますが、container の「保証しない」(workspace と output dir は container から読み書きできる、preview の tool の run 同士は分離しない、プロセス数の上限の報告は侵害された engine が偽れる)は列挙が無いので、「For
--backend container, these include the workspace and output directory being readable and writable from inside the container, the lack of isolation between preview tool runs, and the reliability of the process-limit report.」を足すと対称になります。 -
リリース前の Installation: PR 本文のとおり、
--tag v0.1.0とdocker pull ...:0.1.0は tag を打つまで失敗します。merge の直後に v0.1.0 を release する予定なら、このままでよいと思います。
State the host backend's limits precisely (memory and process limits need the container backend or a delegated cgroup), reword the introduction and several phrases, fold platform support into Installation, note that texrun does not install LaTeX packages, and list the container backend's non-guarantees in SECURITY.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
nishide-dev
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
5467e0c の再レビューです。前回の should-fix 1 件と nit 1〜8 はすべて対応済みで、新たな must-fix / should-fix はありません。
確認したこと
- should-fix 1(Security 節の limits): 「limits on output size and CPU time. Memory and process limits for the whole compile need the container backend, or a delegated cgroup on Linux (
--cgroup).」になりました。docs/security.md §3.10 / §2 と一致し、保証を広く読ませる表現はなくなっています。 - nit 1〜7: 冒頭 2 文、
even when/even on、「Safe defaults.」、Installation の言い回しとtlmgrの 1 文、container built from the engine image(README / SECURITY.md / docs/cli.md / docs/engine-image.md のすべての箇所)、with a read-only root filesystem、Platform support の Installation への統合を確認しました。英語として自然で、正確さも問題ありません。 - nit 8(SECURITY.md): 「the workspace being readable and the output directory writable from inside the container, the lack of isolation between preview tool runs, and the reliability of the process-limit report」は、docs/security.md §2「sandbox backend でも保証しないもの」(入力は read-only で output dir だけ書ける、preview の run 同士の分離、
pids.maxの報告の確かさ)と一致しています。 - リンク: 削除した
#platform-supportを参照している箇所はありません。相対リンクと見出しアンカーは再確認でも全件解決しました。 - テストと CI: 変更は docs だけです。
cli_docs_list_the_cli_error_kindsを再実行して通過しました。gh pr checks 59もすべて pass です(release / publish は skipping)。
nit(任意。merge を妨げません)
- docs/cli.md の exit code 表の 1 行目「also when a resource limit stopped it」は、ほかの箇所に合わせるなら「including when a resource limit stopped it」が自然です(
--helpも "including when" です)。 - 冒頭の「the PDF, and PNG previews」だけ Oxford comma が付いていて、文書のほかの列挙(例: 「a timeout and resource limits」)と揃っていません。ここは「the PDF」と「PNG previews」の区切りを明確にする意図でしょうから、このままでも構いません。
- docs/engine-image.md の 4 行目が 80 桁を少し超えています(折り返しを揃えるだけです)。
## 概要 `an_oom_kill_is_recorded` が CI で不安定だった原因は、Docker(28.0.4、cgroup v2)が containerd の OOM event を落とし、実際の OOM kill の一部で `State.OOMKilled` を**記録しないまま**にすることでした(遅れて記録されるのではない)。待ち時間を延ばしても直らないので、OOM の判定を cgroup の `oom_kill` カウンタ(kernel が `SIGKILL` の前に数える)に寄せ、カウンタを報告する shell が OOM killer に選ばれないようにしました。 ## 原因の調査 - PR #59 の失敗 2 件(`sandbox`、engine-image の `verify (amd64)`)はどちらも、Docker 専用の 1 つ目の assert(報告なしの container で `outcome().oom_killed`)が落ちていた。exit 137、`elapsed` は 0.3〜0.4 s で、1 秒の読み直しの後も `OOMKilled` は false。なお、同じ run の `verify (arm64)` は fail-fast で cancel されたもので、OOM の失敗ではない(engine-image の arm64 で過去に落ちた 37148641949 は別の test)。 - 一時的な診断 workflow(GitHub の runner、4 並列、CPU 負荷あり、container 240 個 / arch)で、exit 直後・1 秒後・5 秒後の `OOMKilled` と、container の中の cgroup `memory.events` の `oom_kill` を読んだ: - `OOMKilled` が記録されなかった kill: amd64 で 12/240(約 5 %)、arm64 で 23/240(約 10 %)。main process が kill された場合でも、子プロセスが kill されて main が後で終わった場合でも起きた。 - 遅れて記録されたことは一度もない(exit 直後に false なら 5 秒後も false)。→ 既存の「最大 1 秒読み直す」では救えない。containerd/containerd#8893(TaskOOM event lost)と同じ現象。 - cgroup の `oom_kill` は、それを読む shell が生き残った場合は毎回 1。 - ローカル(OrbStack、Docker 29.4)では 30 回 × 負荷ありでも再現しなかった。 - 報告方式(`report_pids`)に寄せた test を CI の負荷下で回したところ、arm64 で 48 回中 1 回、報告する shell 自体が kill されて報告行が出なかった(stderr が空、exit 137)。OOM kill で解放されないメモリが残り、kernel が次の候補として小さな shell を選ぶことがあるため。 ## 変更内容 - `REPORT_PIDS`(compile の container の main process): command に `oom_score_adj` = 1000 を付けて起動する(上げるのに権限は不要)。OOM killer は command のプロセスを全て先に選ぶので、`oom_kill` を報告する shell が残る。 - `Session::oom_killed`(preview): Podman だけでなく Docker でも、cgroup の `oom_kill` を `exec` で読んで判定する。読めない場合だけ runtime の記録に戻る。Docker の場合も「前回の問い合わせ以降の kill だけ」になり、セッション全体で `OOMKilled` が立ちっぱなしになって、後の別理由の kill を OOM と誤認することもなくなる。 - `ContainerOutcome::oom_killed` と `inspect_after_exit` の doc: runtime の記録だけでは取りこぼすこと、確かな判定は `report_pids` の報告によることを明記(「main 以外の kill は記録されている(実測)」という記述は CI の実測と合わないので削除)。 - test: - `an_oom_kill_is_recorded`: 報告なしの container は exit 137 だけを確かめる(runtime の記録は損失するので assert しない)。報告ありの container で OOM を 3 回起こし、両 runtime で毎回 `oom_killed` になることを確かめる(runtime 別の分岐を削除)。 - `an_oom_kill_in_a_session_is_recorded`: 待たずに直後の 1 回で `Some(true)`、次の問い合わせは `Some(false)`、OOM でない `SIGKILL` の run の後も `Some(false)` を確かめる。 - 新規 `the_oom_killer_takes_the_command_before_the_reporting_shell`: command の `oom_score_adj` が 1000、報告する shell はそれ未満。 - docs/security.md: OOM の判定(§2 の制約、§3 の memory 上限、§4 の runtime の違い・`inspect_after_exit`・preview)を最小限更新。 - docs/cli.md: exit code 表の 1 行目「also when」→「including when」(PR #59 の後の 1 語修正)。 ## 確認方法 - [x] `cargo check --workspace --all-targets --all-features --locked` - [x] `cargo fmt --all -- --check` - [x] `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` - [x] `cargo test --workspace --all-features --locked` - [x] `cargo deny --locked check` - [x] ローカル(macOS + OrbStack、Docker 29.4、CPU 負荷 container あり): OOM の 3 test を 35 回反復で全て pass、container test 一式を 3 回で全て pass。 - [x] CI の負荷下の反復(一時的な診断 workflow、ブランチの push だけで実行し、この PR からは削除済み): `an_oom_kill*` を 4 並列 × 15 回 × 2 run(amd64・arm64 各 120 回、報告ありの OOM kill が各 360 回)で全て pass、`texrun-sandbox` の container test 一式も各 arch 10 回全て pass。修正前(`oom_score_adj` なし)は arm64 で 48 回中 1 回失敗していた。 - [x] CI: `sandbox`(3 回: 初回と re-run 2 回)・`sandbox (podman)`(2 回)が green。engine-image は PR の path filter で走らないので、このブランチで workflow_dispatch(publish なし)を実行し、`verify (amd64)`・`verify (arm64)`・`build (dry run)`・`sources` が green(run 37166797294)。 ## 関連 Issue Closes #60 ## 補足 - 報告なしの `Container` の `oom_killed` は runtime の記録だけなので、Docker では数 % 取りこぼす。本番で OOM を判定する compile の container は `report_pids` を使うので影響しない。報告する shell 自体が kill された場合(`oom_score_adj` で command より後になるので、command が全て消えてもなお足りない場合だけ)は報告できず、runtime の記録も無ければ signal による終了として報告される。 - preview の session の main process(`sleep`)には `oom_score_adj` を付けていない(exec の run に同じ問題があるかは未確認)。必要なら別 Issue にする。 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
## 概要 `v*` の tag を push するだけで、検証 → engine image の公開 → **release notes 付き** の GitHub release の作成(source tar 添付)まで完了するようにする。release notes は前の版の tag から今回の tag までの commit(= squash merge した PR タイトル、Conventional Commits)を git-cliff で分類して生成し、インストール方法・image の tag / digest・`gh attestation verify`・source tar の説明を定型で付ける。既存 release の notes だけを作り直す workflow も追加する(v0.1.0 の notes を埋めるのに使う)。 ## 変更内容 - `cliff.toml`(新規): git-cliff の設定。type で分類(`feat` → Features / `fix` → Bug fixes / `perf` → Performance / `docs` → Documentation / `refactor`・`test`・`build`・`chore` → Other changes)。`chore(deps)` は Dependencies に「N dependency updates: #a, #b」の 1 行にまとめる(PR 番号はタイトル行の末尾の `(#N)` だけから取る。番号の無いものは件数にだけ数える)。`!` / `BREAKING CHANGE:` は Breaking changes にも載せる。Conventional でない commit も Other changes に残す。**すべての行は commit のタイトル(1 行目 = PR タイトル)だけから作り**、PR 本文や footer の文面は載せない。末尾の `(#N)` を PR へのリンクにし、`@name` は mention にならないよう code にし、前の版との compare リンクを付ける。 - `.github/scripts/release-notes-test.sh` / `release-notes-test.expected.md`(新規): 使い捨ての repository に main の squash merge と同じ形の fixture の commit(PR 本文付き、実際の Dependabot 形式の本文付き(単独・group)、PR 番号の無い `chore(deps)`、日本語の `BREAKING CHANGE:` footer + attribution、GitHub の Revert、`@name` を含むタイトル)を作り、notes の「What's changed」を期待値と比べる。PR の `notes` job で毎回実行する。 - `.github/scripts/release-notes.sh`(新規): `release-notes.sh <tag> [<digest>]` で notes の Markdown を出力する。 - 安定版は前の安定版から(間の prerelease を畳み込む: `--ignore-tags '^v.*-'`)、prerelease は直前の tag から、最初の版は全履歴。git-cliff の `--context` から対象 tag の release だけを選んで `--from-context` で描画するので、HEAD が tag より先(main)でも同じ notes になる。 - tag がまだ無い場合は「最後の tag 〜 HEAD」をその版としてプレビューする。digest を省略すると placeholder。 - tag が HEAD の祖先でない、semver でない、digest の形式が違う、対象の commit が無い、などはエラー。 - `.github/workflows/engine-image.yml` - `publish` が `digest` を output する。 - `release` が checkout(`fetch-depth: 0`)→ git-cliff(`taiki-e/install-action` を SHA pin、`[email protected]`。install-action が checksum を検証)→ notes 生成(job summary にも出す)→ release の作成(`--notes-file`。版に `-` があれば prerelease にする既存の扱いを維持)。 - release が既にある場合(手で作った / 再実行)は、notes を生成したもので **上書き** してから asset を upload する。 - `.github/workflows/release-notes.yml`(新規): notes の生成だけを行う workflow。image の公開・release の作成はしない。 - `pull_request`(`cliff.toml`・script・この workflow の変更時): fixture の test の後、PR の head commit(merge ref ではなく。`Merge … into …` の行が入らない)で、最後の tag(現状 v0.1.0、全履歴)の notes と、次の版(patch + 1)としての「最後の tag 以降」の notes を job summary と artifact `release-notes` に出す。digest は GHCR から引く(未公開の版は placeholder)。 - `workflow_dispatch`(`tag`、`update`): `update=false`(既定)は dry run。`update=true` は `gh release edit --notes-file` で既存 release の notes を置き換える(main か tag 上の実行のみ。image が GHCR に無い版は失敗)。 - 権限: 生成する `notes` job は `contents: read`。書き込む `update` job だけが `contents: write` で、repository の code は実行しない(artifact を受け取って `gh release edit` するだけ)。 - docs - `docs/development.md`: release 手順を「tag を push するだけ」に更新し、「release notes」節(分類の規則、notes の文面は PR タイトルで決まること、ローカルでの生成方法、作り直し方)を追加。 - `CONTRIBUTING.md`: PR タイトルが release notes の 1 行になること、type / description の書き方の注意、notes の PR check を追記。 - `docs/security.md`(権限の記述)、`docs/engine-image.md`(digest は release notes に載る)を追随。 ## 設計判断 - **git-cliff を採用**(GitHub の自動生成 + `.github/release.yml` ではなく): この repo は PR にラベルを付けない運用で、GitHub の自動生成はラベルでしか分類できない。git-cliff は commit の type で分類でき、PR タイトル = commit タイトルの運用にそのまま合う。API を使わず(`--offline`)git の履歴だけで決まるので、PR 上やローカルでも同じ結果を再現できる。 - **既存 release の notes は上書き**: notes は git の履歴と公開済みの digest から決定的に作られるので、再実行で上書きしても結果は同じ。手で先に release を作った場合も、生成した notes に揃える(docs に明記。公開後の手修正は、作り直すと消える)。 - **CHANGELOG.md は置かない**: tag ごとに CHANGELOG 更新の commit / PR が必要になり、運用が増えるため。GitHub release を changelog とし、必要なら同じ `cliff.toml` から `git cliff` でいつでも全履歴を出せる。 - **notes の作り直しは別 workflow**: engine-image.yml の `workflow_dispatch` は image の公開と結び付いているので、notes だけの経路を分けた。image は再公開せず、digest は GHCR にある既存の版から引く。 - **notes の生成は image の公開後**: digest が要るため `release` job で生成する。設定の誤りは PR 上の `Release notes / notes` で先に検出する。万一 `release` で失敗しても image は公開済みで、`gh run rerun --failed` でやり直せる(既存の手順どおり)。 - **git-cliff の版**: `2.14.2` を両 workflow で固定(install-action の manifest の sha256 で検証)。install-action 自体は SHA pin で、Dependabot の対象。 ## 確認方法 - [x] `actionlint`(全 workflow)、`shellcheck .github/scripts/release-notes.sh` - [x] ローカルで git-cliff 2.14.2(公式 release の tar を sha512 で確認)を使って生成 - `release-notes.sh v0.1.0 sha256:b611…` → 下記(v0.1.0 までの全履歴、32 commit) - `release-notes.sh v0.1.1` → v0.1.0 以降の差分(この PR の commit のみ)のプレビュー - 使い捨ての clone で `v0.2.0-rc.1` / `v0.2.0-rc.2` / `v0.2.0` を打って確認: rc.2 は rc.1 からの差分、v0.2.0 は v0.1.0 からの全部(rc の分を畳み込む)。tag が HEAD の祖先でない場合・semver でない tag・不正な digest はエラーになる - `release-notes-test.sh`: 期待値どおり(下記)。修正前の `cliff.toml` に戻して実行すると、Dependabot の行が `3 dependency updates (Dependabot):,,` に、Breaking changes が日本語の footer + `🤖 Generated with …` に、Revert の行が本文付きに、`@octocat` が mention になり、test が失敗することを確認した - レビュー対応の後も v0.1.0 の notes は変わらない(前回の出力と diff なし) - [x] `CONTRIBUTING.md` / `docs/development.md`: タイトルだけが載ること、`@name` を書かないこと、`jq` が要ること、`update` は通常 `--ref main` で実行すること(v0.1.0 の tag の上には workflow が無い)、fixture の test を追記 - [x] PR 上の `Release notes / notes` が、v0.1.0 と v0.1.1(プレビュー)の notes を job summary と artifact に出す(GHCR から v0.1.0 の digest を引く) - `workflow_dispatch` の dry run は、新規 workflow が default branch に入るまで dispatch できないため、merge 後に `gh workflow run release-notes.yml --ref main -f tag=v0.1.0` で確認する(PR 上の `pull_request` の実行が同じ生成を行う) - tag の push・release の作成 / 編集・publish を有効にした実行はしていない - Rust のコードは変更していない(cargo の品質ゲートは CI で確認) ### 生成例: v0.1.0(digest は GHCR の実際の値) <details> <summary>v0.1.0 の notes(全文)</summary> ````markdown ## What's changed ### Features - **core**: Define compile domain model and engine interface ([#20](#20)) - **workspace**: Add isolated compile workspaces ([#21](#21)) - **diagnostics**: Parse LaTeX logs into structured diagnostics ([#23](#23)) - **texlive**: Add latexmk engine ([#30](#30)) - **preview**: Render PDF pages to PNG previews ([#31](#31)) - **cli**: Add compile command ([#34](#34)) - **workspace**: Exclude nested output directories by path ([#38](#38)) - **diagnostics**: Locate missing packages and fold fatal errors ([#40](#40)) - **diagnostics**: Report BibTeX failures ([#42](#42)) - **process**: Apply resource limits before exec through a gate ([#44](#44)) - **process**: Limit CPU, memory and process count ([#45](#45)) - **sandbox**: Add a container backend for the TeX engine ([#50](#50)) - **sandbox**: Render previews inside the container ([#52](#52)) - **sandbox**: Reclaim containers left by killed runs and report the process limit ([#53](#53)) - **sandbox**: Reclaim leftovers from a previous boot ([#58](#58)) ### Bug fixes - **workspace**: Refine exclusion and collection edge cases ([#29](#29)) - **texlive**: Restore the build after #39 and #40 ([#43](#43)) - **sandbox**: Accept engine images without labels ([#55](#55)) - **sandbox**: Support rootless Podman and refuse rootless Docker ([#57](#57)) - **sandbox**: Detect OOM kills reliably on Docker ([#61](#61)) ### Documentation - Add contribution guidelines and MIT license ([#15](#15)) - Add initial README ([#18](#18)) - **security**: Define the MVP security model and execution limits ([#22](#22)) - Update README to reflect the completed MVP ([#37](#37)) - Rewrite the README ([#59](#59)) ### Other changes - Initialize repository - Bootstrap Rust workspace and toolchain ([#16](#16)) - **ci**: Add quality gates and dependency checks ([#19](#19)) - **docker**: Add TeX Live development environment ([#17](#17)) - Add TeX Live integration fixtures and CI job ([#33](#33)) - **process**: Extract shared subprocess execution ([#39](#39)) - **ci**: Publish the engine image to GHCR ([#51](#51)) ## Install ```bash cargo install --locked --git https://github.com/nishide-dev/texrun --tag v0.1.0 texrun ``` See the [README](https://github.com/nishide-dev/texrun/blob/v0.1.0/README.md#installation) for the requirements and the tools each backend needs. ## Engine image The container backend (`--backend container`) runs TeX in the engine image of this version, `ghcr.io/nishide-dev/texrun-engine:0.1.0` (linux/amd64, linux/arm64). texrun never pulls it; pull it once: ```bash docker pull ghcr.io/nishide-dev/texrun-engine:0.1.0 ``` Published versions are never overwritten. To use exactly this image, pin its digest: ```bash docker pull ghcr.io/nishide-dev/texrun-engine@sha256:b611748f16d50c00982da2e52b51939d50167bebbc22b35ab8741d1c39e00d1b texrun compile --backend container --container-image ghcr.io/nishide-dev/texrun-engine@sha256:b611748f16d50c00982da2e52b51939d50167bebbc22b35ab8741d1c39e00d1b main.tex ``` The image has an SBOM, SLSA provenance and a signed GitHub artifact attestation: ```bash gh attestation verify oci://ghcr.io/nishide-dev/texrun-engine:0.1.0 -R nishide-dev/texrun ``` ## Source of the engine image `texrun-engine-0.1.0-sources.tar` (below) has the Debian source packages (`.dsc`, `.orig.tar.*`, `.debian.tar.*`) of every package in the image, for both platforms, at exactly the installed versions (`packages.txt` and `SHA256SUMS` inside): the corresponding source of its GPL / AGPL programs. See [docs/engine-image.md](https://github.com/nishide-dev/texrun/blob/v0.1.0/docs/engine-image.md#licenses). ```` </details> ### 生成例: v0.1.0 以降の main の差分(次の版のプレビュー) ````markdown ## What's changed ### Bug fixes - **ci**: Build release notes lines from commit titles only ### Other changes - **ci**: Generate release notes from conventional commits - **ci**: Write release notes on tag push and add a notes-only workflow **Full diff**: [v0.1.0...v0.1.1](v0.1.0...v0.1.1) ```` (以下の Install / Engine image / Source は v0.1.0 と同じ形で、digest は placeholder。squash merge 後は 1 commit になる) ### 生成例: fixture(`release-notes-test.expected.md`) ````markdown ## What's changed ### Breaking changes - **cli**: Rename --json flag to --format json ([#4](#4)) ### Features - **cli**: Rename --json flag to --format json ([#4](#4)) ### Bug fixes - **diagnostics**: Report the error `@octocat` found ([#7](#7)) ### Other changes - Revert "fix(core): handle empty logs ([#5](#5))" ([#6](#6)) ### Dependencies - 3 dependency updates: [#2](#2), [#3](#3) **Full diff**: [v0.1.0...v0.2.0](v0.1.0...v0.2.0) ```` ## 補足 - merge 後、v0.1.0 の notes を埋めるには: `gh workflow run release-notes.yml --ref main -f tag=v0.1.0`(dry run、summary で確認)の後に `gh workflow run release-notes.yml --ref main -f tag=v0.1.0 -f update=true`。 - notes の文面は PR タイトルで決まる。merge 後に誤りに気付いた場合は release を手で編集できるが、作り直すと消える。 - 推奨(任意): `release-notes.yml` の `update` job にも、engine-image.yml と同様に `environment` を付けることを検討できる(docs/security.md の「release の入口」)。 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
概要
README が開発経緯の節(Goal / MVP architecture / MVP scope / Non-goals)や詳細な仕様で散らかっていたため、texrun を使いたい人(人間・AI エージェントを動かす開発者)向けの自然な英語の README に書き直します。詳細な仕様は失わずに docs/ の新しい文書へ移しました。
変更内容
README.mdを書き直し: 概要とステータス → Why texrun → Installation → Quick start(human 出力と--jsonの実例)→ Backends(信頼できない文書には--backend container)→ JSON output and exit codes(要点のみ)→ Security → Development → License(対応 OS は Installation に記載)。日本語概要、MVP 等の開発経緯の言葉、Issue 番号を削除し、版は 0.1.0 に統一。docs/cli.md(新規): README から移したオプション表、workspace の規則、preview(MuPDF / Poppler のライセンス注記を含む)、human / JSON 出力、JSON 文書の全体(実装にあるraw_excerptも追記)、diagnostics・BibTeX・resource limit、error.stage/error.kind/notes[].kindの一覧、exit code 表、backend 比較表と container runtime の注意。docs/engine-image.md(新規): engine image の公開・pull・自前 build、digest での pin とengine.version、attestation の検証、ライセンス表、対応するソースを release asset(texrun-engine-<version>-sources.tar)として提供する旨、dev image の注記。apps/texrun/src/report.rs: kind 一覧の同期 test をdocs/cli.mdを見るように変更(cli_docs_list_the_cli_error_kinds)し、コメントも更新。main.rsのコメントも同様。docs/security.md、docker/engine/Dockerfile、.github/scripts/fetch-engine-sources.shの README への参照を新しい文書へ付け替え。SECURITY.md: Scope を現状に合わせて書き直し(host / container backend の違い、docs/security.md §2 と一致する In scope / Out of scope。container runtime・OCI runtime・kernel の脆弱性による脱出は対象外)。Supported versions の「リリースなし」の記述と日本語の一文も英語に整理。docs/development.mdのリリース手順に、版を更新する箇所(README と docs/engine-image.md)と確認用の grep コマンドを明記。確認方法
cargo check --workspace --all-targets --all-features --lockedcargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --all-features --locked--backend container)で実際にtexrun compileを実行した結果から作成。補足
v0.1.0の tag はまだ無いため、Installation のcargo install ... --tag v0.1.0とdocker pull ...:0.1.0は release 後に有効になります。🤖 Generated with Claude Code