Skip to content

fix(tlon): require approval for group DM author claims - #196109

Draft
mmaps wants to merge 5 commits into
openclaw:mainfrom
mmaps:maintenance/update-20261109-161545-3ee55a
Draft

mmaps wants to merge 5 commits into
openclaw:mainfrom
mmaps:maintenance/update-20261109-161545-3ee55a

Conversation

@mmaps

@mmaps mmaps commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What problem this solves

A Tlon group DM could reach an agent without owner approval when its unverified author claim matched a ship in dmAllowlist. Approving a group request also granted that claimed ship direct-DM access, while blocking it could block the claimed ship. An owner change during in-flight work could leave the former owner's decision active; wrapped settings events prevented live owner updates.

Behavior

  • Every group DM message requires explicit owner approval, including claims from directly allowlisted ships. An approved saved message replays once with a club-scoped ordinary-user identity; the next message requires a new approval.
  • Approving or blocking a group request does not change direct-DM access or the native ship block list. A group request claiming the owner has no saved text to replay, so approval only dismisses it.
  • Verified 1:1 DMs retain their allowlist and native block behavior. Older pending DM records without provenance retain their documented allowlist update, but their saved messages are not replayed.
  • Approval, admin, and message paths recheck the current owner before final effects. Wrapped settings events now apply live updates. No new settings or storage were added.

Evidence

The same production monitor scenario ran on the base and current head 798b474f5594deb02435786483dddf5c20ad1e1d:

Input Base Current head
Group message claiming an allowlisted author, without approval 1 agent dispatch; 0 pending approvals 0 agent dispatches; 1 pending approval
Verified direct-DM control 1 agent dispatch 1 agent dispatch

In an isolated current-head Gateway connected to local Urbit ships and a scripted model, an authenticated bot-side group event queued approval with no model call. Exact owner approval replayed the saved message once and produced a real outbound DM reply, while the canonical direct allowlist stayed empty. A later real direct DM from the claimed ship queued its own verified request with no additional model call. Group block dismissed only the group request and left the native block list empty; direct block changed that list and was then undone. A live owner change reached the Gateway and prevented the former owner's approval from acting on a pending request.

An isolated upgrade from OpenClaw/Tlon 2026.11.2 to this head passed Doctor and preserved the configured owner, empty direct allowlist, one pending verified direct-DM request, and eight completed ingress rows. Approving that saved direct request after startup replayed it once and added its ship to the direct allowlist. An archived cron partition warning in the fixture did not affect Tlon.

Four affected Tlon suites passed 37 tests. The group decision regressions failed on the prior head and passed here. Targeted Tlon typecheck, lint, formatting, and whitespace checks passed. The base/head behavior attestation passed. GitHub CI passed the Tlon checks and test-line ratchet. Its core lint shard failed on ui/src/e2e/sidebar-rail-alignment.e2e.test.ts:201, an unchanged line present on current main; the aggregate CI gates failed downstream. The repository Security Review workflow passed, and a current-head differential review found no actionable source finding.

Remote ship-to-ship group delivery did not reach the bot in this lab, so the group observations begin at the bot ship's real chat ingress. The model endpoint was a local scripted fixture.

@clawsweeper

clawsweeper Bot commented Nov 9, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR requires approval for each unverified Tlon group-DM message, isolates group decisions from direct-DM access, and rechecks owner authority before replay.

Example: A group-DM member claims to be ~bus while ~bus is directly allowlisted.

  • Before: The message reaches the agent without owner approval.
  • After: The message queues approval; approving it permits one ordinary-user replay without granting direct-DM access.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful security repair with production-entry-point observations and stable-upgrade coverage; inherited CI remains a landing constraint.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Supplied current-head Gateway observations exercise real local Urbit ingress, zero model calls for unapproved claims, an approved replay with outbound reply, independent direct-DM admission, group/direct block isolation, and rejection of a former owner's decision after reassignment; remote club gossip was not observed and the model was scripted.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An unverified group author can trigger agent work as an allowlisted claim, and a group approval can accidentally change the claimed ship's direct access.
Reason: The stated maintainer-authored direction accepts per-message approval to close the documented trust gap while retaining verified direct-DM behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR addresses a current Tlon admission gap, and no actionable introduced defect was found; CI remains blocked by inherited lint failures.

Priority: P1
Reviewed head: 798b474f5594deb02435786483dddf5c20ad1e1d

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Tlon monitor receives authenticated Urbit chat events, distinguishes verified direct peers from unverified group authors, and routes admitted messages through the existing approval and agent-dispatch owners.

flowchart TD
  A[Urbit chat event] --> B[Tlon monitor]
  B --> C[Verified direct peer]
  B --> D[Unverified group claim]
  C --> E[Direct admission policy]
  D --> F[Owner approval queue]
  F --> G[Current owner check]
  E --> H[Agent dispatch]
  G --> H
Loading

Technical review

Best possible solution:

Land the focused repair through the existing approval and dispatch owners once the inherited CI gate is handled under repository policy.

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

Current-main source admits club claims matching dmAllowlist, and the supplied base/head observation records one unapproved dispatch before the fix versus none afterward; no target code was executed during this review.

Is this the best way to solve the issue?

The patch repairs admission and decision effects in their existing owners, preserves verified direct-DM behavior, and carries live owner checks to dispatch without unnecessary new machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned PR scope: Reviewed the introduced merge-base-to-head diff; unrelated endpoint drift was excluded. (798b474f5594)
  • Current main retains the admission gap: Main still admits a club-scoped identity when its claimed ship matches dmAllowlist; this PR instead supplies an empty group-DM allowlist. (extensions/tlon/src/monitor/index.ts:261, b09f5e652128)
  • Group decisions preserve verified-ship access: Club approvals bypass direct allowlist writes, and club block decisions bypass the native ship-block operation. (extensions/tlon/src/monitor/approval-runtime.ts:243, 798b474f5594)
  • Accepted behavior change: The maintainer-authored direction explicitly replaces previously admitted group claims with per-message approval and documents the no-owner drop behavior in the Tlon guide. (docs/channels/tlon.md:225, 798b474f5594)
  • Behavior and upgrade observations: The current-head body records an isolated Gateway with real local Urbit ships: rejected unapproved claims, approved replay and outbound reply, separate direct-DM admission, block isolation, owner reassignment rejection, and a v2026.11.2 upgrade preserving settings and ingress records. (798b474f5594)
  • Inherited CI failure: The PR lint job reports file-length failures also present in the main lint job; its additional Tlon index.test.ts violation concerns a file unchanged by this PR. These annotations differ from the sidebar-line failure described in the body. Full job-log retrieval was blocked by the artifact-host allowlist. (extensions/tlon/src/monitor/index.test.ts:1103, 798b474f5594)

Likely related people:

  • Peter Steinberger: Raw commit b86bc9d adds extensions/tlon/src/monitor/approval-runtime.ts:21 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b86bc9de95d0; files: extensions/tlon/src/monitor/approval-runtime.ts)

PR surface

Source +47, Tests +127, Docs +5, Other +2. Total +181 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 73 26 +47
Tests 4 160 33 +127
Docs 1 7 2 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 10 242 61 +181

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test changes Production +73/-26 lines; tests +160/-33 lines Growth covers group-decision isolation, live settings events, and distinct owner-reassignment boundaries without adding another state owner.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: Unverified group authors can currently bypass intended admission by claiming an allowlisted ship and trigger agent work.
  • merge-risk: 🚨 compatibility: Previously admitted group-DM messages now require individual approval; the maintainer-authored direction accepts this documented restriction and supplies upgrade evidence.
  • merge-risk: 🚨 security-boundary: The patch changes admission and approval authority; supplied allowed, forbidden, and owner-reassignment observations cover the changed boundary.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-09T16:40:12.884Z sha 69f99d6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-09T19:10:29.357Z sha 39119d0 :: needs maintainer review before merge. :: none

Reviewed November 9, 2026, 4:34 PM ET / 21:34 UTC (Revision 3).

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: tlon Channel integration: tlon size: M labels Nov 9, 2026
@mmaps

mmaps commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed 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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Nov 9, 2026
@mmaps

mmaps commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Verification before merge:

Behavior addressed: Tlon group-DM author claims now require owner approval for each message. Approving or blocking one group request no longer changes the claimed ship's direct-DM or native block state, and owner changes are rechecked before effects.

Real environment tested: an isolated current-head Gateway connected to local Urbit ships and a scripted model; a stable OpenClaw/Tlon 2026.11.2 state upgrade rehearsal; and GitHub Actions on head 798b474f5594deb02435786483dddf5c20ad1e1d.

Exact steps or commands run after this patch:

  • pnpm test extensions/tlon/src/monitor/index.club-sender.test.ts extensions/tlon/src/monitor/approval-runtime.test.ts extensions/tlon/src/monitor/approval.test.ts extensions/tlon/src/settings.test.ts --maxWorkers=1
  • node scripts/run-tsgo.mjs -p extensions/tlon/tsconfig.json
  • git diff --check

Evidence after fix:

  • Four affected suites passed 37 tests. Targeted Tlon lint and format passed. The test-line ratchet and Tlon CI checks passed. Validation dry-run and final validation both passed.
  • The same production-monitor scenario dispatched an unapproved group claim once on the base and zero times on this head, which queued an approval. A verified direct-DM control dispatched once on both revisions.
  • On this head, a real bot-side Urbit group event made no model request before approval. Exact owner approval replayed its saved message once and produced an outbound DM reply without changing the direct allowlist. A later genuine direct DM from the claimed ship required its own approval and made no additional model request. Group block left the native block list empty; direct block changed it and was then undone. A live owner change prevented the former owner's approval from acting.
  • The stable upgrade preserved the owner, empty direct allowlist, one pending verified direct request, and eight completed ingress rows. Approving that saved request after startup replayed once and added its ship to the direct allowlist.
  • ClawSweeper's current-head review scored overall readiness 4/6, proof confidence 4/6, and patch quality 4/6, with no Before merge items or findings.
  • Exact-head CI completed with 41 passing, 53 skipped, and three failed checks. The root failure is ui/src/e2e/sidebar-rail-alignment.e2e.test.ts:201 (no-shadow) on an unchanged line present on current main; both CI gate failures follow that lint shard. The PR remains blocked by that inherited check.

Observed result after fix: a group approval affects only its saved message; a claimed ship gets no direct access or native block effect from that decision.

What was not tested: remote ship-to-ship group delivery did not reach the bot in the local lab, so group observations begin at the bot ship's real chat ingress. The model endpoint was scripted. The upgrade used Doctor and Gateway on a verified stable-state copy, rather than the installed updater.

Regression Risk: Medium. Per-message approval changes group-DM admission; direct and legacy approvals, block behavior, owner reassignment, live replay, and stable-state loading were checked.

Best fix verdict: Appropriate. The existing approval owner now keeps group decisions scoped to the pending message without new configuration or storage.

User behavior change: Group-DM messages need individual owner approval. Approving or blocking one group message does not grant direct-DM access or native-block its claimed author; verified direct DMs retain their allowlist and block behavior.

@mmaps

mmaps commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@mmaps
mmaps marked this pull request as draft November 9, 2026 22:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: tlon Channel integration: tlon docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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