Skip to content

fix(tlon): require approval before responding in group DMs - #202775

Merged
joshavant merged 8 commits into
mainfrom
fix/tlon-club-policy
Nov 23, 2026
Merged

joshavant merged 8 commits into
mainfrom
fix/tlon-club-policy

Conversation

@joshavant

@joshavant joshavant commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Tlon group DM messages carry author claims that the Tlon transport does not authenticate. OpenClaw could treat a claimed ship in a group DM as if it matched the verified 1:1 DM allowlist, admitting unapproved input to the agent.

User Impact

User impact: the owner enables a group DM once per club by default, then the agent can respond automatically in that club. Operators can require approval for each message, disable clubs, or allow and deny specific club IDs. Existing clubs need one-time enablement after upgrade; claimed authors and legacy approvals do not grant standing access.

Why This Change Was Made

Club admission now depends on the club's own policy and recorded decision. Claimed participants never provide owner or command authority. Approved club messages use a club-specific group session, and replies return to the club. The change also decodes Tlon's wrapped settings events so saved decisions work across restarts.

Enabling a club accepts unverified input delivered under that club ID with the agent's ordinary permitted tools. It does not authenticate the author or membership; the owner prompt and Tlon docs explain that tradeoff.

This is a replacement for #196109. Thanks to @mmaps for identifying the group DM author-claim boundary and preparing the first fix. This version keeps approval friction to once per club by default and adds explicit stricter modes and club reply routing.

Evidence

  • The two regression cases failed on the base and pass with this change: an allowlisted claimed author cannot admit an unknown club, and a club turn uses a group route rather than the claimed author's direct route.
  • In an isolated Gateway with a real model, a bot-side Tlon club event claiming allowlisted ~nec produced one owner prompt and no agent turn. A verified ~bus DM approved the club; the saved message ran through the model, which read a proof file and replied inside the club. A later message claiming the owner received an automatic club reply without another prompt. After Gateway restart, the saved club rule still allowed an automatic reply.
  • Upgrade check: the published @openclaw/[email protected] plugin created a legacy pending club request in isolated ship state. The replacement plugin loaded it; owner approval replayed the saved message without adding the claimed ship to the DM allowlist or enabling the club. The next message prompted for a new club decision.
  • Startup persistence check: with no saved club rules, an explicit file-config allow rule migrated into the real Urbit settings store as a JSON string. A regression test failed before this serialization repair and passes after it.
  • All 322 Tlon tests in 35 files passed on merged current main. After the final test-file split and direct-settings compatibility repair, the affected tests (47 sender/monitor cases and 5 settings cases), Tlon production and test typechecks, lint, format, the assertion-safety ratchet, and diff whitespace checks pass. Docs MDX/config examples/internal links also pass.
  • The generated config baseline records six intentional Tlon schema paths for club policy and rules at the channel and account levels. Relative to current main, core and plugin counts are unchanged; pnpm config:docs:check passes. The merged current-main tree also passes all 322 Tlon tests and the Tlon production typecheck.
  • CI on current head 7f3e790c331 passes openclaw/ci-gate, the assertion-safety and config baselines, docs, Tlon changed-code checks, security checks, and Control UI e2e. No required check failed. An earlier assertion-safety failure on 33be0deafbc was repaired by using the existing record parser and shrinking the per-file allowance from 7 to 5.
  • Local autoreview of the complete staged source change against base 053fb62c reported scoped-clean for P0–P2 with no actionable finding at b293ba33. The later commits add generated baseline files and merge current main; the Tlon source patch is unchanged. Its assessment covered the supplied patch, not a live Tlon round trip.
  • Local ClawSweeper reviewed the final committed range 461b02a48f5..7f3e790c331: review_status: complete, patch correct, no code findings, security cleared. Its initial compatibility finding led to retaining the prior direct settings event shape alongside Tlon's wrapped events, with a focused regression test. The local-range reviewer did not receive the PR's live and upgrade evidence, which is recorded here; the default policy was approved for this work by the requesting maintainer.
  • Authenticated remote ingress proof: a test-only Gall agent on isolated fake ~ten sent a native remote %chat-club-action poke over Ames to fake ~zod, claiming author ~nec. The remote poke was acknowledged and ~zod stored the club message. The isolated Gateway emitted one approval prompt to verified ~ten DM and no agent turn before approval. After that DM approved the club, the real model read a proof file and replied papaya into ~zod's club. A second remotely delivered message claiming owner ~ten received an automatic club reply without another approval prompt; saved clubRules contains the allow rule and no pending approval.
  • Tlon transport diagnosis: fresh non-fake comets on the same released %groups desk hash (a6eta) exchanged Ames |hi and a direct DM invitation, but stock club creates remained local. Verbose Gall tracing showed no outgoing peer poke. A temporary %chat trace confirmed that club gossip selected the peer but its final card list omitted the remote poke. In the disposable VM only, changing =. cor (emil (gossip:cu-pass diff)) to =. cor.nu-core (emil:cor.nu-core (gossip:cu-pass:nu-core diff)) retained the gossip cards. Before the local Tlon correction, the peer's club list stayed empty; afterward, a new invite reached it and a peer message reached the creator. The test desks retain only that one-line correction, with trace prints removed. Neither Git repository was changed by this investigation.
  • Full remote round trip on the locally repaired Tlon desks: an isolated Gateway running this PR on the peer comet received a real club message from the other comet claiming allowlisted author ~nec. It saved one club approval request and sent one prompt to the verified owner's DM, without starting an agent turn. The owner approved by verified DM. The real openai/gpt-4.1-mini agent used its read tool on proof-input.txt and replied quince; both ships' club histories contained the reply. A second club message claiming to be the owner received an automatic second-turn-ok reply on both ships, without another owner DM. The persisted Tlon settings have clubRules allowing only that club and no pending approval; OpenClaw stored one tlon:group:club:0vp.abcde session. Stock Tlon club gossip remains broken on the tested desk, so this proof depends on the isolated one-line Tlon repair.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: tlon Channel integration: tlon size: L labels Nov 20, 2026
