Skip to content

perf(delegation): speed up lane CI waits and polling intervals - #300

Merged
furedea merged 3 commits into
mainfrom
perf/speed-up-lane-waits
Dec 2, 2026
Merged

furedea merged 3 commits into
mainfrom
perf/speed-up-lane-waits

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #298

計画: #298 (comment) (承認と決定: #298 (comment) )

変更内容

  • delivery.md の「Wait for CI」を,ループ・コマンド置換・sleep を使わない単一コマンド gh pr checks <n> --watch に変更しました.チェック未登録で即終了した場合の再実行,all-green の確認,失敗時の gh run view <run-id> --log-failed(run id はチェックのリンクから取得)との整合を保っています.--required を使わない規則も維持しています.
  • delegation/references/t3.md の待機間隔を sleep 300 から sleep 120 に変更しました.hc.md は決定どおり触っていません.
  • agents/claude/settings.json の sandbox.filesystem.allowWrite に ~/.cache/gh を追加しました.~/.config/agent-harness/gh と ~/.config/gh の保護(denyWrite,permissions.deny)は変更していません.
  • agents/codex/config.toml にも同じ ~/.cache/gh を追加しました.tests/test_harness_protection.py が Codex の書き込み許可を Claude のサンドボックスと一致させることを検証しているため,Claude 側だけの変更では既存テストが落ちます.
  • テスト: tests/claude/test_settings.py に ~/.cache/gh の期待を追加し,tests/hooks/test_gh_effects.py に gh pr checks <n> --watch が ask なしで許可されることのケースを追加しました.ガード契約自体は変更していません.

確認

  • uv run pytest: 6710 件成功,2 件失敗.うち test_harness_protection.py の失敗は上記の Codex 設定の追加で解消済みです.残る 1 件 test_model_rules_process.py::test_only_the_op_process_receives_the_token_and_only_allowlisted_variables は,macOS のローカル環境で LC_CTYPE が環境変数に現れるためで,今回の変更とは無関係です(CI は Linux).
  • ruff check,ruff format --check,ty check: 通過

🤖 Generated with Claude Code

Wait for CI with the single command gh pr checks <n> --watch, which the
command guard allows without asking, instead of gh run list plus gh run
watch. Allow writes to ~/.cache/gh in the Claude and Codex sandboxes so
gh run view --log-failed needs no environment prefix, and poll a delegated
lane every 120 seconds instead of 300.

Closes #298

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review summary

Read-only review of the sandbox, Codex config, doc and test changes. I did not run the test suite.

Findings

  • P2 (inline, delivery.md): gh pr checks <n> --watch is no longer tied to the pushed SHA. It can return early on the previous commit's finished checks, or before slower workflows register. Step 3 (confirm all-green) partly covers this, but the doc should say how to confirm the checks belong to the pushed commit.

No issues found

  • ~/.cache/gh is added to the Claude allowWrite list and the Codex config together, and the config-parity test still holds. The ~/.config/gh and ~/.config/agent-harness/gh protections are untouched.
  • The new guard tests cover gh pr checks --watch, including --fail-fast -R.
  • hc.md still has sleep 300, which matches the PR description (left untouched on purpose).

🤖 Generated with Claude Code

gh pr checks --watch watches whatever the PR head reports at that moment,
so confirm the head is the pushed commit and the all-green row is present
and finished before trusting the result, and run the wait again otherwise.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@furedea

furedea commented Dec 2, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 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-12-02T12:29:26.178783Z 3411b31 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.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review summary: I found no issues worth blocking on, so I posted no inline comments.

  • gh pr checks <n> --watch is already classified as a read in gh_policy.json (pr checks). The new test cases cover the bare form and the --fail-fast -R form.
  • The ~/.cache/gh addition is mirrored in Claude's settings.json and Codex's config.toml, which the harness-protection test requires. The protected ~/.config/gh and ~/.config/agent-harness/gh paths are untouched.
  • The new delivery.md flow handles the early-exit cases: no checks registered yet, stale previous-commit checks, and a missing all-green row. It checks headRefOid against git rev-parse HEAD, and it has a bounded retry.

I could not run the test suite in this read-only environment, so I'm relying on the PR's reported results. Those were 6710 passed and 2 failed. One failure was fixed by the Codex config change. The other is a macOS-only LC_CTYPE failure that the PR says is unrelated.

P3, optional: hc.md:107 still says sleep 300 while t3.md now says sleep 120. The PR description says this was a deliberate decision, so I'm only noting it.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28bb141e56

ℹ️ 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".

gh pr view --json prints a JSON object, so the head commit never matched
the plain output of git rev-parse HEAD; add --jq .headRefOid.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@furedea

furedea commented Dec 2, 2026

Copy link
Copy Markdown
Owner

@codex review

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review summary: no blocking findings.

  • The delivery.md rewrite is internally consistent. It keeps the all-green check, the ban on --required, and the head-SHA comparison, which replaces the old per-commit run lookup. It also documents the early-exit cases of gh pr checks --watch.
  • The ~/.cache/gh write allowance is mirrored in the Claude settings, the Codex config and the tests. The protected gh config paths are unchanged.
  • The sleep 300 to sleep 120 change in t3.md is a no-risk tuning change.
  • I did not run the test suite myself: the sandbox refused the pytest command. I'm relying on the PR's reported results and on CI.

P3 (optional): gh pr checks --watch exits 1 both when no checks are reported and when a check fails. Step 2 of the new wording tells a lane to re-run on inconclusive output. Saying explicitly to read the output before re-running would stop a lane from looping on a genuine failure within the 2-minute bound.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 3411b31831

ℹ️ 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 f68c8a2 into main Dec 2, 2026
29 checks passed
@furedea
furedea deleted the perf/speed-up-lane-waits branch December 2, 2026 12:37
furedea pushed a commit that referenced this pull request Dec 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.8.0](v0.7.0...v0.8.0)
(2026-12-02)


### ⚠ BREAKING CHANGES

* **adr:** drop the ADR front matter and adr-check
([#301](#301))

### Features

* **adr:** drop the ADR front matter and adr-check
([#301](#301))
([971cccf](971cccf))
* **adr:** keep only current decisions in ADRs
([#294](#294))
([f27eb15](f27eb15))
* **delegation:** herdr-core のレーンを --no-parent ではなく --no-notify で起動する
([#297](#297))
([34d251b](34d251b))
* **settings:** allow GitHub Actions log host in Claude sandbox network
policy ([#304](#304))
([e832155](e832155))


### Performance Improvements

* **delegation:** speed up lane CI waits and polling intervals
([#300](#300))
([f68c8a2](f68c8a2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: furedea-release[bot] <353651101+furedea-release[bot]@users.noreply.github.com>
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.

perf(delegation): speed up lane CI waits and polling intervals

1 participant