Skip to content

chore(ci): add quality gates and dependency checks - #19

Merged
nishide-dev merged 3 commits into
mainfrom
chore/ci-quality-gates
Sep 30, 2026
Merged

nishide-dev merged 3 commits into
mainfrom
chore/ci-quality-gates

Conversation

@nishide-dev

@nishide-dev nishide-dev commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

概要

#11 のうち、TeX Live を必要としない品質ゲートを GitHub Actions に導入します。fmt / check / clippy / test(Linux・macOS)/ cargo-deny、PR title の Conventional Commits 検証、Dependabot を追加し、CONTRIBUTING.md のローカル品質ゲートと CI の基準を一致させます。TeX Live integration job は #10 / #14 が揃ってから後続 PR で追加します。

変更内容

  • .github/workflows/ci.yml(pull_request / push: main / 週次 schedule / workflow_dispatch。週次 schedule では deny だけを実行)
    • fmt: cargo fmt --all -- --check
    • check: cargo check --workspace --all-targets --all-features --locked
    • clippy: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
    • test (linux) / test (macos): cargo nextest run --workspace --all-features --locked (--no-tests=fail)と、nextest が扱わない doctest 用の cargo test --doc
    • deny: cargo deny --locked check
    • ci-success: 上記すべての成功を確認する集約 job(branch protection 用)
    • toolchain は rustup toolchain install で rust-toolchain.toml(1.98.1)に従う。外部の toolchain action は使わない
    • cache は Swatinem/rust-cache。cache の汚染と容量消費を避けるため、保存は main のときだけ(save-if)
    • concurrency で取り消すのは同じ PR の古い実行だけ。main への push と schedule の実行は取り消さない。permissions: contents: read のみ
  • .github/workflows/pr-title.yml
    • amannn/action-semantic-pull-request で PR title を検証
    • type は CONTRIBUTING の feat / fix / docs / test / refactor / perf / chore / build に限定
    • scope は任意で、値は制限しない(CONTRIBUTING の scope 表は候補の位置づけのため)
    • description は小文字で始まり、末尾にピリオドを付けない
    • permissions: pull-requests: read のみ
  • deny.toml
    • advisories: 脆弱性・unmaintained・yanked を検出する
    • licenses: MIT と両立する permissive ライセンスだけを許可する(MIT / Apache-2.0 / Apache-2.0 WITH LLVM-exception / BSD-2/3-Clause / ISC / Unicode-3.0 / Zlib)
    • bans: wildcard 依存は deny。重複バージョンは warn(下記の判断点を参照)
    • sources: crates.io 以外の registry と git 依存は deny
  • CONTRIBUTING.md / README.md
    • CONTRIBUTING の「自動検証について」を、実装した check(ci-success / pr-title / nextest / deny)と Dependabot の運用に合わせて更新
    • ローカル品質ゲートに cargo deny check と nextest の説明を追記。README にも同じ内容を追記
    • CI は --locked で実行するので Cargo.lock の commit が必要なこと、CI と同じ条件で確認したい場合は --locked を付けることを追記
  • .github/dependabot.yml
    • cargo と github-actions を週次で更新する
    • commit-message.prefix / prefix-development を chore(deps) にし、dev-dependency の更新も chore(deps): ... にする(include: scope では dev-dependency の更新が chore(deps-dev) になるため)
    • cargo の minor/patch と actions はそれぞれ group にまとめ、PR 数を抑える

確認方法

  • actionlint(v1.7.12)で指摘なし
  • cargo deny --locked check → advisories ok, bans ok, licenses ok, sources ok
  • cargo check --workspace --all-targets --all-features
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace
  • cargo nextest run --workspace --all-features --locked(2 tests passed)
  • この PR 上で CI と PR title の各 check が green になることを確認

関連 Issue

Refs #11

補足

判断点

  • Action の pin 方式: SHA で pin し、# vX.Y.Z コメントを付けました。third-party action(rust-cache / install-action / semantic-pull-request)のタグが書き換えられるリスクを避けるためです。Dependabot(github-actions)は SHA pin とコメントをまとめて更新できるので、保守コストは major tag pin と変わりません。
  • cargo-deny / cargo-nextest の導入方法: cargo-deny-action は Docker コンテナの中で動くため、rust-toolchain.toml の toolchain と噛み合わせにくくなります。そこで taiki-e/install-action で prebuilt binary を入れ、runner 上で直接実行しています。バージョンは [email protected] / [email protected] で minor まで固定しました。
  • macOS test job: Bootstrap the Rust workspace and development toolchain #2 で MVP の対象が Linux / macOS と決まっているので入れました。public repository のため macOS runner は無料です。process group などの Unix 固有の挙動が OS で違う可能性を早めに検出できます。fmt / clippy / deny は OS に依存しないため Linux だけで実行します。
  • 重複バージョン: 現時点で重複はありません。ただ、windows-sys のように推移的な重複は避けにくく、deny にすると Dependabot PR が頻繁に止まるので warn にしました。重複は CI log で確認できます。
  • ci-success 集約 job: required check をこの 1 つにしておけば、job や matrix を追加・変更しても branch protection を変更せずに済みます。
  • PR title workflow の trigger: pull_request_target ではなく pull_request を使っています。PR の code を checkout しないので、どちらでも安全ではあります。pull_request を選んだのは、この PR 自身でも検証が走ることと、fork からの PR でも title の読み取りだけなら read 権限の token で足りるためです。72 文字の目安は機械的には検証していません。

推奨する branch protection 設定(この PR では変更していません)

main に対して、次の設定を推奨します。

  • Require a pull request before merging
  • Require status checks to pass before merging
    • Required checks: ci-success、pr-title
    • 個別に指定する場合: fmt、check、clippy、test (linux)、test (macos)、deny、pr-title
    • Require branches to be up to date before merging: 任意(squash merge 運用なので有効を推奨)
  • Do not allow bypassing the above settings(任意)

後続作業

🤖 Generated with Claude Code

@nishide-dev nishide-dev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

#11 のうち TeX Live を必要としない品質ゲート(fmt / check / clippy / test(Linux・macOS)/ deny / PR title / Dependabot)が揃っており、must-fix / should-fix に当たる指摘はありません。以下は nit のみです。対応するかどうかはお任せします。

確認したこと

  • ローカル(PR branch を clone)
    • actionlint 1.7.12: 指摘なし
    • cargo deny --locked check(cargo-deny 0.20.2): advisories ok, bans ok, licenses ok, sources ok。非推奨キーの警告もなし
    • cargo nextest run --workspace: 2 tests passed
    • cargo test --workspace --all-features --locked --doc: 成功(doctest 0 件)
  • PR 上の check: fmt / check / clippy / test (linux) / test (macos) / deny / ci-success / pr-title がすべて pass。log で rustup toolchain install が rust-toolchain.toml の 1.98.1 を入れていること、PR 上では save-if: false になっていることを確認しました。
  • SHA pin: 4 つの action すべてを gh api で照合し、コメントの tag と一致していました(いずれも現時点の最新リリース)
    • actions/checkout v7.0.1 → 3d3c42e…
    • Swatinem/rust-cache v2.9.2 → annotated tag を deref すると 6323deb…
    • taiki-e/install-action v2.87.22 → 83ac0ad…
    • amannn/action-semantic-pull-request v6.1.1 → 48f2562…
  • セキュリティ
    • top-level の permissions が最小限です(contents: read / pull-requests: read)
    • trigger は pull_request_target ではなく pull_request です
    • checkout に persist-credentials: false が付いています
    • run: に PR title などの外部入力を展開している箇所はありません。needs.*.result も env 経由で渡しています
  • ci-success: if: always() と「success 以外はすべて失敗」の判定で、failure / cancelled / skipped のどれでも失敗になります。matrix job(test)の result は集約値なので、片方の OS だけが落ちた場合も失敗になります。!cancelled() ではなく always() を使っているので、「集約 job が skip されて required check が通ってしまう」問題も起きません。
  • PR title 検証
    • type 一覧が CONTRIBUTING の表(feat/fix/docs/test/refactor/perf/chore/build)と一致しています
    • scope は任意です
    • description は小文字始まり・末尾ピリオドなしです
    • ! による breaking change 表記も action の既定 parser で通ります
  • Dependabot の title
    • prefix: chore と include: scope で chore(deps): bump ... になります
    • group の PR(chore(deps): bump the cargo-minor-and-patch group with N updates)も subjectPattern を通ります
  • docs(CONTRIBUTING / README)の check 名・コマンドは ci.yml と一致しています。license allow list も #1 で決めた MIT と整合しています。

