Skip to content

ci(moshi): open a PR when moshi-hook has a new release - #224

Merged
furedea merged 3 commits into
mainfrom
ci/update-moshi-hook
Oct 18, 2026
Merged

furedea merged 3 commits into
mainfrom
ci/update-moshi-hook

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Summary

cdn.getmoshi.app deletes old moshi-hook releases, so a stale pin breaks with 404 whenever a nixpkgs change forces a rebuild (as in #219). This adds a daily workflow that keeps nix/packages/moshi_hook.nix on the latest release.

Closes #220

Commits

  • feat(moshi): scripts/moshi/update_moshi_hook.sh reads latest/version.txt (must be vX.Y.Z), takes the moshi-hook_Darwin_arm64.tar.gz hash from the release's checksums.txt, converts it to SRI, and rewrites only version and hash. Exits 3 when the pin is current. The CDN base URL is replaceable via MOSHI_CDN_URL; Bats tests serve fixtures through file://.
  • test(moshi): moshi-pinned / moshi-managed-runtime in nix/checks.nix and the two greps in tests/agents/agent_hook.bats read the version from moshi_hook.nix instead of hard-coding 0.4.31, still asserting /nix/store/...-moshi-hook-<version>/bin/moshi-hook.
  • ci(moshi): .github/workflows/update_moshi_hook.yml (daily schedule + workflow_dispatch) pushes chore/update-moshi-hook-<version> and opens a PR unless one is already open, then runs gh workflow run ci.yml because PRs created with GITHUB_TOKEN do not trigger pull_request runs. ci.yml gains workflow_dispatch and runs the new Bats tests.

Verification

  • bats tests/moshi/update_moshi_hook.bats tests/moshi/lifecycle.bats tests/agents/agent_hook.bats tests/agents/codex/codex_notification.bats tests/herdr/herdr_command.bats tests/hermes/hermes_secretary.bats tests/nix/configuration.bats tests/terminal-browser/terminal_browser.bats: 18/18 pass
  • uv run --frozen pytest tests: 1564 passed
  • nix build .#checks.aarch64-darwin.home-configuration .#checks.aarch64-darwin.host-configuration: pass
  • Real CDN: 0.4.31 yields "no update" (exit 3); a copy pinned to 0.3.21 is rewritten to exactly the current moshi_hook.nix
  • actionlint: pass; zizmor 1.31.0: no findings

Required repository setting

Settings → Actions → General → Allow GitHub Actions to create and approve pull requests must be enabled, or the workflow cannot open PRs.

🤖 Generated with Claude Code

furedea and others added 3 commits October 18, 2026 21:43
The CDN deletes old releases, so the pin must follow upstream. The script
reads latest/version.txt, takes the Darwin arm64 hash from the release's
checksums.txt, and rewrites only version and hash in moshi_hook.nix.

Refs #220

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Nix contracts and the rendered-hook Bats test hard-coded 0.4.31, so
every automated version bump would break them. They now derive the
version from moshi_hook.nix while still asserting the versioned store path.

Refs #220

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A daily workflow runs the update script and, for a newer release, pushes
chore/update-moshi-hook-<version> and opens a PR unless one is already
open. PRs created with GITHUB_TOKEN do not trigger pull_request runs, so
CI gains workflow_dispatch and the updater dispatches it on the branch.
CI also runs the update script's Bats tests.

Closes #220

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@furedea
furedea merged commit 6d422a4 into main Oct 18, 2026
13 checks passed
@furedea
furedea deleted the ci/update-moshi-hook branch October 18, 2026 13:44
furedea added a commit that referenced this pull request Nov 16, 2026
agent-config の PostToolUse フックが ADR 編集後に実行する `adr-check` を PATH
に置く.`jev-lint` と同じ方法で `home.packages` に追加し,`agent-config` 入力を #225
を含むリビジョンに更新する.

Refs furedea/agent-config#169

## 変更内容

- `nix/home/default.nix`: `adrCheckPackage =
agent-config.packages.${system}.adr-check;` を `jevLintPackage`
の隣に追加し,`home.packages` に加えた(furedea/agent-config#225).
- `flake.lock`: `agent-config` を `2ab23eb` → `138c542` に更新した(`nix flake
update agent-config`).

## agent-config の更新内容(2ab23eb → 138c542,23 コミット)

- lint: go-style / rust-style / python-style / TypeScript / bash-style /
github-actions-style / agents/AGENTS.md のルールを ast-grep・jev-lint・model
rules へ移行(#190, #191, #192, #193, #194, #195),Go の `util`・`common`
パッケージ検出(#202),ブロッキング ast-grep ルールの欠落修正(#216)
- hooks: 静的ルールエラーでの編集ブロックと ast-grep-ignore の保護(#203),ask
プレフィックスの限定(#199),リポジトリフック回避オプションの拒否(#212),コードセルの判定修正(#224)
- skills: issue / git / setup ワークフローを `development-cycle`
に統合(#211),agent 実行の verify ステップ削除(#213),範囲外指摘への回答と all-green 待機(#223)
- docs/ADR: MADR の採用(#215),スキル責務の配置(#208),コマンド判定の方針(#198),ast-grep
のブロック方針(#214),AGENTS.md の整理(#205)
- build/ci: マイナーバージョン上げの設定(#217),jev-lint モデルルールテストを CI で実行(#218)
- feat: `adr-check` コマンドの追加(#225)

## 検証

- `nix build '.#homeConfigurations."kaito@mbp".activationPackage'`:
成功.生成物の `home-path/bin` に `adr-check` が含まれることを確認した.
- `darwin-rebuild switch` は実行していない.

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

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Sonnet 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.

moshi-hook の版を自動で追いかける

1 participant