Skip to content

ci: run language tools from the flake dev shell - #38

Merged
furedea merged 2 commits into
mainfrom
ci/23-dev-shell
Nov 9, 2026
Merged

furedea merged 2 commits into
mainfrom
ci/23-dev-shell

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

概要

CI の言語ツール(Node,pnpm)を,flake の devShell から動かす形に変える.setup-node と pnpm/action-setup をやめ,reusable-workflows の composite action nix-setup(v1.3.0)で Nix を準備する.

変更

  • flake.nix: devShell を aarch64-darwin に加えて x86_64-linux でも出す(forAllSystems 形式).ツールの中身は変えない.
  • .github/workflows/ci.yml: lint,format,typecheck,test,audit を,checkout,nix-setup,defaults.run.shell: nix develop --command bash -eo pipefail {0} の形にする.job 名と all-green の needs は変えない.
  • CI の Node は 22.23.3 から devShell の nodejs_24 になる.@types/node が 24 のため,手元との一致を優先した.
  • キャッシュを保存する job は lint だけにし,他は save: false にした(同じ store 内容で,保存の競合を避ける).

CI の時間

job 変更前(main の run 42501919419) 変更後(この PR の run 42621085410)
lint 19 秒 42 秒
format 14 秒 44 秒
typecheck 22 秒 43 秒
test 14 秒 36 秒
audit 15 秒 44 秒
全体(開始から all-green まで) 34 秒 約 3 分 6 秒(codex-review が律速.ツール系 job は 44 秒で完了)
  • ツール系の job は 22〜30 秒ほど延びたが,並列なので,ツール系だけで見た待ち時間は 20 秒前後から 44 秒になった.
  • 全体の待ち時間は,変更前の run では codex-review が 1 秒未満で終わった(レビュー対象外)のに対し,この PR では実際にレビューが走ったため 3 分を超えた.ツール系 job の増減とは別の要因.
  • 全 job が cold な状態で測った.lint が保存するキャッシュは main への push 後に効くので,さらに縮む見込み.

確認

  • nix flake check --all-systems --no-build --option allow-import-from-derivation false が通る.
  • nix develop 内で lint,format:check,typecheck,test,knip が成功する.

Refs furedea/reusable-workflows#23

🤖 Generated with Claude Code

furedea and others added 2 commits November 9, 2026 21:39
Refs furedea/reusable-workflows#23

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs furedea/reusable-workflows#23

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@furedea

furedea commented Nov 9, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 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-09T13:00:05.082465Z a803a9c 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.

Comment thread flake.nix
pkgs = import nixpkgs { inherit system; };
systems = [
"aarch64-darwin"
"x86_64-linux"

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: x86_64-linux now pulls its packages from the nixpkgs input, which is pinned to nixpkgs-26.05-darwin (see flake.lock). That branch only moves forward after the Darwin Hydra jobs pass, so cache.nixos.org may not have Linux binaries for that exact revision. When it doesn't, nix develop on ubuntu-latest has to build nodejs_24 and the other tools from source. That build won't fit in the 10-minute job timeout, and every job except lint uses save: false, so they can't reuse a cached result. Consider pinning a separate linux input to nixos-26.05 / nixpkgs-26.05, or check the first CI run's logs for local builds before merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Checked on the first CI run (run 42621085410). The lint job spent 26s in "Install dependencies", which includes the nix develop evaluation, the substitution of nodejs_24/pnpm and pnpm install. The other jobs finished in 36-44s in total, all with save: false and no cache hit to rely on. Building nodejs_24 from source would take far longer than the 10-minute timeout, so cache.nixos.org already had the x86_64-linux binaries for the locked nixpkgs revision. I could not read the raw logs from my sandbox, so this rests on step timings. If a later nixpkgs bump lands before Linux binaries exist, the job would fail visibly on the timeout, and moving to a separate Linux input would then be the fix; I am not adding that input now (YAGNI).

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Review summary

No blocking findings (0 P0/P1).

  • P2 (flake.nix): the x86_64-linux dev shell uses packages from the nixpkgs-26.05-darwin pin. cache.nixos.org may not have Linux binaries for that revision, and if it doesn't, CI has to build Node and the other tools from source and can hit the 10-minute job timeout. The PR's CI timings are still being measured, so this hasn't been confirmed or ruled out yet.

Also checked:

  • defaults.run.shell replaces the bash default only for these jobs, and -eo pipefail is kept.
  • The job names and the all-green needs list are unchanged.
  • Moving to Node 24 now matches @types/node 24.
  • The nixpkgs pnpm and packageManager: pnpm@11.28.9 don't conflict, because pnpm switches to the pinned version itself.
  • Dropping cache: pnpm only affects speed, not correctness.

This PR changes only CI configuration, so no tests are expected.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a803a9ceaf

ℹ️ 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 582b469 into main Nov 9, 2026
19 checks passed
@furedea
furedea deleted the ci/23-dev-shell branch November 9, 2026 13:03
@furedea furedea mentioned this pull request Nov 9, 2026
1 task
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