Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.

Refactor XMTP Extension And Fix Bugs#27

Draft
neekolas wants to merge 12 commits into
02-15-add_ens_resolutionfrom
02-16-refactor_xmtp_module
Draft

Refactor XMTP Extension And Fix Bugs#27
neekolas wants to merge 12 commits into
02-15-add_ens_resolutionfrom
02-16-refactor_xmtp_module

Conversation

@neekolas
Copy link
Copy Markdown

@neekolas neekolas commented Feb 16, 2026

Summary

  • Problem: The XMTP extension had code duplication and inconsistent access control enforcement across different message types
  • Why it matters: Duplicated logic increases maintenance burden and risk of inconsistencies
  • What changed: Refactored code to centralize access control, improve ENS resolution, and consolidate handler logic with shared patterns
  • Fixed a number of bugs with media uploads and reactions

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

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

Linked Issue/PR

  • Related #

User-visible / Behavior Changes

None

Security Impact (required)

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

Repro + Verification

Environment

  • OS: Linux
  • Runtime/container: Node.js
  • Integration/channel: XMTP

Steps

  1. Configure XMTP extension with various access control policies
  2. Send messages, reactions, and attachments to test access control
  3. Verify all handlers enforce the same policies consistently

Expected

  • All message types (text, reactions, attachments) enforce the same access control rules
  • Code is more maintainable with less duplication

Actual

  • Access control is consistently applied across all message types
  • Code is more maintainable with shared patterns

Evidence

  • Passing tests

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: All tests pass with refactored code
  • Edge cases checked: Various access control combinations
  • What you did not verify: End-to-end testing with real XMTP network

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: Revert the PR
  • Files/config to restore: N/A
  • Known bad symptoms reviewers should watch for: Access control not being applied correctly

Risks and Mitigations

  • Risk: Refactoring could introduce subtle bugs in access control logic
    • Mitigation: Comprehensive test coverage maintained and expanded

Copy link
Copy Markdown
Author

neekolas commented Feb 16, 2026

@macroscopeapp
Copy link
Copy Markdown

macroscopeapp Bot commented Feb 16, 2026

Refactor XMTP plugin to validate config with XMTPConfigSchema, centralize inbound access control via lib/access-control.enforceInboundAccessControl, and unify identity and ENS owner resolution using lib/identity.generateXmtpIdentity and lib/ens-resolver.resolveOwnerAddress

Add schema-backed config to the XMTP plugin, route all inbound gating through a single utility, and consolidate identity and ENS resolution helpers. Update outbound and actions to use a shared getOrCreateConversation. Expand tests with parameterized cases and shared mocks. Introduce a barrel export for public lib APIs.

📍Where to Start

Start with enforceInboundAccessControl in access-control.ts, then review handler integration in gateway-lifecycle.ts and channel handlers in channel.ts.


Macroscope summarized 3413507. (Automatic summaries will resume when PR exits draft mode or review begins).

@github-actions
Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

1 similar comment
@github-actions
Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@neekolas neekolas force-pushed the 02-16-refactor_xmtp_module branch from fa7821b to 2a564f9 Compare February 16, 2026 21:28
@neekolas neekolas changed the title Refactor Refactor XMTP Extension Feb 16, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@github-actions
Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

@neekolas neekolas changed the title Refactor XMTP Extension Refactor XMTP Extension And Fix Bugs Feb 17, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant