Skip to content

ci: render and verify the agent source and check Codex execpolicy - #13

Merged
furedea merged 3 commits into
mainfrom
ci/render-and-execpolicy
Oct 24, 2026
Merged

furedea merged 3 commits into
mainfrom
ci/render-and-execpolicy

Conversation

@furedea-agent

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

Copy link
Copy Markdown
Contributor

概要

固定版の agent-harness で agents/ を描画して agent-harness verify を通すジョブと,描画した Codex execpolicy 規則を固定版 Codex で照合するジョブを CI に追加する.

Closes #10
実装計画: #10 (comment)

変更点

  • .github/actions/install-agent-harness/action.yml:test ジョブにあった固定版 agent-harness の導入手順(rev 解決,cache,Rust,cargo install,PATH 追加)を composite action に抽出し,test・render・execpolicy の 3 ジョブで共有する(計画のファイル一覧に対する追加.Issue 上で合意済み)
  • tests/codex/execpolicy.bats:agent-harness install で配置された .codex/rules/default.rules を codex execpolicy check で照合する(許可 git fetch origin,確認 uvx ruff check,拒否 brew install ffmpeg)
  • .github/workflows/ci.yml:render と execpolicy ジョブを追加し,all-green の前提に入れる
  • Codex は既に package.json / package-lock.json で 0.162.1 に固定済みのため変更なし

補足

  • composite action 内の GITHUB_PATH 書き込みは zizmor の github-env に該当するが,書き込み先は固定の runner ディレクトリなので行内で抑止している
  • 既存の pytest(tests/codex/test_execpolicy.py)は generate-codex-rules の出力を網羅的に照合し,今回の bats は実際に install される規則ファイルを代表例で照合する

🤖 Generated with Claude Code

furedea and others added 3 commits October 24, 2026 18:24
…te action

The render and execpolicy jobs need the same locked agent-harness as the
test job, so the resolve, cache, build, and PATH steps move into one
reusable action.

Refs #10

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pytest suite checks the rules generate-codex-rules prints; this
checks the default.rules file that agent-harness install places, with
one allow, one ask, and one deny command.

Refs #10

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The render job installs agents/ with the locked agent-harness into a
temporary prefix and runs agent-harness verify. The execpolicy job runs
the installed rules through the locked Codex CLI. Both gate all-green.

Closes #10

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@furedea
furedea merged commit 3134518 into main Oct 24, 2026
17 checks passed
@furedea
furedea deleted the ci/render-and-execpolicy branch October 24, 2026 11:17
@furedea furedea mentioned this pull request Nov 8, 2026
2 tasks done
furedea added a commit that referenced this pull request Nov 8, 2026
GitHub Actions の lint(actionlint,zizmor),dependency review,nix
lint,flake check を,furedea/reusable-workflows v1.0.0 の共有 workflow
から呼ぶように変えます.4 つとも `all-green` の `needs` に入るので,失敗するとマージできません.

| 項目 | 今 | 変更後 |
| ---------------------------- |
--------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------
|
| 共有 workflow の固定 | `@<sha> # main`(main が進むと zizmor の
`ref-version-mismatch` で落ちる) | `@<sha> # v1.0.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 もある) | `nix-check.yml` を呼ぶ(`nix flake
check -L` と全 system の評価) |
| CodeQL | 非公開でも動く | 非公開 repo では飛ばす.codeql-action を v4.39.2 に |
| claude-review / codex-review | `# main` の古い SHA | `# v1.0.0` |
| 対応 system | `x86_64-darwin` を含む | `x86_64-darwin` を外す(下記) |

## CI の失敗への対応

- `nix-check`: nixpkgs 26.11 が `x86_64-darwin` のサポートを終了し,全 system
の評価(`devShells.x86_64-darwin.default`)が落ちていました.`flake.nix` の `systems` と
`nix/uv.nix` の target から `x86_64-darwin` を外しました.Intel Mac では,この flake
を使えなくなります.
- `gha-lint / zizmor`: zizmor 1.32.0 が,ローカル
action(`./.github/actions/install-agent-harness`)の 3 箇所に
`self-repository` を出しました.各行の末尾に `# zizmor: ignore[self-repository]`
を付けています.`$/` 記法は actionlint v1.7.12 が未対応なので使いません.

- [x] `gha-lint / …`,`dependency-review / …`,`nix-lint /
nix-lint`,`nix-check / nix-check` が成功する
- [x] `all-green` が green になる

<details><summary>出典</summary>

- 計画:furedea/reusable-workflows#6,#13
- 呼び出し先:furedea/reusable-workflows v1.0.0(c1a43f6).以後は release ごとに
Renovate が更新する
- 消した `.github/dependency_review_config.yml` は共有 workflow
の既定値(`fail-on-severity: high`)と同じだった

</details>

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
furedea added a commit that referenced this pull request Nov 8, 2026
GitHub Actions の lint(actionlint,zizmor),dependency review,nix
lint,flake check を,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 もある) | `nix-check.yml` を呼ぶ(`nix flake
check -L` と全 system の評価) |
| CodeQL | `codeql.yml`(非公開 repo でも動いて失敗する) | `codeql.yml` を消す.public
repo は default setup をオンにする(本人が設定) |
| claude-review / codex-review | `# main` の古い SHA | `# v1.1.0` |

- [ ] 呼んだ共有ジョブがすべて成功する
- [ ] `all-green` が green になる

<details><summary>出典</summary>

- 計画: furedea/reusable-workflows#6,#13
- 呼び出し先: furedea/reusable-workflows v1.1.0(ca7c5f2).以後は release ごとに
Renovate が更新する
- CodeQL の default setup:
https://docs.github.com/en/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning

</details>

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

Co-authored-by: Claude Opus 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.

ci: verify the rendered source and Codex execpolicy conformance

1 participant