fix(bridge): empty silent get_pending_status wrap when pending_count is 0 (patch)#222
Merged
liplus-lin-lay merged 1 commit intoMay 25, 2026
Conversation
…is 0 (#221) wrapGetPendingStatusAsDecisionJson で payload.pending_count === 0 の時に ラップせずリモート戻り値をそのまま返すよう変更。Claude Code は decision schema 未一致 JSON を silent discard するため、hook 経由で additionalContext に空 reminder ("No pending GitHub webhook events.") が 注入されなくなり、毎ターンの空 noise を排除できる。手動 tool 呼び出し ではリモートの raw payload が返るため AI は直接判定できる。 リモート (Worker + DO) 側の戻り値構造は変更しない。 - mcp-server/server/index.js: 早期 return ロジック追加、docstring 更新 - mcp-server/test/get-pending-status-decision-shape.test.mjs: 既存の zero-pending wrap テストを "returns zero-pending payload untouched" に書き換え、"preserves sibling result fields" は pending_count=3 で wrap-path 維持 - docs/0-requirements.md / .ja.md: F3.1 に empty silent サブ仕様追加 Closes #221
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
github-webhook-mcp | 5f38278 | May 25 2026, 01:02 AM |
liplus-lin-lay
commented
May 25, 2026
Member
Author
liplus-lin-lay
left a comment
There was a problem hiding this comment.
AI self-review (auto mode)
分類確認
- consumer 観測 surface (token noise 削減) を含むが、 wrap 関数の早期 return 追加 1 箇所 + dead test 書き換え + docs F3.1 サブ仕様追記の小規模
- リモート (Worker + DO) 側未変更、 互換破壊なし
- → patch 維持
自己 diff 確認
mcp-server/server/index.js: 早期 return ブランチ追加、 docstring に Empty silent (#221) 段落追記。 既存 wrap path (非 0 / non-object / parse 失敗) 全保存mcp-server/test/get-pending-status-decision-shape.test.mjs:- 既存 zero-pending wrap テスト → untouched assertion へ書き換え (deepEqual で remote と一致、 parsed payload に hookSpecificOutput 不在を確認)
- sibling preservation テストは pending_count=3 ペイロードへ切替 (wrap-path テストとして残存)
docs/0-requirements.md/.ja.md: F3.1 直後に Empty silent (#221) サブ仕様を追加。 EN / JA 両方同期
CI
- test: pass (19s, 23/23 unit tests green)
- CI workflow: pass
- Workers Builds: pass
マージ判断
auto mode: AI 自己レビュー pass → AI 直マージ (gh pr merge --squash)。 release-version.md の patch 規約に沿い、 v0.11.5 milestone の next release 候補として保留。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
get_pending_statusの wrap delivery でpending_count == 0の時にhookSpecificOutput.additionalContextを返さない (silent) ようにする。 これによりLI_PLUS_WEBHOOK_DELIVERY=mcp_hook環境下で毎ターン注入されていた"No pending GitHub webhook events."reminder の noise が解消される。Closes #221
変更点
実装 (
mcp-server/server/index.js)wrapGetPendingStatusAsDecisionJsonに早期 return ロジック追加:payload.pending_count === 0なら remote 戻り値をそのまま返す (no wrap){pending_count: 0, types: {}, latest_received_at: null}が見える (self-describing)docstring に Empty silent (#221) サブセクション追記。
Test (
mcp-server/test/get-pending-status-decision-shape.test.mjs)wraps zero-pending payload with explicit no-events sentence→returns zero-pending payload untouched (empty silent, #221)に書き換え。assert.deepEqual(wrapped, remote)で untouched 保証、parsed.pending_count === 0とhookSpecificOutput不在を assertpreserves sibling result fields like isError when wrappingは pending_count=3 ペイロードに切り替え (wrap-path のテストとして残す)npm test23/23 passDocs (
docs/0-requirements.md/.ja.md)F3.1 セクションに Empty silent (#221) サブ仕様を追加。 EN / JA 両方更新。
AI 自己レビュー (auto モード)
分類
影響範囲
adapter/claude/hooks-settings.md) は無変更で empty reminder が消える (本 PR がコーディネーション案件の下流)CI 待ち
push 直後。 CI pass を確認したら、 auto モード規約に従い
gh pr merge --squashで直接マージする。🤖 Generated with Claude Code