Skip to content

fix(openclaw): quiet duplicate typed hook timeouts#353

Open
Jurij89 wants to merge 1 commit intomainfrom
codex/338-openclaw-typed-hook-install-guard
Open

fix(openclaw): quiet duplicate typed hook timeouts#353
Jurij89 wants to merge 1 commit intomainfrom
codex/338-openclaw-typed-hook-install-guard

Conversation

@Jurij89
Copy link
Copy Markdown
Contributor

@Jurij89 Jurij89 commented Apr 30, 2026

Summary

  • Preserve per-API typed hook installs so before_prompt_build and agent_end remain reachable across OpenClaw multi-phase registries.
  • Add aggregate-aware typed hook commitment so sibling surfaces that see the same typed event fire elsewhere commit quietly instead of emitting duplicate commit-by-timeout warnings.
  • Keep frequent hooks frequent, keep rare-fire treatment limited to rare hooks, and keep typed install failures warning-level.

Related

Files changed

File What
packages/adapter-openclaw/src/DkgNodePlugin.ts Records typed hook fire generations with return-preserving wrappers and passes per-install peer-fire observation callbacks.
packages/adapter-openclaw/src/HookSurface.ts Adds committed-by-peer-fire timeout commitment for typed hooks observed on sibling retained surfaces.
packages/adapter-openclaw/test/plugin.test.ts Adds regression coverage for multi-phase duplicate timeout suppression, typed install failure warnings, setup-runtime retry coverage, and typed rare-fire assertions.

Test plan

  • pnpm install --frozen-lockfile
  • pnpm --filter @origintrail-official/dkg-core build
  • pnpm --filter @origintrail-official/dkg-adapter-openclaw test -- test/plugin.test.ts -t T338|T6|T31|T59|rare-fire
  • pnpm --filter @origintrail-official/dkg-adapter-openclaw exec vitest run test/plugin.test.ts test/HookSurface.test.ts
  • pnpm --filter @origintrail-official/dkg-adapter-openclaw run build
  • pnpm --filter @origintrail-official/dkg-adapter-openclaw exec vitest run test/before-prompt-build-hook.test.ts test/ChatTurnWriter.test.ts
  • pnpm build:runtime
  • git diff --check

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Codex review completed — no issues found.

@Jurij89
Copy link
Copy Markdown
Contributor Author

Jurij89 commented Apr 30, 2026

CI/review sweep after the PR Driver wait:

  • Codex PR Review and Knip passed; there are no unresolved review threads.
  • The repo-wide CI workflow is red, but the failures I inspected are outside this PR's adapter-openclaw change set. Examples include network-sim tests explicitly named as current parity/seeded-RNG failures, agent endorsement/signature A-7 tests marked as currently failing in the suite, CLI daemon/auth/keystore failures, and storage/publisher shards. The Build packages job passed, and the local OpenClaw-focused verification listed in the PR body passed.

I'm leaving the failures classified as unrelated to #338 rather than broadening this PR into unrelated package fixes.

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.

adapter-openclaw: typed hook commit-by-timeout warns fire 2× on multi-phase init even when hooks are active

1 participant