Skip to content

fix(web-researcher): fallback trigger の counter=0 routing 契約矛盾を解消する - #2167

Merged
squne121 merged 1 commit into
mainfrom
worktree-issue-2164-web-researcher-fallback-counter
Aug 14, 2026
Merged

squne121 merged 1 commit into
mainfrom
worktree-issue-2164-web-researcher-fallback-counter

Conversation

@squne121

Copy link
Copy Markdown
Owner

Summary

  • .claude/agents/web-researcher.md の fallback trigger OR-list(61行目)から web_tool_call_count == 0 を削除し、同ファイル内の diagnostics-only 制約(実装: web-researcher を AGY-first + native Web fallback にする #2059 AC3: provider telemetry counter は zero を含め routing/escalation の理由にしない)との自己矛盾を解消する
  • test_agent_contracts.py::test_provider_telemetry_is_not_a_quality_gate を、diagnostics-only 文の存在(positive)と fallback trigger セクションから web_tool_call_count == 0 が不在であること(negative)の両方を assert する contradiction-prevention テストへ更新する

Checks

  • pnpm typecheck
  • pnpm lint
  • pnpm test
  • pnpm build
  • 上記コマンドをすべてローカルで実行し、成功したことを確認してからチェックしています

検証コマンド結果

# AC1: rg -c "web_tool_call_count == 0" .claude/agents/web-researcher.md
exit 1(0 件ヒット)

# AC2: rg -c "citation materialization failure" .claude/agents/web-researcher.md
1

# AC3: rg -c "observability / diagnostics only" .claude/agents/web-researcher.md
1

# AC4: uv run pytest .../test_agent_contracts.py -k test_provider_telemetry_is_not_a_quality_gate
1 passed

# AC5: uv run pytest .../test_agent_contracts.py
176 passed

# AC6: git diff --stat origin/main -- .codex/agents/web-researcher.toml
(出力なし・差分なし)

# 追加: uv run pytest .../test_model_routing.py
24 passed

pnpm typecheck / pnpm lint / pnpm test(1872 passed)/ pnpm build も全て成功

Schema Change Applicability

  • decision: not_schema_change
  • reason: agent 定義ファイル(プロンプト文言)と静的 pytest 契約テストの文言修正であり、producer-consumer 境界をまたぐ machine-readable schema の変更を含まない

Schema Consumer Inventory

N/A(schema 変更ではないため)

Visual Impact Declaration(視覚影響申告)

N/A(UI/DOM/CSS 変更を含まない)

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
.claude/agents/web-researcher.md の fallback trigger 文言修正は permission / sandbox / transport / auth / MCP / native tools / approvalMode の実行時挙動を変更しない(プロンプト文言と契約テストの assertion のみを変更) yes git diff --stat origin/main -- .claude/agents/web-researcher.md .claude/skills/gemini-cli-headless-delegation/tests/test_agent_contracts.py の diff が prompt 文言・pytest assertion の 2 箇所のみであることを確認済み。uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_agent_contracts.py 176 passed N/A

Notes

…2164)

#2150 が web-researcher.md の fallback trigger OR-list に導入した
`web_tool_call_count == 0` は、同ファイル内の diagnostics-only 制約
(#2059 AC3: provider telemetry counter は zero を含め routing/escalation
の理由にしない)と自己矛盾していた。fallback trigger 条件から該当節を
削除し、正当な evidence-quality/failure-classification 条件のみを残す。

test_agent_contracts.py の test_provider_telemetry_is_not_a_quality_gate
を、diagnostics-only 文の存在(positive)と fallback trigger セクション
から `web_tool_call_count == 0` が不在であること(negative)の両方を
assert する contradiction-prevention テストへ更新する。

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

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #2167 closed).

@squne121

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

  • Linked Issue: Closes 実装: web-researcher fallback の counter=0 routing 契約矛盾を解消する #2164 — confirmed.
  • Diff scope: exactly 2 files, both match Issue 実装: web-researcher fallback の counter=0 routing 契約矛盾を解消する #2164's Allowed Paths exactly (.claude/agents/web-researcher.md, .claude/skills/gemini-cli-headless-delegation/tests/test_agent_contracts.py). No scope creep. .codex/agents/web-researcher.toml untouched (AC6).
  • AC1: web_tool_call_count == 0 removed from fallback trigger OR-list — confirmed.
  • AC2: citation materialization failure trigger condition retained — confirmed.
  • AC3: diagnostics-only constraint text preserved.
  • AC4: test_provider_telemetry_is_not_a_quality_gate updated with both positive and negative assertions — confirmed.
  • AC5: CI python-test and test required checks SUCCESS at head SHA 60531d2db1aa4256d43aad7cb0134076b0ca46ff.
  • Schema Change Applicability: not_schema_change, correctly justified.
  • Safety Claim Matrix present and appropriately scoped.

No blockers.

verdict: APPROVE
reviewed_head_sha: "60531d2db1aa4256d43aad7cb0134076b0ca46ff"
blockers: []
warnings: []

@squne121
squne121 merged commit a8d21eb into main Aug 14, 2026
42 checks passed
@squne121
squne121 deleted the worktree-issue-2164-web-researcher-fallback-counter branch August 14, 2026 12:49
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.

実装: web-researcher fallback の counter=0 routing 契約矛盾を解消する

1 participant