Skip to content

fix: 素の Ubuntu 24.04 での初期設定で止まった箇所を直す - #521

Merged
hironow merged 8 commits into
mainfrom
claude/nice-ride-97i9q2
Oct 30, 2026
Merged

hironow merged 8 commits into
mainfrom
claude/nice-ride-97i9q2

Conversation

@hironow

@hironow hironow commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

概要

素の Ubuntu 24.04 コンテナ(root、mise なし)で install.sh 相当の手順、just harden-env、just sync-agents、just restore-skills-lock、just doctor、just ci を順に実行し、止まった箇所や警告が残った箇所を直した。CI で見つかった、main でも落ちる 2 件もあわせて直した。commit は関心ごとに分けてある。

commit 直したこと
fix(install) prek step_prek_shim が ~/.local/bin/prek を作れていなかった。mise は installs/prek/latest を symlink で作り、find は起点の symlink を辿らないので、何も見つからず毎回 skip していた。起点に末尾スラッシュを付けた。shim は latest/ 経由のパスを指したままなので、prek を上げても追従する
fix(install) corepack Node の LTS が 26 系に移ったため、INSTALL_SKIP_ADD_UPDATE=1 で install.sh を再実行すると、node = "lts" に当たる node が入っておらず corepack enable が失敗する。set -e なので installer 全体が止まっていた(dev container の Install: rerun update path もこれで落ちた)。step_sheldon と同じく、WARN を出して続けるようにした
fix(skills) just restore-skills-lock が exit 1 になっていた。gemini-interactions-api(google-gemini/gemini-skills)と resolving-merge-conflicts(mattpocock/skills)が上流の HEAD に無い(skills CLI が clone した一覧で確認)。宣言から外した(153 → 151 件)
fix(doctor) uv tool install pyright で入った pyright を just prune-retired-python-tools が消せず、doctor が python-retired を出し続けていた。RETIRED_UV_TOOLS に pyright を足した
chore(rtk) rtk 1.1.0 に追従した。just rtk-pi-refresh で rtk.ts を再 vendor した(本体は同じで、見出しの版だけ変わる)。新しいサブコマンド ng(Angular CLI を実行する。next や tsc と同じ種類)を RTK_FILTER_SUBCOMMANDS に分類した
test(ollama) IPv6 が無効なコンテナでは ::1 に bind できず、実際に bind する serve() のテスト 2 件が落ちて just ci が赤になっていた。::1 に bind できない機体ではこの 2 件だけを skip する。ほかの serve() テストは start_server を差し替えているので、そのまま動く
fix(emulator) test-emulators が main でも 2026-10-28 から落ちていた。上流の a2a-inspector が main を Go に書き直した(a2aproject/a2a-inspector#221)ため、Python/TypeScript 構成を前提にした Dockerfile が作れない。既定の取得先を、書き直しの直前の commit 8aa0646 に固定した。commit SHA を渡せるよう、取得を init + fetch に変えた
chore(deps)(cherry-pick) #520 の 973f7d4 をそのまま取り込んだ。期限が切れた exclude-newer-package が just lint(check-uv-exclude-newer)を落とし、commit hook を通せなかったため。main の test-just もこれで落ちていた

検証

  • 修正は Red → Green で進めた。新しいテストは、修正の前に落ちることを確認してある(tests/unit/test_install_prek_shim.py、tests/unit/test_install_corepack_step.py、emulator/tests/test_a2a_inspector_build.py に追加した 2 件、test_retired_python_tools.py と test_ai_tools_check.py に追加した 1 件ずつ)
  • just ci:forbidden-tokens 以外はすべて通過した(unit は 1915 passed / 103 skipped)。just emu-lint も通過した
  • 実機での確認:~/.local/bin/prek が作られた。retired_python_tools.sh detect の結果は空になった。doctor の rtk-guard と rtk-pi-extension は OK になった。skills-place で missing が 0 になった。a2a-inspector の取得は、固定した SHA でも main でも git fetch --depth 1 で取れることを確かめた(image の build は CI で確認する)

未確認のこと

  • forbidden-tokens の検査をしていない。 このクラウドコンテナには非公開のトークン一覧($DOTFILES_FORBIDDEN_TOKENS)が無い。そのため commit は forbidden-tokens-staged と forbidden-tokens-commit-msg の 2 つの hook だけを SKIP して作った(operator の承認済み)。lint とテストの hook は通している
  • just test-install を回していない。 コンテナで Docker daemon に届かないため。CI が回すのは just test まで
  • feat(kernel-doctor): report Linux kernel CVE evidence, never a verdict #520 と変更が重なる。 先に merge した方の変更が入ると、後の方では同じ差分が空になる

直していないこと

  • image の node(config/mise/image-tools.toml の 24.22.1)と、host の node = "lts"(今は 26 系)がずれている。image を 26 系に上げるかどうか
  • a2a-inspector を Go 版に移すかどうか
  • Pi の @ollama/pi-web-search 用の Ollama 公式インストーラーが、zstd が無いため失敗した(just deploy は WARN を出して続行する)。素の WSL Ubuntu でも同じことが起きうる
  • UV_NATIVE_TLS の非推奨警告は、コンテナが設定する環境変数から出ている。docker、brew、jev-key、ca-* の WARN は、このクラウドコンテナの性質によるもの

🤖 Generated with Claude Code

https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V

hironow and others added 6 commits October 30, 2026 10:35
The 7-day release quarantine lets a security fix through per package with an
absolute `exclude-newer-package` cutoff. That cutoff never expires by itself,
so once the admitted release is older than the window the entry only freezes
the package there and later Dependabot bumps become silent no-ops. That is
what scripts/check_uv_exclude_newer.py exists to catch, and it now fails:

  emulator/pyproject.toml: `certifi` cutoff 2026-10-20 is 9 days old
  emulator/pyproject.toml: `mlflow` cutoff 2026-10-21 is 8 days old
  ... mlflow-skinny, mlflow-tracing, and telemetry/examples `certifi`

certifi 2026.10.19 (the eMudhra CA removal) and mlflow / mlflow-skinny /
mlflow-tracing 3.17.2 (GHSA-wqmh-qccw-pqwf) were admitted on 2026-10-26 with a
comment saying to remove them on or after 2026-10-28. Dropping them leaves the
repo-authoritative `exclude-newer = "7 days"` span in charge, which now admits
those releases on its own.

`uv lock` in both projects removes only the lock's
`[options.exclude-newer-package]` metadata: no resolved version changes (the
diff is 7 deletions, 0 version lines).

The `ruff = false, ty = false` entries stay; those are a different mechanism
(skip the span so an exact pin can move without waiting out the window).

(cherry picked from commit 973f7d4)
step_prek_shim searched installs/prek/latest, which mise creates as a
symlink to the version directory. find does not follow a symlinked start
point, so it found nothing, command -v prek was empty before mise
activate, and every fresh box skipped the ~/.local/bin/prek shim that
git hooks fall back to. A trailing slash makes find descend into it; the
shim still names latest/ so a prek upgrade carries it along.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V
just restore-skills-lock exited 1 on a fresh box: the skills CLI cloned
both sources and found no skill by these names at HEAD.

- gemini-interactions-api (google-gemini/gemini-skills): the repo now
  ships gemini-api-dev, gemini-live-api-dev and gemini-omni-flash-api.
- resolving-merge-conflicts (mattpocock/skills): not among its 38 skills.

Both stay declared nowhere else (no skillOverrides entry), so the
declaration shrinks from 153 to 151 records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V
`uv tool install pyright` (the PyPI wrapper) puts pyright and
pyright-langserver links in ~/.local/bin. detect reported those links,
and prune skipped them as "removed with its uv tool", but pyright was not
one of the uv tools prune removes, so nothing removed it and doctor
warned python-retired on every run. Add it to RETIRED_UV_TOOLS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V
just doctor warned twice after mise installed rtk 1.1.0:

- rtk-pi-extension: config/pi/extensions/rtk.ts was vendored from 1.0.1.
  Re-vendored with just rtk-pi-refresh; the upstream body is unchanged,
  only the version in the header moves.
- rtk-guard: 1.1.0 adds `ng`, which the command guard had not classified.
  `rtk ng` runs the Angular CLI (a fixed tool, like `rtk next` and
  `rtk tsc`), not operands the agent supplies, so it joins
  RTK_FILTER_SUBCOMMANDS. The guard never reads that set; doctor does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V
Two serve() tests bind real sockets on 127.0.0.1 and ::1, because
serve() refuses to run on one address family alone. In a container with
IPv6 disabled (AF_INET6 is "Address family not supported") they fail
with "could not bind on any address out of [('::1', 0, 0, 0)]", which
made test-unit, and so just ci, red on such a host. Skip them there: the
code is untested on that host, not broken. Every other serve() test
replaces start_server and still runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V
@hironow
hironow marked this pull request as ready for review October 30, 2026 11:01
The a2a-inspector image builds upstream source with this repo's
Dockerfile, which expects backend/, frontend/, pyproject.toml and
uv.lock, and it cloned upstream main. Upstream rewrote the inspector in
Go on main (a2aproject/a2a-inspector#221, 2026-10-27), so every COPY now
fails with "/src/repo/backend: not found". test-emulators has been red
on main since 556eedb (2026-10-28) for this reason.

Default A2A_INSPECTOR_REF to 8aa0646, the commit just before the
rewrite and what CI last built green. `git clone --branch` takes no
commit SHA, so the source stage now does init + `fetch --depth 1` +
checkout FETCH_HEAD, which still accepts a branch or tag as an override.
Moving to the Go inspector is a separate decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V

hironow commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

unit-integration-e2e(test-emulators)の失敗は、この PR の差分が原因ではない。main でも 556eedb(2026-10-28 の push)から同じ理由で落ちている。

  • 原因:emulator/a2a-inspector/Dockerfile は上流 a2aproject/a2a-inspector の main を clone して、backend/、frontend/、pyproject.toml、uv.lock を COPY する。上流は 2026-10-27 に main を Go に書き直した(feat: rewrite the inspector as a Go binary with an embedded UI a2aproject/a2a-inspector#221、v0.2.0)。そのため COPY が "/src/repo/backend": not found で失敗する。
  • 既存の修正:見当たらなかった。
  • この PR に入れた修正(493249f):A2A_INSPECTOR_REF の既定値を、書き直しの直前の commit 8aa0646 に固定した。最後に CI が通っていた状態と同じである。git clone --branch には commit SHA を渡せないので、取得を git init → fetch --depth 1 → checkout FETCH_HEAD に変えた。branch 名や tag 名での上書きも引き続きできる。固定を確かめるテストを emulator/tests/test_a2a_inspector_build.py に足した。
  • Go 版の inspector に移るかどうかは、別の判断として残してある。

Generated by Claude Code

Under mise, `corepack` on PATH is a shim for the node the deployed
~/.config/mise/config.toml asks for (`node = "lts"`). Node moved its LTS
line to 26, so a rerun with INSTALL_SKIP_ADD_UPDATE=1 (no `mise install`)
resolves to node 26.13.0, which is not installed, and the shim exits 1.
install.sh runs under `set -e`, so step_corepack stopped the installer
before the dotfiles were deployed. The dev container's "Install: rerun
update path" test fails this way: the image pins node 24.22.1, which
matched `lts` only while LTS was 24.

Make the step best-effort with a WARN that names the fix, like
step_sheldon. Whether the image should move to node 26 is a separate
decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147hurtFmppBfdZ3M8n8e4V

hironow commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

Run just tests in dev container の失敗(test_just_commands_sandbox[Install: rerun update path]。ほかの 125 件は pass)は、この PR の差分が原因ではない。Node.js の LTS が 26 系に移ったことが原因である。

  • 何が起きたか:image は config/mise/image-tools.toml で node を 24.22.1 に固定している。一方、1 回目の install.sh が just deploy で配る ~/.config/mise/config.toml は node = "lts" である。mise は lts を major 版に解決し、入っている版と照合する。LTS が 24 系だった 10-28 までは 24.22.1 が使われていた。今は 26.13.0 を探し、2 回目の install.sh(INSTALL_SKIP_ADD_UPDATE=1 なので mise install をしない)の step_corepack で、corepack の shim が Tool not installed for shim: corepack で exit 1 になる。install.sh は set -e なので、そこで止まる。
  • main でも、image を作り直せば同じように落ちるはずである(10-28 の main の失敗は、この PR で取り込んだ期限切れの隔離設定が原因で、このテストは通っていた)。
  • 既存の修正:見当たらなかった。
  • この PR に入れた修正(b4306f6):step_corepack の corepack enable を、step_sheldon と同じく失敗しても続けるようにし、直し方(mise install)を WARN で出す。README にある INSTALL_SKIP_ADD_UPDATE=1 での再実行が止まらなくなる。テストは tests/unit/test_install_corepack_step.py(修正の前に落ちることを確認済み)。
  • image の node を 26 系に上げるかどうかは、別の判断として残してある。

Generated by Claude Code

@hironow
hironow merged commit 41f0b03 into main Oct 30, 2026
8 checks passed
@hironow
hironow deleted the claude/nice-ride-97i9q2 branch October 30, 2026 11:43
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