You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: make the bootstrap and hooks behave on servers without Nix #8
flowchart LR
S0["前提の確認<br/>install の上書き・token 作成"] --> B["bootstrap"]
H["hooks"]
T["test-map"]
B --> D["dotfiles: DEVIN_PERMISSION_MODE"]
B & H & T --> N["#7・#9 へ"]
Activity
furedea-agent commentedon Oct 24, 2026
実装計画
3 本のレーンを並行で進め,最後に dotfiles 側の 1 本を足す.#7 と #9 はこの Issue のマージ後に始める(README,
claude/settings.json,bats のフィクスチャが重なるため).fix/bootstrap-server-parityscripts/bootstrap_server.sh,tests/bootstrap_server.bats,tests/test-helper/,agent_environment.json(新規),flake.nix,docs/adr/fix/hook-defaults-without-dotfilesagents/hooks/lib/formatter_policy.py,lint_engine.py,同梱の既定設定,agents/claude/settings.json,対応するtests/hooks/,tests/claude/test/related-test-map.agents/hooks/rules/related_test_extensions.json,対応するテストrefactor/read-agent-environmentnix/darwin/default.nix,nix/checks.nix,flake.lockbootstrap
installが Codex・Devin・Hermes の設定を上書きするか.GitHub App の token 作成コマンドが Nix なしで動くか.結果をこの Issue に書くbootstrap_server.envに App ID と鍵の場所があれば token を作り,GitHub のドメインとGH_CONFIG_DIRを Claude の上書き設定に入れるruff,dprint,shellcheckを固定版で入れる.bubblewrap と socat がなければ警告だけ出す~/.config/agent-config/にし,古い~/.config/dotfiles/も読む(読んだら移行を促す)XDG_STATE_HOMEの上書きを受け付けない(sandbox の許可と食い違うため)gh attestation verifyで検証するagent_environment.jsonにDEVIN_PERMISSION_MODEを置き,bootstrap はagent_env.shに書き出す.flake はlib.agentEnvironmentとして出すhooks
~/dprint.jsonと~/.prettierrcがなくても,agent-config に同梱した既定の設定で整形できる~/.cache/dprintも書けるようにするtest-map
test_command_permission_sync.pyのような名前の合わないテストも選ばれるdevin-env
DEVIN_PERMISSION_MODEをagent-config.lib.agentEnvironmentから読む.checks.nixの確認は残す共通
all-green)とレビューを通す.マージはユーザーが行う前提
furedea-agent commentedon Oct 24, 2026
前提の確認結果(bootstrap レーン)
agent-harness 0.9.7(
/etc/profiles/per-user/kaito/bin/agent-harness)を使い,$TMPDIRの捨て HOME にinstallを 2 回実行して確かめた.2 回目の前に各設定へ利用者のキーを足した.installの再実行~/.codex/config.tomlrender.rsのsync_managed_document).足した[projects."/srv/work"]は残ったsync-codex-config~/.config/devin/config.jsonuser_keyは消えたsync-devin-configsync-devin-configで戻す~/.hermes/config.yamlmanaged-config.yamlだけを書くため,plugin が有効にならないsync-hermes-config --source managed-config.yaml --target config.yamlsync-hermes-configを呼ぶ(利用者のキーは残ることを確認済み.対象がなくても作成できる)GitHub App の token:
agent-harness github-app-token refresh --app-id … --private-key … --config-dir …は Rust だけで実装されている(JWT 署名とureqによる API 呼び出し).Nix にも外部コマンドにも依存しないため,musl の配布バイナリでそのまま動く.GH_CONFIG_DIR用のhosts.yml,config.yml,agent_harness_token.json.token の寿命は 1 時間で,Home Manager は 5 分ごとに refresh する(launchd / systemd).ついでに見つかった点:
agent-harness-v0.9.7の形だが,agent_harness_release_urlは版を指定するとdownload/v0.9.7/を組み立てる.版を固定すると今のままでは取得に失敗する.gh attestation verify <asset> --repo furedea/agent-harnessは v0.9.7 の Linux 版アセットで成功した.ただし gh の認証が必須(未認証ではgh auth loginを求めて exit 4)で,Sigstore の TUF(tuf-repo-cdn.sigstore.dev,tuf-repo.github.com)と attestation の保存先(tmaproduction.blob.core.windows.net)にも接続する.furedea-agent commentedon Oct 24, 2026
方針の変更(bootstrap レーン,利用者と合意)
前提の確認結果(上のコメント)を受けて,次の 2 点を変える.
gh attestation verifyはやめる.gh へのログインが必須だが,ログイン済みのサーバーはまずなく,ほぼ実行されないため..sha256と照合する.test(hooks): map the remaining consumers found in review
test(hooks): select the hook lock test for related-test defaults
fix(bootstrap): keep token protections and unmergeable agent configs
fix(hooks): format without dotfiles-installed dprint and prettier con…
furedea-agent commentedon Oct 24, 2026
PR #15 の後に残る項目:bootstrap は Claude には GitHub の token を渡すが,Codex には渡さない(Home Manager の
applyToCodexSettingsに当たる処理がない).サーバーの Codex は sandbox の中から push できない.また bootstrap は Linux の実機でまだ動かしていない.どちらもこの Issue で扱う.test(hooks): map agent-config sources to the tests their names miss (#12
fix(bootstrap): make the server bootstrap behave like the Nix hosts (#15
refactor(nix): read DEVIN_PERMISSION_MODE from agent-config (#323)
fix(bootstrap): keep non-ASCII text valid when rewriting the Codex co…
fix(bootstrap): sync the Codex token settings through agent-harness
fix(bootstrap): give Codex the agent GitHub token settings and run th…
furedea-agent commentedon Oct 24, 2026
PR #15,#16,#12,#21 で受け入れ条件がすべて揃った.Linux の実機確認は #21 の CI の bootstrap ジョブで通った.P2 以下の残りは各 PR の本文に記録してある.