Skip to content

fix(line): declare the group allowlist contract to Doctor - #146171

Closed
edenfunf wants to merge 4 commits into
openclaw:mainfrom
edenfunf:fix/line-doctor-group-allowlist
Closed

edenfunf wants to merge 4 commits into
openclaw:mainfrom
edenfunf:fix/line-doctor-group-allowlist

Conversation

@edenfunf

@edenfunf edenfunf commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes #146169

LINE's runtime tells the shared ingress policy that group allowlists never fall back to the DM
allowlist. Doctor was never told, so it resolves the opposite default and openclaw doctor --fix
copies channels.line.allowFrom into channels.line.groupAllowFrom:

channels.line.groupAllowFrom: copied 1 sender entry from allowFrom for explicit group allowlist.
  • That turns "nobody can trigger the agent in any LINE group" into "everyone on my DM allowlist can
    trigger it in every group and room the bot is in".
  • It hits the config LINE's own setup wizard writes: a DM allowlist and no group allowlist.
  • docs/channels/line.md:226 documents the opposite of what Doctor does.
  • The empty-allowlist warning used the generic "groupAllowFrom (and allowFrom) is empty" wording,
    pointing operators at a fallback LINE does not implement.

Why This Change Was Made

The contract is already in the runtime (extensions/line/src/bot-handlers.ts:234-235, :292):

// LINE group allowlists are scoped separately from DM allowFrom.
// The shared ingress policy below intentionally keeps fallback disabled.
…
groupAllowFromFallbackToAllowFrom: false,

extensions/line/package.json declared no doctorCapabilities, so getDoctorChannelCapabilities
fell to its default (src/commands/doctor/channel-capabilities.ts:23), driving both the copy
(allowfrom-fallback-migration.ts:141,144) and the warning wording
(empty-allowlist-policy.ts:102-112).

The manifest supplies the capability.

  • ChannelDoctorAdapter carries these fields (src/channels/plugins/types.adapters.ts:484-487),
    and Doctor reads a plugin's doctor block at channel-capabilities.ts:67-71 — but only after the
    catalog lookup misses, and only when the plugin object resolves.
  • Doctor avoids loading channel runtimes for this. fix(discord): avoid doctor runtime loading #119391 moved capability discovery to packaged
    catalog metadata because the runtime fallback loaded the full plugin graph and broke in packaged
    installs that exclude the channel from dist/extensions.
  • Measured: every bundled channel declaring the flag only on its adapter (irc, imessage, whatsapp,
    nextcloud-talk, mattermost, signal) resolves the default; every manifest declarer resolves what it
    declared.
  • This continues the migration in 86667d670e6 and fix(discord): avoid doctor runtime loading #119391. LINE was never migrated.

The adapter fixes the warning.

  • With the fallback declared off, the default warning fires whenever groupAllowFrom is empty — but
    LINE also admits a group through the per-group allowFrom documented at
    docs/channels/line.md:227-228 and honored at bot-handlers.ts:232,236-237, which Doctor never
    reads.
  • Suppressing the warning wholesale is also wrong: with some groups covered and others not, the
    uncovered ones are dropped silently.
  • So the adapter replaces the shared line instead of removing it — it suppresses the claim only when
    a group is served, and names the groups that are not. Telegram pairs the same two hooks
    (extensions/telegram/src/doctor.ts:602-603).

Coverage is computed from each group's effective config, resolved the way resolveLineGroupConfigEntry
resolves it:

  • groups["*"] is a defaults node merged field by field into each named entry, and it is also what
    a group with no entry of its own resolves to.
  • The effective allowFrom is the first defined value between the group's own entry, the defaults
    entry, and groupAllowFrom. An empty list at any of those levels blocks the group while hiding
    the wider lists behind it, so the adapter keeps the source alongside the value and addresses the
    warning to the key that actually supplies it — the group's own entry, groups."*".allowFrom, or
    groupAllowFrom. Telling an operator to remove a key the group never authored would not help.
  • enabled: false resolves through the same merge, so a group disabled only through "*" reads as
    intentional silence rather than a missing allowlist.
  • An account authoring groups replaces the channel-level map rather than merging per entry
    (mergeAccountConfig spreads shallowly, and LINE declares no nested object keys).

Update behavior

The installed updater runs first and is unaffected: this change adds no config migration, no schema
change, and no update-path code. It only changes what Doctor believes about LINE and what it warns
about, and it removes a config write Doctor used to perform.

Existing operator state is the input, and the state that matters is a config whose groupAllowFrom
the published driver already copied. The candidate preserves it untouched and stays quiet about it,
so an operator who took the old --fix keeps working group access across the upgrade. The
published-driver × candidate cell below runs that path end to end.

User Impact

  • doctor --fix no longer promotes a DM allowlist into a group allowlist.
  • Operators whose groups are dead still get a warning, now naming groupAllowFrom and
    groupPolicy: "open" instead of offering allowFrom.
  • Operators using per-group allowlists are no longer told their working config drops every message.
  • Operators whose per-group allowlists cover only some groups now learn which groups still drop
    messages. That case was silent before.
  • Configs already carrying groupAllowFrom are untouched, and LINE's runtime admission is unchanged.

Evidence

Environment: the built CLI (node dist/index.js doctor [--fix]) against isolated
OPENCLAW_STATE_DIR configs. No channel traffic, no credentials.

published-driver × candidate cell. The published [email protected] from npm drives the wizard
config, then the candidate reads the state it left behind:

published driver : 2026.9.4
candidate        : e212e33bf68

step 1 — published doctor --fix on the wizard config
  {"dmPolicy":"allowlist","allowFrom":["U1"],"groupPolicy":"allowlist","groupAllowFrom":["U1"]}

step 2 — candidate reads that published-produced state
  candidate doctor group warning: (none)
  after candidate doctor --fix:
  {"dmPolicy":"allowlist","allowFrom":["U1"],"groupPolicy":"allowlist","groupAllowFrom":["U1"]}

step 3 — control: candidate on a fresh wizard config
  {"dmPolicy":"allowlist","allowFrom":["U1"],"groupPolicy":"allowlist"}

Step 1 is the bug reproduced against the published artifact, not a local build of main. Step 2
shows the candidate preserving that state byte for byte and staying silent about it. Step 3 shows
the candidate no longer creating it.

Behavior matrix, thirteen configs through the built CLI. Doctor frames warnings in a box and
wraps one warning across several framed lines, so the output is flattened and the box drawing
stripped before matching. Columns: generic is the shared empty-allowlist warning, uncovered
names groups with no allowlist anywhere, and the three empty-* columns are the warning that names
whichever key supplies an empty list:

config shape                          generic  uncovered  empty-own  empty-"*"  empty-chan  copies
A groupPolicy allowlist, nothing set     1         0          0          0           0         0
B wizard shape (allowFrom only)          1         0          0          0           0         0
C per-group allowFrom (named group)      0         0          0          0           0         0
D per-group allowFrom on "*"             0         0          0          0           0         0
E mixed: one covered, one not            0         1          0          0           0         0
F groups entry without allowFrom         1         0          0          0           0         0
G already migrated (groupAllowFrom)      0         0          0          0           0         0
H only configured group is disabled      1         0          0          0           0         0
I multi-account                          3         0          0          0           0         0
J own empty allowFrom over "*"           0         0          1          0           0         0
K disabled through "*"                   0         0          0          0           0         0
L empty inherited from "*"               0         0          0          1           0         0
M empty inherited from groupAllowFrom    1         0          0          0           1         0

J through M are the inheritance cases:

  • J authors allowFrom: [] on the group itself while groups["*"] carries senders. The group
    is named, and the remedy points at its own entry.
  • K is disabled only through groups["*"].enabled: false. That is intentional silence, so
    nothing is reported.
  • L inherits an empty list from groups["*"].allowFrom while groupAllowFrom carries senders.
    The remedy points at the defaults entry, not at a key the group never authored.
  • M inherits an empty groupAllowFrom. The remedy points there.

No shape copies allowFrom into groupAllowFrom.

  • Every generic warning is the no-fallback wording ("this channel does not fall back to allowFrom").
  • Case E (groups.C222.allowFrom set, groups.C333 without) is what the narrow suppression exists
    for.

Case E's warning, with doctor's box drawing stripped:

channels.line.groups: group "C333" has no sender allowlist — messages there are silently dropped while your other groups keep working. Add sender IDs under channels.line.groups.<id>.allowFrom, or under channels.line.groups."*".allowFrom to cover every group, or to channels.line.groupAllowFrom.

The config after doctor --fix:

{
  "channels": {
    "line": {
      "enabled": true,
      "channelAccessToken": "tok",
      "channelSecret": "sec",
      "dmPolicy": "allowlist",
      "allowFrom": [
        "U1"
      ],
      "groupPolicy": "allowlist"
    }
  }
}

Red/green, twice:

  • Reverting extensions/line/src/doctor.ts to the naive "any group with an allowFrom silences
    everything" shape turns the suite red (10 failed / 1 passed).
  • The cases added for the inheritance defects fail against the revision that preceded each fix
    (3 failed / 11 passed for the first pair) and pass after (16/16 now).

Checks run:

OPENCLAW_STATE_DIR=<tmp> node dist/index.js doctor
OPENCLAW_STATE_DIR=<tmp> node dist/index.js doctor --fix
node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-line.config.ts
node scripts/run-vitest.mjs run src/commands/doctor/channel-capabilities.test.ts
node scripts/run-tsgo.mjs -p tsconfig.extensions.json --noEmit
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json
pnpm lint:extensions
pnpm check:assertion-safety --base origin/main
pnpm check:max-lines-ratchet --base origin/main
pnpm check:bundled-channel-config-metadata
node scripts/write-official-channel-catalog.mjs --check
  • Resolved capabilities: {dmAllowFromMode:"topOnly", groupModel:"sender", groupAllowFromFallbackToAllowFrom:false, warnOnEmptyGroupSenderAllowlist:true}, and the plugin
    exposes both collectEmptyAllowlistExtraWarnings and
    shouldSkipDefaultEmptyGroupAllowlistWarning.
  • LINE suite 68 files / 1039 tests, capability suite 12 tests, both tsgo lanes, both ratchets,
    catalog and bundled-metadata checks, oxfmt — all pass.

Not covered:

  • No live LINE traffic. The change alters only what Doctor believes about the channel; LINE's
    admission gate is unchanged and already carried this contract.
  • Doctor cannot enumerate groups that have no config entry, so a group that exists only on the LINE
    side is covered by the defaults node and groupAllowFrom but never named individually.
  • The capability assertion resolves through resolveBundledPluginsDir(), which reads
    dist/extensions/line/package.json. Reverting only the source manifest leaves it passing until
    the next build. CI builds before testing, so it pins the shipped artifact there.
  • warnOnEmptyGroupSenderAllowlist: false was tried first and withdrawn: it removed a warning
    main does emit.

Scope

Other channels share the same Doctor default. This PR does not touch them:

  • irc — identical case. Runtime passes false (extensions/irc/src/inbound.ts:273), declared
    only on its plugin doctor block.
  • imessage — same shape (extensions/imessage/src/monitor/inbound-processing.ts:587,
    extensions/imessage/src/doctor.ts:6).
  • whatsapp — not affected despite passing false at runtime: it merges allowFrom into
    groupAllowFrom itself (extensions/whatsapp/src/inbound-policy.ts:74-81), so Doctor's true is
    correct for it. "Passes false" does not imply "no fallback".
  • nextcloud-talk, mattermost, signal — pass true at runtime, matching what Doctor resolves.

@clawsweeper

clawsweeper Bot commented Sep 12, 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 channel: line Channel integration: line scripts Repository scripts commands Command implementations size: M labels Sep 12, 2026
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 12, 2026, 1:30 PM ET / 17:30 UTC (Revision 4).

ClawSweeper review

What this changes

Declares LINE’s separate group-permission contract to Doctor and adds warnings identifying configured groups with missing or empty sender allowlists.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR remains necessary: current main still permits Doctor to copy LINE DM permissions into group permissions. Earlier findings are resolved, and the supplied published-driver upgrade evidence satisfies the previous proof request. No blocking patch defect remains.

Priority: P0
Reviewed head: e212e33bf68e3285f2ea56a7614e34f6abee85ed

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair with strong CLI and upgrade evidence and no remaining actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The matching captured body records the real built Doctor CLI at this head processing 13 isolated configurations and preserving published-2026.9.4-produced group permissions while avoiding the erroneous write on fresh input; this covers the changed configuration side effect and prior upgrade-proof request.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The matching captured body records the real built Doctor CLI at this head processing 13 isolated configurations and preserving published-2026.9.4-produced group permissions while avoiding the erroneous write on fresh input; this covers the changed configuration side effect and prior upgrade-proof request.
Evidence reviewed 9 items Current main still lacks the declaration: The fetched main manifest has no doctorCapabilities block. Tree-object comparisons also confirm that the inspected capability resolver, fallback migration, and LINE admission implementation are identical between the checkout and fetched main.
Configuration-write boundary: The shared migration skips the entire channel when groupAllowFromFallbackToAllowFrom is false, before either channel-level or account-level groupAllowFrom writes. The new manifest declaration therefore prevents the erroneous permission transfer without rewriting existing lists.
Established LINE admission contract: LINE resolves group-specific allowFrom before groupAllowFrom and explicitly disables DM fallback. The access-control documentation independently states that DM allowFrom entries do not admit group senders.
Findings None None.
Security None None.

How this fits together

Doctor inspects and repairs OpenClaw configuration using channel metadata and plugin-specific diagnostics. LINE’s declarations determine whether Doctor copies sender permissions and which group-access warnings operators receive.

flowchart TD
  A[LINE configuration] --> B[Doctor]
  C[LINE capability metadata] --> B
  B --> D[Allowlist repair decision]
  D --> E[Preserve separate group permissions]
  B --> F[LINE group coverage diagnostics]
  F --> G[Targeted operator warnings]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +188, Tests +240, Config +6, Other 0. Total +434 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 188 0 +188
Tests 2 240 0 +240
Docs 0 0 0 0
Config 1 6 0 +6
Generated 0 0 0 0
Other 1 1 1 0
Total 6 435 1 +434

Review metrics

Metric Value Why it matters
Production and regression coverage Production code +188 lines; metadata +6 net lines; tests +240 lines The production growth is explained by scope-aware warning diagnostics; permission repair itself reuses the existing metadata contract.

Stored data model

Persistent data-model change detected: migration/backfill/repair: extensions/line/src/channel.ts, migration/backfill/repair: extensions/line/src/doctor.ts, unknown-data-model-change: extensions/line/src/doctor.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #146169
Summary: This PR is the explicit implementation candidate for the open LINE Doctor permission-copy report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep LINE’s established permission separation authoritative in Doctor’s metadata, preserve existing operator settings, and report effective per-group coverage through the existing diagnostic hooks.

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

Yes: current source traces a DM-only allowlist through Doctor’s default fallback into a groupAllowFrom write, and the contributor supplies a matching v2026.9.4 CLI reproduction; this review did not execute it.

Is this the best way to solve the issue?

Yes: the patch supplies the missing declaration through the existing catalog contract and uses established diagnostic hooks, without adding a competing migration or changing LINE admission.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P0: The existing Doctor repair can persistently authorize DM-approved senders in LINE groups without the operator granting group access.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The matching captured body records the real built Doctor CLI at this head processing 13 isolated configurations and preserving published-2026.9.4-produced group permissions while avoiding the erroneous write on fresh input; this covers the changed configuration side effect and prior upgrade-proof request.
  • proof: sufficient: Contributor real behavior proof is sufficient. The matching captured body records the real built Doctor CLI at this head processing 13 isolated configurations and preserving published-2026.9.4-produced group permissions while avoiding the erroneous write on fresh input; this covers the changed configuration side effect and prior upgrade-proof request.

Evidence

What I checked:

  • Current main still lacks the declaration: The fetched main manifest has no doctorCapabilities block. Tree-object comparisons also confirm that the inspected capability resolver, fallback migration, and LINE admission implementation are identical between the checkout and fetched main. (extensions/line/package.json:54, e16fc3c97374)
  • Configuration-write boundary: The shared migration skips the entire channel when groupAllowFromFallbackToAllowFrom is false, before either channel-level or account-level groupAllowFrom writes. The new manifest declaration therefore prevents the erroneous permission transfer without rewriting existing lists. (src/commands/doctor/shared/allowfrom-fallback-migration.ts:179, e212e33bf68e)
  • Established LINE admission contract: LINE resolves group-specific allowFrom before groupAllowFrom and explicitly disables DM fallback. The access-control documentation independently states that DM allowFrom entries do not admit group senders. (extensions/line/src/bot-handlers.ts:234, e212e33bf68e)
  • Earlier findings resolved: The adapter now tracks which scope supplies an empty list and applies inherited enabled settings. The complete 16-case test file covers explicit empty overrides, inherited empty lists, disabled groups, mixed coverage, and account-map replacement. (extensions/line/src/doctor.ts:66, e212e33bf68e)
  • Complete captured proof inspected: The full GitHub body matched the supplied snapshot exactly: SHA-256 90a39b043ebc117a9bb9024ffedc9b08bdebe5fc863c223f8a290ec442dad98f, 12,647 UTF-16 units. Its built-CLI transcript identifies candidate e212e33, demonstrates preservation of state produced by published 2026.9.4, shows no permission copy for a fresh wizard config, and records 13 diagnostic scenarios. No embedded commands were executed. (e212e33bf68e)
  • Latest-release comparison: Inspection of the supplied v2026.9.4 release commit confirms that its LINE package also lacks doctorCapabilities, consistent with the contributor’s published-artifact reproduction. (extensions/line/package.json, 3a9d69db306c)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • edenfunf: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-12T16:19:38.365Z sha b5f49d9 :: blocked before merge. :: [P2] Honor explicit empty group overrides before suppressing warnings | [P2] Apply inherited enabled settings when classifying groups
  • reviewed 2026-09-12T16:51:59.267Z sha c1b93d6 :: blocked before merge. :: [P2] Distinguish inherited empty lists from a group's own override
  • reviewed 2026-09-12T17:20:18.033Z sha e212e33 :: blocked before merge. :: none

…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.
@edenfunf

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

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.
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
obviyus added a commit that referenced this pull request Sep 13, 2026
## 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 #146171 by @edenfunf and preserves the contributor's three commits and authorship. The original report is #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 `3d8e779759a8a9ae952466e4b542b5fb69917ef5`, 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]>
@obviyus

obviyus commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Thanks @edenfunf!

Proof: Superseded by merged #147135, which keeps your three commits under your authorship.

Before After
Routine repair could grant unintended group access. The merged fix preserves permission boundaries and your contribution.

@obviyus obviyus closed this Sep 13, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: line Channel integration: line commands Command implementations P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

doctor --fix widens LINE group access because LINE declares no group-allowlist contract

2 participants