@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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 20, 2026
@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head e07a762a4c441fb15906117edbcd5817da2ac491, but the PR head is now dfc6c43b24ae80f0818d689a853fdbf930d04fa8. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-20T23:30:30.461Z sha e07a762 :: blocked before merge. :: [P2] JSON-encode club rules during startup migration

@joshavant

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@joshavant
joshavant requested a review from a team November 20, 2026 23:44
@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@joshavant
joshavant marked this pull request as ready for review November 20, 2026 23:45
@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 21, 2026
# Conflicts:
#	docs/.generated/config-baseline.counts.json
#	docs/.generated/config-baseline.sha256
@joshavant
joshavant merged commit 6eb70d4 into main Nov 23, 2026
146 checks passed
@joshavant
joshavant deleted the fix/tlon-club-policy branch November 23, 2026 01:27
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 23, 2026
…202775)

* fix(tlon): gate group DMs by club approval

* fix(tlon): persist configured club grants

* docs(config): record Tlon club policy surface

* test(tlon): keep sender role cases under lint limit

* fix(tlon): preserve direct settings events

* fix(tlon): narrow settings event records without assertions
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
* fix(tlon): gate group DMs by club approval

* fix(tlon): persist configured club grants

* docs(config): record Tlon club policy surface

* test(tlon): keep sender role cases under lint limit

* fix(tlon): preserve direct settings events

* fix(tlon): narrow settings event records without assertions

(cherry picked from commit 6eb70d4)

Release adaptation: regenerate stable config docs counts/hashes and bundled channel metadata; no source conflicts. Channel count +6, core/plugin unchanged. The assertion ratchet generator confirms the same Tlon-only shrink; unrelated pre-existing UI ratchet entries are excluded.

Companion disposition: #204126 is a missing optional user-facing warning about later club invitees; existing prompts already disclose unverified participant input and future messages. #203928 is not applicable to approval/routing, only image download lifetime. #204219, #203470, #203901 and #203063 overlap only generated/ratchet files, not applicable; regenerate from stable inputs. No later PR or commit-SHA mentions.

Co-authored-by: RomneyDa <[email protected]>
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 P1 High-priority user-facing bug, regression, or broken workflow. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant