Repository navigation
fix(line): keep doctor from granting unintended group access - #147135
Conversation
(cherry picked from commit 8440814)
…verage The warning adapter read raw group entries, so it missed two shapes the runtime honors: a group whose own empty allowFrom overrides the defaults entry and the channel-wide list, and a group disabled through the defaults entry. Merge the defaults node the way admission does, and point the operator at the remedy that actually applies to each case. (cherry picked from commit c1b93d6)
An empty list inherited from the defaults entry or the channel-wide list was reported as the group's own override, so the remedy pointed at a key the group does not have. Resolve the allowlist together with its source and address the warning to the key that actually supplies it. (cherry picked from commit e212e33)
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 12:14 PM ET / 16:14 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR prevents Doctor from copying LINE direct-message permissions into group permissions and adds group-specific warnings and CLI regression coverage. Merge readiness✅ Ready for maintainer review The defect remains on current main, and this PR is a supported fix with no blocking findings. The linked published-driver evidence addresses the previous upgrade-proof concern. Priority: P0 Review scores
Verification
How this fits togetherDoctor reads channel metadata to decide which configuration repairs are safe. LINE’s metadata and warning adapter connect those repairs to the permissions its incoming-message handler actually enforces. flowchart TD
A[Operator configuration] --> B[Doctor]
C[LINE capability metadata] --> B
B --> D[Skip DM permission promotion]
A --> E[LINE group warning adapter]
E --> F[Actionable permission warnings]
D --> G[Preserved group permissions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +199, Tests +396, Config +6, Other 0. Total +601 across 7 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep Doctor aligned with LINE’s existing permission contract, preserving explicit group lists and explaining unresolved group access without granting it. Do we have a high-confidence way to reproduce the issue? Yes: current source shows that doctor --fix can promote a LINE DM-only allowlist into groupAllowFrom, and supplied CLI observations demonstrate that path; this review did not execute it. Is this the best way to solve the issue? Yes: declaring the existing contract through Doctor’s established metadata path avoids a competing repair mechanism, and the supplied fresh-config and upgrade observations support preservation of existing settings. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4b47d65d295a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
landpr-approve-admin-merge |
|
landpr-approve-admin-merge |
|
Thanks @edenfunf! Proof:
|
…w#147135) ## What Problem This Solves Doctor silently copies LINE direct-message permissions into group access when an operator runs `doctor --fix` with no group allowlist. ## Scope and existing permissions - Doctor no longer creates a LINE group allowlist from the direct-message allowlist. - Existing `groupAllowFrom` values remain unchanged. Doctor cannot tell whether an earlier value was copied by maintenance or deliberately configured by the operator. - The capability flag uses the existing plugin manifest contract. This change adds no configuration key, schema, migration, protocol, or SDK contract. - Supersedes openclaw#146171 by @edenfunf and preserves the contributor's three commits and authorship. The original report is openclaw#146169. ## Validation status - The retained main reproduction shows `doctor --fix` adding the DM-only sender to group access. - Candidate CLI evidence shows the key remains absent, repeated repair preserves that result, and an existing group list remains unchanged. - All six committed CLI cases pass for permission separation, normalized-empty sender entries, shadowed group/room aliases, and reference-backed lists. References now receive checking guidance without false working or blocked claims; saved permissions remain unchanged. - Fresh merge `2af5aed7630e584ef8533d60bbb339b188e385b9`, with candidate parent `88496f01eb4541446bb9d2599f1ce06a1843d6d6` and main parent `8f69e537857fb19d2e15fc3d937ba48cc625b732`, passed 1,093 tests: 1,039 LINE, 48 Doctor discovery/migration/shared-warning, and six CLI cases. - The final commit only moves the unchanged CLI regression to `test/e2e`. Both routing regressions and all six CLI cases pass at the new path. CI run [34767626917](https://github.com/openclaw/openclaw/actions/runs/34767626917) is green at `e5235e0fa5b7243903e708ba36a21b9d41e68e03`. - The generated channel catalog matches its owner script's output. ```sh OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs run test/e2e/line-doctor-group-allowlist.built-cli.e2e.test.ts OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs run test/scripts/test-projects.test.ts -t 'chunks.*broad shell helper' ``` ## Consumers Doctor’s metadata resolver, fallback repair, and warning scanner consume the LINE declaration and adapter. LINE admission, explicit allowlist editing, directory reads, and account inheritance keep their existing contracts. Metadata uses its existing process and refresh lifecycle. ## Limits - Empty wildcard overrides over a nonempty `groupAllowFrom` and per-group empty lists under `groupPolicy: "open"` remain outside this change. - The evidence covers Doctor configuration and warning behavior. It does not claim a live LINE message round trip. Co-authored-by: xuyuanhao <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Doctor silently copies LINE direct-message permissions into group access when an operator runs
doctor --fixwith no group allowlist.Scope and existing permissions
groupAllowFromvalues remain unchanged. Doctor cannot tell whether an earlier value was copied by maintenance or deliberately configured by the operator.Validation status
doctor --fixadding the DM-only sender to group access.2af5aed7630e584ef8533d60bbb339b188e385b9, with candidate parent88496f01eb4541446bb9d2599f1ce06a1843d6d6and main parent3d8e779759a8a9ae952466e4b542b5fb69917ef5, passed 1,093 tests: 1,039 LINE, 48 Doctor discovery/migration/shared-warning, and six CLI cases.test/e2e. Both routing regressions and all six CLI cases pass at the new path. CI run 34767626917 is green ate5235e0fa5b7243903e708ba36a21b9d41e68e03.OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs run test/e2e/line-doctor-group-allowlist.built-cli.e2e.test.ts OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs run test/scripts/test-projects.test.ts -t 'chunks.*broad shell helper'Consumers
Doctor’s metadata resolver, fallback repair, and warning scanner consume the LINE declaration and adapter. LINE admission, explicit allowlist editing, directory reads, and account inheritance keep their existing contracts. Metadata uses its existing process and refresh lifecycle.
Limits
groupAllowFromand per-group empty lists undergroupPolicy: "open"remain outside this change.