nit

  1. concurrency が main の push と schedule にも効く: cancel-in-progress: true なので、main へ連続で merge すると前の push run が取り消されます。その commit は main 上で検証されず、cache も保存されません。また schedule と push は同じ group(refs/heads/main)なので、互いに取り消し合う可能性があります。cancel-in-progress: ${{ github.event_name == 'pull_request' }} にしておくと安全です。
  2. 週次 schedule のコスト: 目的は新しい RustSec advisory の検出ですが、macOS を含む全 job が走ります。deny だけを走らせる別 workflow(または if: github.event_name != 'schedule' で他の job を除外)にすると軽くなります。現状は public repo で無料なので問題はありません。なお、public repo の schedule は 60 日間活動がないと自動で無効化されます。
  3. --no-tests=warn: すでに test があるので、fail(nextest の既定)にしておくと、test が誤って 0 件になった場合も検出できます。
  4. subjectPattern: ^[a-z0-9\]` は数字やバッククォートで始まる description も許可します。CONTRIBUTING の「先頭は小文字」より少し緩いので、意図的であれば CONTRIBUTING 側に一言あると親切です。
  5. deny.toml の allow-wildcard-paths のコメント: cargo-deny でこの設定が効くのは publish = false の crate(または dev-dependency)だけです。現状は texrun-core の path 依存に version があるので wildcard 扱いにはなりませんが、コメントの「version なしで許可される」は条件付きだと分かる書き方にしておくと誤解がありません。
  6. Dependabot の dev-dependency の scope: include: scope の場合、dev-dependency の更新は chore(deps-dev): ... になります。検証は通りますが、CONTRIBUTING の chore(deps) の記述とはずれます。dev-dependency を追加するときに意識しておく程度で十分です。
  7. taiki-e/install-action で入れる tool のバージョン([email protected] / [email protected])は Dependabot の更新対象外です。手動で更新する旨をコメントで残しておくとよいと思います。
  8. ローカル品質ゲートと CI の差: CI は --locked を付けていますが、CONTRIBUTING のローカル手順には付いていません。Cargo.lock の更新漏れがあると、ローカルでは通って CI だけ落ちます。必要なら補足してください。

@nishide-dev
nishide-dev merged commit 0522d63 into main Sep 30, 2026
9 of 10 checks passed
@nishide-dev
nishide-dev deleted the chore/ci-quality-gates branch September 30, 2026 05:56
nishide-dev added a commit that referenced this pull request Sep 30, 2026
## 概要

host に TeX Live を入れずに開発・integration test を行えるよう、Rust toolchain と軽量な TeX
Live を含む Docker ベースの開発環境を追加します。CI(#11)とローカルで同じ TeX
環境を使い、fixture(#10)の揺れを抑えることが目的です。

## 変更内容

- `docker/dev/Dockerfile`
- ベース: `rust:1.98.1-slim-trixie`(Debian
13)。`rust-toolchain.toml`(channel = "1.98.1"、components = rustfmt /
clippy)に合わせて `rustfmt` / `clippy` component を事前に追加し、コンテナ内での toolchain
再ダウンロードを防ぐ
- TeX Live: `latexmk`, `texlive-latex-base`,
`texlive-latex-recommended`(`--no-install-recommends`)。`pdflatex` /
`bibtex` が使える(`biber` は含まない)
- preview tool: `mupdf-tools`(`mutool`)、`poppler-utils`(`pdftoppm` /
`pdfinfo`)
- サイズ削減: dpkg の `path-exclude` で `/usr/share/doc`・man・locale・TeX Live の
`doc/` を除外し、apt cache / lists を削除
- `compose.yaml`(repo root)
  - service `dev`、repo を `/workspace` に bind mount
- build 成果物: `CARGO_TARGET_DIR=/workspace/target/docker`(bind mount
内。checkout ごとに分離され、`.gitignore` の `/target/` で無視される)
- cargo registry / git cache: named volume `texrun_cargo-registry` /
`texrun_cargo-git`。`name: texrun` で project 名を固定し、全 checkout で共有
- `docs/development.md`: build / 実行方法、コンテナ内でのローカル品質ゲート(CONTRIBUTING.md
と同じ 4 コマンド)、cache 構成と消し方、TeX Live integration test の実行方法は #10
で決める旨、注意事項(root 所有、image tag の共有、TeX Live の version 記録)

### レビュー対応(d2874fa)

- **must-fix**: target volume を全 checkout で共有していたため、古い成果物で test が偽 green
になる問題を修正。target を bind mount 内の `target/docker/` に移し、checkout ごとに分離した
- build 時間(OrbStack, clean な `cargo clippy` + `cargo test`、3 回平均): named
volume は約 2.4 秒、bind mount は約 2.6 秒(約 8% 増)。許容範囲と判断した。no-op の `cargo
test` はどちらも 0.03 秒
- **should-fix**: `CARGO_TARGET_DIR` が mount point ではなくなったので、`cargo
clean` が成功するようになった
- **nit**
  - `ca-certificates` を install list から削除(base image に含まれるため)
  - `CARGO_TARGET_DIR` は `compose.yaml` だけで定義(Dockerfile の `ENV` を削除)
  - `CARGO_TERM_COLOR=always` を削除(既定の `auto` に任せる)
- docs の Cache 節を、共有するもの / checkout ごとのものに分けて書き直した。`down --volumes`
を実行すると全 checkout 共有の registry / git cache が消えることも追記
  - `image: texrun-dev:latest` が全 checkout で共有される点を docs に注意書きとして追加
- TeX Live などの package version(texlive-binaries 2024.20240313.70630+ds-6
/ texlive-latex-* 2024.20250309-1、Debian 13.7)を docs に記録
- Linux ホストでは `target/docker/` が root 所有になること、integration test の出力先を
tempdir にする方針を docs に追記

### CI(#19)merge 後の追従(26311d1)

- `docs/development.md` を CI の構成に合わせて最小限更新した
  - 現在の CI はこの image を使っておらず、TeX Live integration job で使う想定であることを明記
  - CI と同じ条件で確認するときは `--locked` を付けること
  - `cargo-deny` / `cargo-nextest` は image に含めていないこと

### 再レビュー対応(f64663f)

- **should-fix**: Linux の Docker Engine では `target/` 自体が root
所有で作られ、host の cargo build が Permission denied になる件を docs に追記した
  - 初回は host で `mkdir -p target` しておくこと
  - root 所有になってしまった場合は `sudo chown -R "$(id -u):$(id -g)" target` で戻すこと
- `--user "$(id -u):$(id -g)"` で実行する方法は OrbStack で試した。registry の cache
がある状態では `cargo test` が通った。一方、cache が空の volume では `cargo fetch` が root
所有の `/usr/local/cargo/registry` に書き込めず、Permission denied
で失敗した。そのため現状は非サポートとし、将来の選択肢として docs に記載した
- **nit**: build 時間の比較は、計測環境に依存する参考値であることを明記した

## 確認方法

macOS (Apple Silicon) + OrbStack で、origin/main(#15, #16, #18, #19 merge
後)に rebase した状態で確認しました。PR 上の CI(`ci-success` / `pr-title` を含む全 check)は
green です。

ローカル品質ゲート(すべて `docker compose run --rm dev ...` でコンテナ内実行):

- [x] `cargo check --workspace --all-targets --all-features`
- [x] `cargo fmt --all -- --check`
- [x] `cargo clippy --workspace --all-targets --all-features -- -D
warnings`
- [x] `cargo test --workspace`(`texrun` 1 passed / `texrun-core` 1
passed / doc-tests 0)
- [x] `cargo clean`: exit 0

偽 green の再発確認(checkout A / B の 2 つ):

1. B で test が失敗する変更を入れる(T1)
2. A で `cargo test --workspace` → 1 passed、exit 0(T2 > T1)
3. B で `cargo test --workspace` → `Compiling` が走り、FAILED(exit 101)。A
の成果物は使われない
4. 成果物はそれぞれ `A/target/docker`、`B/target/docker` に分かれ、compose の volume
に関する warning も出ない

toolchain:

- 使われる toolchain は image に入っている `1.98.1-aarch64-unknown-linux-gnu`
だけ(`/workspace/rust-toolchain.toml` による override)。4 ゲートの実行中に rustup の
sync / download は発生しない

TeX Live / preview tool:

```bash
docker compose build dev
docker compose run --rm dev latexmk -v     # Latexmk 4.86
docker compose run --rm dev mutool -v      # mutool 1.25.1
docker compose run --rm dev pdftoppm -v    # pdftoppm 25.03.0
```

- repo 外の一時ディレクトリで、`\cite` + `.bib` を含む最小 `article` 文書を `latexmk -pdf
-norc -interaction=nonstopmode -halt-on-error -no-shell-escape`
でビルドした。exit 0 で bibtex も実行され、1 ページの PDF が生成された。`pdftoppm -png` / `mutool
draw` による PNG 化も成功
- image サイズ: `texrun-dev:latest` 1.67GB(disk usage、content size
431MB)。ほとんどはベースの `rust:1.98.1-slim-trixie`(1.13GB)が占める

## 関連 Issue

Closes #14

関連: #2, #5, #8, #10, #11

## 補足

- 後続(#11): base image の digest 固定と、Dependabot(docker
ecosystem)による更新の検討。CI では compose の named volume ではなく、`docker build
docker/dev` + `docker run -v`(cargo cache は actions/cache)や buildx の gha
cache を使う形になる見込み。方式が決まったら docs に追記する
- 後続(#8): default の preview tool が 1 つに決まれば、もう片方を外して image を 70〜100MB
程度削減できる
- `docker compose` plugin が使えない環境では `docker-compose` に読み替える(docs に記載)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
nishide-dev added a commit that referenced this pull request Oct 6, 2026
## 概要

`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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant