Skip to content

ci: use the shared lint and nix workflows - #195

Merged
furedea merged 4 commits into
mainfrom
ci/use-shared-lint-workflows
Nov 8, 2026
Merged

furedea merged 4 commits into
mainfrom
ci/use-shared-lint-workflows

Conversation

@furedea

@furedea furedea commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

GitHub Actions の lint(actionlint,zizmor),dependency review,nix lintを,furedea/reusable-workflows v1.1.0 の共有 workflow から呼ぶように変えます.呼んだジョブは all-green の needs に入るので,失敗するとマージできません.CodeQL は workflow をやめ,GitHub の default setup に移します.

項目 今 変更後
共有 workflow の固定 @<sha> # main(main が進むと zizmor の ref-version-mismatch で落ちる) @<sha> # v1.1.0
actionlint / zizmor gha_lint.yml(workflow を変えた PR だけ) ci.yml から gha-lint.yml を呼ぶ(全 PR,all-green に入る)
dependency review dependency_review.yml(all-green の外),または無し ci.yml から dependency-review.yml を呼ぶ.非公開 repo と PR 以外では飛ばして成功扱い
nix lint ci.yml に直接書いたジョブ nix-lint.yml を呼ぶ
flake check repo ごと(無い repo もある) まだ呼ばない.IFD のせいで他の system を評価できないため.#196 で IFD をなくしてから足す
CodeQL codeql.yml(非公開 repo でも動いて失敗する) codeql.yml を消す.public repo は default setup をオンにする(本人が設定)
claude-review / codex-review # main の古い SHA # v1.1.0
  • 呼んだ共有ジョブがすべて成功する
  • all-green が green になる
出典

🤖 Generated with Claude Code

Call gha-lint, dependency-review, nix-lint and nix-check from
furedea/reusable-workflows v1.0.0 and require them in all-green.
Remove the per-repository GitHub Actions lint and dependency review
workflows, move flake checks to the shared nix-check, skip CodeQL on
private repositories, and pin the review workflows to the same release.

Refs furedea/reusable-workflows#6

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 8, 2026 13:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T16:50:38.183466Z 7aadad6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@furedea

furedea commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Review summary: no blocking findings.

The CI changes look consistent. The new reusable-workflow jobs (gha-lint, dependency-review, nix-check) are in the all-green needs list. They are pinned to the same v1.0.0 SHA. The permissions given (actions: read for zizmor, contents: read elsewhere) match what the deleted local workflows used. The removed dependency_review_config.yml only held the defaults.

Things to confirm on the first run (I couldn't read the called workflows):

  • On push to main, dependency-review should report success, not skipped. all-green fails if any job is skipped.
  • nix-check now builds the flake checks (-L, no --no-build), so the job will take longer.

Not in the diff: docs/DESIGN.md:200 and docs/DESIGN_ja.md:163 still list the deleted dependency_review and gha_lint workflows.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02addcb31b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +104 to +105
gha-lint:
uses: furedea/reusable-workflows/.github/workflows/gha-lint.yml@c1a43f64ed01a49fa05eccbf8a45dcdf0a9385f9 # v1.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the workflow inventory after folding checks into CI

Moving gha-lint and dependency-review into the CI workflow makes the verification overview inaccurate: docs/DESIGN.md lines 193-201 and docs/DESIGN_ja.md lines 159-164 still say there are six workflows and list dependency_review and gha_lint as standalone workflows, even though both files were deleted here. Update both design documents so contributors see the workflow topology that actually runs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 6638103: DESIGN.md and DESIGN_ja.md now list the five workflows that exist and describe the shared-workflow calls in ci.

@furedea

furedea commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Review summary: no blocking findings.

Checked:

  • The all-green needs list includes the four new reusable-workflow jobs (gha-lint, dependency-review, nix-check, plus the converted nix-lint). All shared workflows are pinned to the same SHA, c1a43f6, with a # v1.0.0 comment.
  • The caller permissions look right: gha-lint gets actions: read + contents: read (zizmor needs actions: read), and the others get contents: read.
  • nix flake check --no-build was removed from nix-lint. nix-check now runs the full nix flake check -L, which is stricter.
  • Removing gha_lint.yml and dependency_review.yml loses no trigger coverage, because ci.yml runs on every PR and on every push to main.
  • The DESIGN docs' workflow count (5) matches what's left in .github/workflows.

Not verified, because I couldn't fetch the contents of furedea/reusable-workflows@c1a43f6 from this environment:

  • all-green fails on skipped. On push to main, the PR says dependency-review is skipped and treated as success. That only holds if the caller job reports success rather than skipped, so please confirm it on the first post-merge main run.
  • I couldn't check that none of the called jobs asks for more permissions than the caller grants.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 6638103425

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

furedea added a commit to furedea/reusable-workflows that referenced this pull request Nov 8, 2026
… tool version (#16)

## 概要

CI で使うツールを版レベルですべて固定し,使われていない `workflow-template-dir` 入力を削除します.

## 変更内容

### 破壊的変更

- `gha-lint.yml` の `workflow-template-dir` 入力と,それ専用の 3 ステップ(template 用の
actionlint,Stage,template 用の zizmor)を削除しました.呼び出し側で使っている repo
はありません.入力の削除は互換性を壊すため,release-please は v2.0.0 を切ります.

### 版の固定

- 版の文字列ではなく,中身が変わらない形で固定しました.
- actionlint は,`raven-actions/actionlint` が release asset を checksum
検証なしでダウンロードする(asset は差し替えられる)ため,nixpkgs の固定 rev から `nix run`
で実行する形に変えました(`gha-lint.yml`).nixpkgs の actionlint は shellcheck と
pyflakes を同梱しています.`raven-actions/actionlint` と actionlint の Renovate
customManager は削除しました.
- zizmor は `1.32.0` に固定(`gha-lint.yml`).固定済みの `zizmor-action` の SHA に
hash 付きの lockfile があるため,この版で中身まで固定されます.
- `nix-lint.yml` の nixfmt・statix・deadnix と `gha-lint.yml` の actionlint
を,nixpkgs の同一 rev(各ファイルの job env `NIXPKGS_REV`)に固定.
- 全ワークフローの `runs-on: ubuntu-latest` を `ubuntu-24.04` に固定.GitHub は新しい 2
つの LTS を提供する方針で,`ubuntu-latest` の移行告知でも 24.04 への固定が案内されています.
- `ubuntu-26.04` にしなかった理由:固定した actionlint 1.7.12(nixpkgs の rev が提供する版)は
`ubuntu-26.04` を組み込みラベルに持ちません(v1.7.12 の `rule_runner_label.go` で確認).一方
`ubuntu-24.04` は組み込みラベルなので,設定ファイルは不要です.26.04 への移行は
#17 で扱います.
- `renovate.json` に customManagers を追加し,zizmor(github-releases)と
nixpkgs(git-refs,`nixos-unstable`,`nix-lint.yml` と `gha-lint.yml` の 2
ファイルを 1 本の PR で更新)を Renovate が更新するようにしました.
- Nix 本体(`install-nix-action` v31.11.3 → Nix 2.35.4)と Claude
CLI(`claude-code-action` v1.0.268 → Claude CLI 2.1.318)は,固定済みの action
SHA に版が埋め込まれているため,既に exact に固定されています.`install_url` などを足すと action
の版と二重管理になるので,追加していません.action の更新で一緒に上がります.
- README に入力と固定の一覧を反映しました.

## `all-systems` 入力の取り消しについて

commit `7b89507` のメッセージは `nix-check.yml` への `all-systems`
入力の追加を謳っていますが,最後の commit `c9de33e` で取り消しています(force push はしていません).`nix
flake check -L` → `nix flake check --all-systems --no-build` の 2
段は,無条件に実行する元の動作のままです.この PR の最終状態に `all-systems` 入力はありません.

IFD(import-from-derivation)を使う flake は,`--no-build` で外部 system
の出力を評価できず失敗します(furedea/agent-harness#195,furedea/dotfiles#405).対応は
opt-out を設けるのではなく,flake 側で IFD をなくす方針です.追跡は furedea/agent-harness#196
です.

## 確認

- ローカルで `actionlint`(1.7.12,設定ファイルなし)がエラーなしで通ることを確認.
- CI(`all-green`)と `claude-review` / `codex-review` の結果は,この PR で確認します.

Refs: furedea/agent-harness#195, furedea/agent-harness#196,
furedea/dotfiles#405

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

---------

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Pin every furedea/reusable-workflows call to v1.1.0. Delete
codeql.yml: CodeQL moves to GitHub's default setup, which private
repositories without code scanning never run.
Stop calling nix-check until #196 removes the
import-from-derivation that breaks evaluating other systems.

Refs furedea/reusable-workflows#6

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@furedea

furedea commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Comment thread .github/workflows/ci.yml
nix-lint:
runs-on: ubuntu-latest
timeout-minutes: 10
uses: furedea/reusable-workflows/.github/workflows/nix-lint.yml@ca7c5f2973a899e209bc60767f434aecbc186bc9 # v1.1.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 — The old inline nix-lint job ended with nix flake check --no-build. Nothing replaces it: no other workflow in .github/workflows/ runs nix flake check. Until #196 lands, CI no longer evaluates the flake checks. That includes tests/home_manager_module.nix, which docs/DESIGN.md lists as a test layer "via nix flake check". So a broken HM module or a flake eval error can merge with all-green passing. The PR body says this is deliberate. Even so, consider keeping a stopgap nix flake check --no-build job (the old step passed on this repo) so the coverage doesn't drop in the meantime.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not adding it. The old step ran on a Linux runner, but the flake only outputs aarch64-darwin, so every check was omitted and nothing was evaluated (the 2026-11-08 CI log says: The check omitted these incompatible systems: aarch64-darwin). Adding --all-systems fails on import-from-derivation. So it is not a working stopgap, and the real fix is tracked in #196.

Comment thread docs/DESIGN.md Outdated
Comment on lines +193 to +203
The flake also builds the skill and hook-bundle builders as checks. GitHub Actions runs five
workflows:

- `ci`: Nix lint, clippy, rustfmt, `cargo test`, and dependency audits, gathered by an `all-green`
job.
- `ci`: clippy, rustfmt, `cargo test`, and Rust dependency audits, plus calls to the shared
workflows in `furedea/reusable-workflows` (`nix-lint`, `nix-check`, `gha-lint`,
`dependency-review`, `claude-review`, `codex-review`), gathered by an `all-green` job.
- `codex_conformance`: generated execpolicy rules against the locked Codex CLI, kept separate from
`ci` by design ([0001]).
- `codeql`, `dependency_review`, `gha_lint`: security analysis and workflow linting.
- `release_please`: versioning, changelog, and cargo-dist release artifacts.
- `codeql`: security analysis.
- `release_please`: versioning and changelog.
- `release_artifacts`: cargo-dist release artifacts for a draft release tag, run manually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 — This section doesn't match the PR:

docs/DESIGN_ja.md has the same three problems.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 7aadad6: DESIGN.md and DESIGN_ja.md now list the four workflow files, drop nix-check from the ci calls until #196, and note that CodeQL runs through the GitHub default setup.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Review summary

No blocking findings (no P0/P1). Two P2s are posted inline:

  1. P2: nix flake check is gone from CI (ci.yml). The shared nix-lint call replaces the old job, but the old job also ran nix flake check --no-build. Nothing replaces that step, so the Home Manager module test and the flake checks don't run until refactor(nix): remove import-from-derivation so every system evaluates on Linux #196 lands.
  2. P2: docs/DESIGN.md and DESIGN_ja.md don't match the workflows. They list nix-check (not called) and codeql (deleted), and they say five workflows when there are four.

What I checked:

  • The new jobs are in all-green's needs.
  • Every shared-workflow pin uses the same SHA with a # v1.1.0 comment.
  • Each job's permissions are no broader than before.

What I couldn't check:

  • I couldn't read the shared workflows' contents.
  • all-green fails when any job it waits on is skipped. On push to main this relies on dependency-review skipping its inner job so that the caller job itself still reports success. Worth confirming on the first push run.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6747d08df7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/DESIGN.md Outdated
Comment on lines +196 to +198
- `ci`: clippy, rustfmt, `cargo test`, and Rust dependency audits, plus calls to the shared
workflows in `furedea/reusable-workflows` (`nix-lint`, `nix-check`, `gha-lint`,
`dependency-review`, `claude-review`, `codex-review`), gathered by an `all-green` job.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the nonexistent nix-check call from the inventory

The updated inventory now says that ci calls the shared nix-check workflow, but .github/workflows/ci.yml only invokes nix-lint, gha-lint, dependency-review, and the two review workflows; there is no nix-check job anywhere in the workflow. This incorrectly tells contributors that flake evaluation is enforced by CI. Remove nix-check from this list (and from the equivalent list in DESIGN_ja.md) until that workflow is actually added.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 7aadad6: the workflow inventory in both design docs now matches the files in .github/workflows, and states that the Home Manager module check does not run in CI until #196.

@furedea

furedea commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Comment thread .github/workflows/ci.yml
nix-lint:
runs-on: ubuntu-latest
timeout-minutes: 10
uses: furedea/reusable-workflows/.github/workflows/nix-lint.yml@ca7c5f2973a899e209bc60767f434aecbc186bc9 # v1.1.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: This change drops the nix flake check --no-build step that the old inline nix-lint job ran. CI no longer evaluates the flake at all, so a broken tests/home_manager_module.nix or flake output would now merge with all-green passing.

The IFD reason given (#196) applies to evaluating other systems, which the shared nix-check presumably does. The old step only evaluated the host system on ubuntu, and it was passing on main. Until #196 lands, consider keeping a small local job that runs nix flake check --no-build and adding it to all-green.needs, so this gap doesn't stay open in the meantime.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same finding as the earlier thread on this line, so the answer is unchanged. The old step did not evaluate the ubuntu host system: the flake only outputs aarch64-darwin, so every check was omitted (the 2026-11-08 CI log says: The check omitted these incompatible systems: aarch64-darwin). A local job would pass without evaluating anything, and --all-systems fails on import-from-derivation. The real fix is tracked in #196.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Review summary

No blocking findings (0 × P0/P1).

Notes, not findings:

  • I couldn't read the shared workflows at ca7c5f2 from this environment, so two things are unchecked. First, whether the shared dependency-review uses the same threshold as the deleted config (fail-on-severity: high, warn-only: false). Second, whether it ends as success rather than skipped on push to main. all-green fails when any job it needs is skipped, so please confirm the first post-merge push run on main is green.
  • The docs updates match the remaining workflow files.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 7aadad6326

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@furedea
furedea merged commit 05d0f89 into main Nov 8, 2026
15 checks passed
@furedea
furedea deleted the ci/use-shared-lint-workflows branch November 8, 2026 16:55
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.

2 participants