Skip to content

fix(plugins): warn when registerHook uses a typed hook event name - #118601

Merged
Patrick-Erichsen merged 4 commits into
openclaw:mainfrom
SunnyShu0925:fix/hook-migration-diagnostic-116965
Aug 7, 2026
Merged

Patrick-Erichsen merged 4 commits into
openclaw:mainfrom
SunnyShu0925:fix/hook-migration-diagnostic-116965

Conversation

@SunnyShu0925

@SunnyShu0925 SunnyShu0925 commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Plugins that register typed lifecycle hooks through the legacy api.registerHook API get no warning when those handlers cannot receive typed events: registration returns OK, plugins inspect reports "loaded", but before_tool_call / message_received handlers never fire, leaving structural-interception plugins (memory rules, security guards, prompt-injection filters) silently disabled.

  • Problem: api.registerHook("before_tool_call", ...) registers into the legacy internal-hook path, while tool execution reads only the typed hook runner — the handler never fires, with no diagnostic or warning (false green "loaded")
  • Solution: Emit a registration warning when a typed lifecycle event name is passed to registerHook, pointing plugin authors to the public api.on(...); document the boundary in the hooks docs
  • What changed: src/plugins/registry-registrars-tools-hooks.ts (typed-name diagnostic in registerHook), src/plugins/loader.registration.test-utils.ts (2 regression tests), docs/automation/hooks.md (migration note)
  • What did NOT change: The legacy internal-hook contract (command:new, gateway:startup, message:received, ...) still registers and dispatches through triggerInternalHook; the typed hook runner execution path is untouched; no behavior is removed

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Motivation

api.registerHook is a public Plugin SDK surface that silently no-ops for typed lifecycle event names since the hook runner migration: registerHook("before_tool_call", ...) registers into registry.hooks + registry.legacyInternalHooks, while getHooksForName (src/plugins/hooks.ts) reads only registry.typedHooks. The regression is invisible to operators: the plugin loads, inspect shows "loaded", and no log line ever appears — so memory guards and security policies fail open without any signal.

The legacy handler signature (InternalHookEvent, void return) cannot express the typed blocking semantics (block / requireApproval), so restoring interception for before_tool_call through the legacy path is a Plugin SDK contract decision. This PR fixes the silence — the part that hides the failure from operators and plugin authors — with a bounded registration diagnostic plus migration guidance, without changing the SDK contract or the execution path.

Evidence

  • Behavior addressed: A plugin calling api.registerHook(["before_tool_call"], handler) now receives a warn diagnostic at registration time naming the typed event and the replacement API, instead of silently registering a handler that never fires.
  • Real environment tested: Linux x86_64, Node v22.22.3, branch fix/hook-migration-diagnostic-116965 (head 058c403e32e). Real dev gateway (node scripts/run-node.mjs --dev gateway, isolated ~/.openclaw-dev state) with a real plugin (hook-diagnostic-evidence) that calls api.registerHook(["before_tool_call"], ...).
  • Exact steps or command run after this patch:
    • CI=true pnpm install --frozen-lockfile
    • Created ~/.openclaw-dev/extensions/hook-diagnostic-evidence/{openclaw.plugin.json, package.json, index.cjs} where index.cjs calls api.registerHook(["before_tool_call"], () => {})
    • Configured ~/.openclaw-dev/openclaw.json plugins.load.paths + plugins.allow
    • CI=true node scripts/run-with-env.mjs OPENCLAW_SKIP_CHANNELS=1 -- node scripts/run-node.mjs --dev gateway
  • Evidence after fix:
2026-08-03T17:16:59.208+08:00 [gateway] [plugins] hook event "before_tool_call" is dispatched by the typed hook runner only; api.registerHook registrations for it are not invoked. Use api.on("before_tool_call", ...) instead. (plugin=hook-diagnostic-evidence, source=/home/0668000539/.openclaw-dev/extensions/hook-diagnostic-evidence/index.cjs)
2026-08-03T16:33:35.918+08:00 [gateway] http server listening (3 plugins: browser, hook-diagnostic-evidence, qwen; 13.3s)

Behavior matrix (event name passed to api.registerHook => result):

before_tool_call  => warn: "dispatched by the typed hook runner only; ... Use api.on(...) instead"
message_received  => warn: same diagnostic
gateway:startup   => no warning; registers into legacy internal hooks as before (still dispatched via triggerInternalHook)
command:new       => no warning; legacy type:action contract unchanged
  • Observed result after fix:
    1. A plugin registering before_tool_call / message_received through registerHook gets an immediate registration warning naming the typed event and the replacement API.
    2. Legacy type:action events (gateway:startup, command:new) register exactly as before — no warning, same legacyInternalHooks entries.
    3. The docs now state the boundary: registerHook covers internal event keys only; typed lifecycle names are dispatched exclusively by the typed hook runner.
  • What was not tested: A plugin that already migrated to api.on(...) (unchanged path); actual before_tool_call interception semantics (legacy handlers cannot return blocking results by design — that is the documented reason for the migration).

Root Cause

api.registerHook (src/plugins/registry-registrars-tools-hooks.ts) writes to registry.hooks + registry.legacyInternalHooks, while the typed hook runner (src/plugins/hooks.ts getHooksForName / hasHooks) reads only registry.typedHooks. This semantic mismatch predates #117372: immediately before e4d1b7e0d38, registerHook already wrote through registerInternalHook into legacy internal-hook state, while typed dispatch already selected only registry.typedHooks. #117372 changed the storage ownership from global legacy state to registry-owned legacy state; it did not introduce the mismatch.

Regression Test Plan

  • src/plugins/loader.registration.test-utils.ts (181 tests, +2 new):
    • warns when registerHook is used with a typed hook event name — asserts both the diagnostic text and that the legacy registration still lands in legacyInternalHooks
    • keeps legacy type:action events diagnostic-free in registerHook — asserts gateway:startup / command:new produce no typed-name warning
  • CI-like shards: src/plugins/contracts/boundary-invariants.test.ts + src/plugins/loader.hooks-and-runtime.test-utils.ts — 2 shards passed

User-visible / Behavior Changes

Plugin authors who call api.registerHook with a typed lifecycle event name now see a clear registration warning (in plugins diagnostics and gateway logs) telling them the handler will not be invoked and to use the public api.on(...) API. No existing registration, event dispatch, or config behavior changes; no output is removed.

Security Impact

  • New permissions/capabilities? No — additive registration diagnostic only
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Human Verification

  • Verified scenarios: real dev gateway startup with a real plugin registering before_tool_call through registerHook (warning emitted); legacy type:action registration matrix (no warning).
  • Edge cases checked: multiple events in one registerHook call (diagnostic per typed name); unknown event names (no diagnostic); duplicate-hook error path unchanged.
  • What you did NOT verify: migrated api.on(...) plugins end-to-end interception (unchanged path, covered by existing typed-hook tests).

Compatibility / Migration

  • Backward compatible? Yes — additive diagnostic; no removal, no signature change
  • Config/env changes? No
  • Migration needed? No — plugin authors are guided to migrate lifecycle hooks to api.on(...) when they see the warning

Best-fix Verdict

  • Best fix: Yes for the reported failure mode — surfacing the silent no-op at registration time is the bounded fix that restores operator/author visibility without unilaterally changing the public SDK contract. Full legacy-to-typed bridging (making the typed runner consult legacyInternalHooks) would silently degrade blocking semantics (legacy handlers return void) and is a maintainer-owned contract decision.
  • Refactor needed: No — the diagnostic lives in the shared registerHook registrar, so every plugin path (file, directory, manifest, SDK consumer) gets it.
  • Alternative considered: (1) Compatibility bridge — typed runner reads legacy registrations; rejected because legacy handlers cannot express block/requireApproval and it changes public dispatch semantics. (2) Hard error on typed names; rejected because it would break currently loading plugins instead of warning. (3) Migration diagnostic (chosen).

AI Assistance

Risks and Mitigations

  • Highest risk: a plugin author relying on the buggy silent path may only discover the break at upgrade time; mitigation — the warning names the exact replacement API, and the docs section explains the boundary. Another risk: the diagnostic could be perceived as a breaking change signal; mitigation — it is a warning only, registration behavior is unchanged, and legacy type:action hooks keep working.
  • Compatibility: additive only; existing plugins that do not register typed names see no difference; typed-runner dispatch is untouched.

Related to #116965

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S labels Aug 3, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 8:37 PM ET / August 7, 2026, 00:37 UTC.

ClawSweeper review

What this changes

Adds a plugin-load warning, regression tests, and hook documentation when legacy api.registerHook receives a typed lifecycle event name that requires api.on(...).

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The warning is a correct, bounded repair for the silent legacy-to-typed hook mismatch. Keep this PR open while the five failed current-head checks are diagnosed or rerun; their causes were unavailable, so they cannot be treated as unrelated.

Priority: P1
Reviewed head: dd32a0d4ae2681748412d37ce4424f9f83486e30
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a clean, source-supported diagnostic repair with strong real behavior proof; the current failed required checks remain the merge gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The PR body includes an after-fix development-gateway log from a real plugin registering before_tool_call through the legacy API and receiving the intended warning.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The PR body includes an after-fix development-gateway log from a real plugin registering before_tool_call through the legacy API and receiving the intended warning.
Evidence reviewed 5 items Exact merge surface: The reviewed head is a merge of the prior reviewed patch with current main; its diff against current main contains only the stated warning, tests, and documentation.
Separate dispatch contracts: Legacy registration writes legacyInternalHooks, whereas typed api.on writes typedHooks and the typed runner selects only typedHooks; a warning at legacy registration is the correct owner boundary.
Regression coverage: The PR verifies both per-event warnings and unchanged registration for legacy type:action events; existing typed-hook tests cover api.on storage and execution separately.
Findings None None.
Security None None.

How this fits together

Plugin loading records legacy internal hooks separately from typed lifecycle hooks. The typed runner later dispatches only typed registrations, while loader diagnostics reach gateway logs during plugin startup.

flowchart LR
  A[Plugin author] --> B[Legacy registerHook]
  A --> C[Typed api.on]
  B --> D[Plugin load diagnostics]
  C --> E[Typed hook registry]
  D --> F[Gateway logs]
  E --> G[Typed hook runner]
  G --> H[Lifecycle handler]
Loading

Decision needed

Question Recommendation
Are the five failed checks on the current head understood to be unrelated infrastructure/base failures, or must this PR be repaired before it can merge? Diagnose and rerun the exact head: Inspect the failed check logs, repair any PR-caused failure, and require a green current-head gate before merge.

Why: The patch itself is source-correct and has real gateway proof, but the unavailable required-check logs prevent safely classifying the current merge blocker.

Before merge

  • Complete next step (P2) - A maintainer must inspect the unavailable exact-head check failures before normal merge handling can continue.
Agent review details

Security

None.

PR surface

Source +99, Docs +8. Total +107 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 99 0 +99
Tests 0 0 0 0
Docs 1 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 107 0 +107

Review metrics

Metric Value Why it matters
Production versus test delta production +16, tests +83, docs +8 The small production increase is justified by a registration-boundary diagnostic, with focused coverage for typed and legacy event names.

Stored data model

Persistent data-model change detected: persistent cache schema: src/plugins/loader.registration.test-utils.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #116965
Summary: This PR is a candidate diagnostic mitigation for the canonical legacy-registration versus typed-dispatch issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

  • The exact current head is merge-blocked by five failed required checks; their logs could not be retrieved because the GitHub API and promisor remote were unreachable, so patch attribution remains unproven.

Maintainer options:

  1. Decide the mitigation before merge
    Land the diagnostic only after the exact-head failures are understood or pass, while retaining api.on(...) as the canonical typed lifecycle API and keeping legacy dispatch separate.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the diagnostic only after the exact-head failures are understood or pass, while retaining api.on(...) as the canonical typed lifecycle API and keeping legacy dispatch separate.

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

Yes—current source proves that legacy registrations and typed dispatch use separate stores, and the PR body supplies an after-fix real gateway transcript using a plugin with the affected call.

Is this the best way to solve the issue?

Yes for the stated silent-failure problem: warning at the legacy registrar is the narrowest maintainable repair because bridging legacy handlers into typed dispatch would change their incompatible decision contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ec023a433614.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P1: The PR addresses a plugin path that can otherwise report loaded while a requested lifecycle handler never runs.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The PR body includes an after-fix development-gateway log from a real plugin registering before_tool_call through the legacy API and receiving the intended warning.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes an after-fix development-gateway log from a real plugin registering before_tool_call through the legacy API and receiving the intended warning.

Evidence

What I checked:

  • Exact merge surface: The reviewed head is a merge of the prior reviewed patch with current main; its diff against current main contains only the stated warning, tests, and documentation. (src/plugins/registry-registrars-tools-hooks.ts:315, dd32a0d4ae26)
  • Separate dispatch contracts: Legacy registration writes legacyInternalHooks, whereas typed api.on writes typedHooks and the typed runner selects only typedHooks; a warning at legacy registration is the correct owner boundary. (src/plugins/registry-registrars-tools-hooks.ts:366, ec023a433614)
  • Regression coverage: The PR verifies both per-event warnings and unchanged registration for legacy type:action events; existing typed-hook tests cover api.on storage and execution separately. (src/plugins/loader.registration.test-utils.ts:119, dd32a0d4ae26)
  • History boundary: Merged PR 117372 moved legacy-hook storage into the registry but left the typed selector byte-identical, so it is not direct regression provenance for this mismatch. (src/plugins/hooks.ts:263, e4d1b7e0d38c)
  • Current-head gate: The supplied current-head rollup reports five failed required checks, including dependency, test-type, two compact-node shards, and ci-gate; DNS failure prevented inspecting their logs. (dd32a0d4ae26)

Likely related people:

  • steipete: Authored merged PR 117372 and has the strongest available history signal across the registry and hook-dispatch files. (role: registry refactor author and central feature-history contributor; confidence: high; commits: e4d1b7e0d38c; files: src/plugins/registry-registrars-tools-hooks.ts, src/plugins/hooks.ts, src/plugins/legacy-internal-hook-state.ts)
  • Vincent Koc: Shortlog shows substantial contribution history across the central registrar, typed runner, and legacy hook-state files. (role: shared area contributor; confidence: medium; files: src/plugins/registry-registrars-tools-hooks.ts, src/plugins/hooks.ts, src/plugins/legacy-internal-hook-state.ts)
  • Patrick-Erichsen: The PR timeline assigns Patrick-Erichsen and the exact head merge synchronizing main was authored by them. (role: assigned reviewer and current-head integrator; confidence: medium; commits: dd32a0d4ae26; files: src/plugins/registry-registrars-tools-hooks.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Diagnose and rerun the five failed required checks against dd32a0d.

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 (6 earlier review cycles)
  • reviewed 2026-08-03T09:07:41.430Z sha 058c403e32e75020705648ab55bdce5d046d130d :: needs changes before merge. :: [P1] Point typed-hook users to the public api.on API
  • reviewed 2026-08-03T09:34:07.672Z sha 981aab1 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-03T22:26:49.162Z sha 981aab1 :: needs changes before merge. :: [P3] Use the public API in the inline comment
  • reviewed 2026-08-03T23:18:41.524Z sha 981aab1 :: needs changes before merge. :: [P3] Point the inline comment at the public API
  • reviewed 2026-08-04T03:25:10.721Z sha d1ebc86 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-05T09:48:19.560Z sha d1ebc86 :: needs maintainer review before merge. :: none

@SunnyShu0925
SunnyShu0925 force-pushed the fix/hook-migration-diagnostic-116965 branch from 058c403 to 450a820 Compare August 3, 2026 09:21
api.registerHook registers into the legacy internal-hook path, while typed
lifecycle events (before_tool_call, message_received, ...) are dispatched
exclusively by the typed hook runner. Registrations under typed names
silently never fired since openclaw#117372 moved the write to legacyInternalHooks.
Emit a registration diagnostic pointing to the public api.on(...) API so
plugin authors see the no-op at load time instead of trusting a false
"loaded".

Related to openclaw#116965

Co-Authored-By: deepseek-v4-flash <[email protected]>
@SunnyShu0925
SunnyShu0925 force-pushed the fix/hook-migration-diagnostic-116965 branch from 450a820 to 981aab1 Compare August 3, 2026 09:28
@clawsweeper clawsweeper Bot added 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 3, 2026
Condense the inline comment in createToolHookRegistrars and replace the
internal registerTypedHook migration reference with the public api.on(...)
API, matching the emitted warning and hooks docs. Behavior and tests
unchanged.
@SunnyShu0925

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 4, 2026
@Patrick-Erichsen Patrick-Erichsen self-assigned this Aug 6, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Aug 7, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@Patrick-Erichsen Patrick-Erichsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved for landing at exact head 6cde47609551dbe3f2fe8ea3825495d76f96f2f5.

Remaining mechanical gate: the queued ClawSweeper refresh must finish on this exact head, then the repository-native prepare/merge guards will run.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@Patrick-Erichsen
Patrick-Erichsen merged commit 4d87263 into openclaw:main Aug 7, 2026
122 checks passed
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit to VACInc/openclaw that referenced this pull request Aug 7, 2026
* origin/main: (58 commits)
  fix(test): restart shared gateway after migration convergence (openclaw#120089)
  fix(ui): make active-run steering reliable (openclaw#120083)
  fix(telegram): preserve voice fallback text
  test(swift): preserve queued websocket frames (openclaw#120106)
  fix: reject missing oxlint shard selectors (openclaw#120096)
  test(channels): align prerelease fallback catalog spec (openclaw#120092)
  fix(node-cli): warn when systemd user lingering is disabled after install (openclaw#118430)
  fix(diagnostics): preserve CLI turn usage totals (openclaw#120100)
  fix(gateway): derive lock and coordinator paths from the resolved state dir (openclaw#120110)
  fix(release): isolate private Telegram QA harness (openclaw#120088)
  test(agents): exercise execution attribution ingress guard
  fix(gateway): defer attribution until admission succeeds
  refactor(agents): centralize exact execution attribution
  fix(google): accept base64url provider media (openclaw#116204)
  fix(plugins): warn when registerHook uses a typed hook event name (openclaw#118601)
  fix(canvas): serve Content-Length on A2UI HEAD responses (openclaw#117961)
  fix(gateway): make doctor dreaming timestamp comparators NaN-safe (openclaw#118749)
  fix(heartbeat): explain target-none skips (openclaw#119689)
  fix(security): stop recommending retired install-policy bypasses (openclaw#120011)
  fix(plugins): preserve startup release during repair (openclaw#120085)
  ...

# Conflicts:
#	CHANGELOG.md
#	src/config/sessions/session-accessor.sqlite-transcript-write.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 7, 2026
…enclaw#118601)

* [AI] fix(plugins): warn when registerHook uses a typed hook event name

api.registerHook registers into the legacy internal-hook path, while typed
lifecycle events (before_tool_call, message_received, ...) are dispatched
exclusively by the typed hook runner. Registrations under typed names
silently never fired since openclaw#117372 moved the write to legacyInternalHooks.
Emit a registration diagnostic pointing to the public api.on(...) API so
plugin authors see the no-op at load time instead of trusting a false
"loaded".

Related to openclaw#116965

Co-Authored-By: deepseek-v4-flash <[email protected]>

* [AI] fix(plugins): point registerHook comment at public api.on API

Condense the inline comment in createToolHookRegistrars and replace the
internal registerTypedHook migration reference with the public api.on(...)
API, matching the emitted warning and hooks docs. Behavior and tests
unchanged.

---------

Co-authored-by: deepseek-v4-flash <[email protected]>
Co-authored-by: Patrick Erichsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants