Skip to content

[codex] Wire OpenClaw queue hooks into bridge - #77

Merged
HyperdustLabs merged 4 commits into
mainfrom
codex/openclaw-queue-hooks
May 21, 2026
Merged

[codex] Wire OpenClaw queue hooks into bridge#77
HyperdustLabs merged 4 commits into
mainfrom
codex/openclaw-queue-hooks

Conversation

@HyperdustLabs

@HyperdustLabs HyperdustLabs commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire OpenClaw fork native queue_before_enqueue / queue_after_enqueue into the bridge as queue.before_enqueue / queue.after_enqueue with sync block and prompt/summary rewrite (queue_guard).
  • Add example 09 dogfood (RPC smoke + live tests via gateway call chat.send), fork alignment scripts, and runtime weave tests.
  • Emit observe joinpoints from onAgentEvent: command.output_stream, patch.summary_created, error.detected; bind before_agent_run observe on input.received.
  • Docs: decision vs observe table, fork hook backlog, pre-flight checklist (allowConversationAccess, fork 1:1).

Commits (4)

  1. feat: wire OpenClaw queue hooks into bridge — bridge + runtime catalog
  2. docs: add queue hook dogfood example and fork dev helpers
  3. feat(bridge): emit observe joinpoints from agent events
  4. chore: bridge-only plan wrap-up — ruff format, docs, before_agent_run observe

Test plan

  • cd integrations/openclaw-opencoat-bridge && npm test
  • uv run python -m pytest -q packages/opencoat-runtime/tests/core/test_joinpoint_aliases.py packages/opencoat-runtime/tests/core/test_queue_joinpoint_weave.py
  • uv run ruff format --check . (fixes format on test_queue_joinpoint_weave.py)
  • ./scripts/check-openclaw-fork.sh
  • ./examples/09_queue_hook_dogfood/scripts/smoke-rpc.sh all
  • ./examples/09_queue_hook_dogfood/scripts/live-queue-block-test.sh
  • ./examples/09_queue_hook_dogfood/scripts/live-queue-rewrite-test.sh prompt
  • ./examples/09_queue_hook_dogfood/scripts/live-queue-rewrite-test.sh summary

Requires OpenClaw fork opencoat/hooks-v0.1 (not npm registry). See docs/guides/openclaw-fork-dev.md.

moss and others added 4 commits May 20, 2026 14:54
Ship example 09 (RPC smoke + live block via chat.send), runtime weave tests,
and scripts/docs for OpenClaw fork 1:1 alignment with queue hook validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire command.output_stream, patch.summary_created, and error.detected
via runtime observers; add live queue rewrite dogfood scripts and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix ruff format on queue weave tests; document decision vs observe paths;
add fork hook backlog; bind before_agent_run observe; expand bridge checklist.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HyperdustLabs
HyperdustLabs marked this pull request as ready for review May 21, 2026 16:51
@HyperdustLabs
HyperdustLabs merged commit c3092e9 into main May 21, 2026
4 checks passed
@HyperdustLabs
HyperdustLabs deleted the codex/openclaw-queue-hooks branch May 21, 2026 16:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89256b1292

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +147 to +150
if (!isQueueTarget(row.target) && !BLOCK_MODES.has(row.mode)) continue;

if (BLOCK_MODES.has(row.mode)) {
decision.block = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict queue vetoes to queue-scoped advice targets

The queue guard currently blocks enqueue on any block/suppress/escalate row, even when the advice target is not queue.*. With the current predicate, a concern matching queue.before_enqueue that contains a non-queue blocking advice (for example, a runtime prompt target) will still set block: true and drop the follow-up enqueue. This is broader than the documented queue mapping and can cause unintended queue drops when mixed-target advice is present.

Useful? React with 👍 / 👎.

Comment on lines +73 to +76
case "patch":
return {
name: "patch.summary_created",
payload: { run_id: evt.runId, stream: evt.stream, ...data },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Emit patch.summary_created only for summary-phase patch events

This maps every stream: "patch" agent event to patch.summary_created without checking whether a summary was actually produced. If the patch stream emits non-summary phases (e.g., start/delta/update events), pointcuts and DCN activations tied to patch.summary_created will fire early and multiple times, which mislabels the lifecycle and can trigger policies on incomplete patch output.

Useful? React with 👍 / 👎.

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.

1 participant