Skip to content

refactor(feishu): remove unreachable requester topic selection - #146904

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/feishu-requester-route-selection-20260913
Sep 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/feishu-requester-route-selection-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Feishu requester-topic selection contains an unreachable duplicate route-selection branch.

User Impact

No user-visible behavior changes. Ambiguous requester topics remain unresolved, and a child with only one bound route retains its existing fallback.

Why This Change Was Made

The earlier branch already returns whenever exactly one topic matches. The removed branch required that same count, so it could never select a route. Production changes: −21 lines; tests: +47 lines.

Evidence

  • The registered-hook fixture uses real binding-manager APIs and distinct requester/child routes. It checks ambiguity rejection, then removes one child route and checks the remaining-route fallback.
  • Actual before/after resolver and delivery functions matched across 10,206 cases using legal binding assignments and an in-memory manager adapter. This did not run Vitest or the Feishu API.
  • Independent review and fresh P2 autoreview are clean. Targeted formatting and the normal commit hook passed with installed oxfmt 0.65.0.
  • Exact-head hosted CI passed. Job 103710876538 executed all 6 subagent hook cases, including the new ambiguity/fallback fixture; its descriptor passed 2059 tests across 103 files. Type/lint and pinned formatting checks passed. No live Feishu API or gateway execution is claimed.

@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 7:37 AM ET / 11:37 UTC (Revision 3).

ClawSweeper review

What this changes

Removes unreachable Feishu reply-route selection code and adds coverage preserving ambiguous-topic handling and the existing single-child-route fallback.

Merge readiness

✅ Ready for maintainer review

The cleanup remains useful: current main and the latest release retain the unreachable branch. No blocking correctness findings remain, and this member-authored PR is protected from automatic closure.

Likely related people: vincentkoc for requester-resolution work; Peter Steinberger as an unverified routing candidate for adjacent binding work.

Priority: P3
Reviewed head: 834927c1e393459e03f7b8d46f6ce30dae2256cf

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-proven simplification with useful boundary coverage and successful hosted CI.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored cleanup preserves Feishu delivery-hook behavior and does not materially change authority; registered-hook tests and adapter comparisons are supplemental evidence, with no live Feishu execution claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored cleanup preserves Feishu delivery-hook behavior and does not materially change authority; registered-hook tests and adapter comparisons are supplemental evidence, with no live Feishu execution claimed.
Evidence reviewed 7 items Introduced change and unreachable condition: The pinned merge-base-to-head diff removes only the redundant selection block and adds one hook test. The deleted condition implies matchingTopicBindings.length === 1, which the preceding branch already handles with an unconditional return; the removed parser calls have no state-changing effects.
Meaningful registered-hook coverage: The complete test uses the production hook registration and real binding manager, with distinct requester and child conversations. It checks unresolved ambiguity with two child routes, then the existing fallback after removing one route. This protects behavior during refactoring without adding a production test seam.
Current-main necessity: The fetched main revision still contains senderScopedTopicBindings and the redundant count condition; this cleanup has not already landed there.
Findings None None.
Security None None.

How this fits together

The Feishu plugin receives subagent completion events and looks up conversation bindings to select a reply destination. It returns a Feishu delivery origin or leaves destination selection unresolved.

flowchart TD
  A[Subagent completion event] --> B[Feishu delivery hook]
  C[Account conversation bindings] --> B
  B --> D[Match requester conversation]
  D --> E[Matching child route or sole child fallback]
  E --> F[Feishu reply destination]
  E --> G[Unresolved destination]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -21, Tests +47. Total +26 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 0 21 -21
Tests 1 47 0 +47
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 47 21 +26

Review metrics

None.

Technical review

Best possible solution:

Keep one requester-topic selection path while preserving ambiguity rejection and the existing single-child fallback.

Do we have a high-confidence way to reproduce the issue?

Not applicable to a user-facing bug: source inspection proves the removed selection condition is unreachable. No runtime reproduction was attempted.

Is this the best way to solve the issue?

Yes. Deleting the redundant block is the narrowest solution, and the registered-hook test preserves the relevant observable routing contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4883e4699ee3.

Labels

Label justifications:

  • P3: This is a behavior-preserving dead-code cleanup with focused coverage and no demonstrated user-facing failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored cleanup preserves Feishu delivery-hook behavior and does not materially change authority; registered-hook tests and adapter comparisons are supplemental evidence, with no live Feishu execution claimed.

Evidence

What I checked:

  • Introduced change and unreachable condition: The pinned merge-base-to-head diff removes only the redundant selection block and adds one hook test. The deleted condition implies matchingTopicBindings.length === 1, which the preceding branch already handles with an unconditional return; the removed parser calls have no state-changing effects. (extensions/feishu/src/subagent-hooks.ts:87, 834927c1e393)
  • Meaningful registered-hook coverage: The complete test uses the production hook registration and real binding manager, with distinct requester and child conversations. It checks unresolved ambiguity with two child routes, then the existing fallback after removing one route. This protects behavior during refactoring without adding a production test seam. (extensions/feishu/src/subagent-hooks.test.ts:161, 834927c1e393)
  • Current-main necessity: The fetched main revision still contains senderScopedTopicBindings and the redundant count condition; this cleanup has not already landed there. (extensions/feishu/src/subagent-hooks.ts:98, 4883e4699ee3)
  • Latest-release comparison: The supplied latest-release commit for v2026.9.4 also retains the redundant block. No released implementation of this cleanup was established. (extensions/feishu/src/subagent-hooks.ts:98, 3a9d69db306c)
  • Validation and proof scope: GitHub confirms the linked hosted run completed successfully for the exact reviewed head. The captured PR body reports six hook cases and 10,206 before/after adapter comparisons, explicitly disclaiming live Feishu or Gateway execution. These are supplemental validation; the member-authored, behavior-preserving cleanup is exempt from the external-contributor live-proof gate. No tests were executed during this read-only review. (834927c1e393)
  • Area-history routing: Main history identifies earlier requester-parser and hook-wiring work by Vincent Koc, plus binding and hook maintenance by Peter Steinberger. GitHub's commit response confirms vincentkoc and the prefix-stripping patch at current line 25. Older local blobs prevented completing the broader blame and pickaxe search, so no original feature-introduction claim is made. (extensions/feishu/src/subagent-hooks.ts:25, 54592465fa17)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-13T09:48:43.218Z sha 834927c :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T10:41:12.043Z sha 834927c :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 10:36
@vincentkoc
vincentkoc merged commit ab87331 into main Sep 13, 2026
166 checks passed
@vincentkoc
vincentkoc deleted the refactor/feishu-requester-route-selection-20260913 branch September 13, 2026 11:37
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to zachisfine/openclaw that referenced this pull request Sep 13, 2026
* temp/pr-146799: (70 commits)
  test: reuse explicit fallback config fixtures (openclaw#146948)
  fix(computer): return fresh window observations after actions (openclaw#146822)
  refactor(feishu): remove unreachable requester topic selection (openclaw#146904)
  improve(gateway): reduce CPU spent listing agent-owned sessions (openclaw#137745)
  fix(ui): avoid recapturing chat drafts during UI updates (openclaw#146884)
  fix(ui): show system uptime in the debug overlay (openclaw#146960)
  fix(retry): honor waits beyond the native timer limit (openclaw#145718)
  fix(ui): keep chat history idle when run status changes (openclaw#146802)
  fix(ui): reuse persisted text during chat streaming (openclaw#146831)
  refactor(qa): share harness drift result construction (openclaw#146903)
  test(agents): coordinate settings lock contention (openclaw#146949)
  fix(worker): avoid repeatedly serializing screenshot history (openclaw#146907)
  fix(secrets): stop buffered upload writes after cancellation (openclaw#146840)
  perf(doctor): avoid unnecessary state runtime imports (openclaw#146926)
  improve: reduce compaction request estimation work (openclaw#146961)
  fix(ci): wait for forwarded avatar imports before assertions (openclaw#146729)
  perf(workers): skip configured Git author lookups (openclaw#146833)
  fix: admit borrowed memory writes through the agent database owner (openclaw#146760)
  fix(discord): prevent voice playback gaps and stale turn controls (openclaw#146798)
  improve: reduce worktree filesystem stalls and archive syncs (openclaw#146906)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant