Repository navigation
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 12, 2026, 1:30 PM ET / 17:30 UTC (Revision 4). ClawSweeper reviewWhat this changesDeclares 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 Review scores
Verification
How this fits togetherDoctor 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +188, Tests +240, Config +6, Other 0. Total +434 across 6 files. View PR surface stats
Review metrics
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 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
…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.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. 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.
## 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]>
|
Thanks @edenfunf! Proof: Superseded by merged #147135, which keeps your three commits under your authorship.
|
…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
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 --fixcopies
channels.line.allowFromintochannels.line.groupAllowFrom:trigger it in every group and room the bot is in".
docs/channels/line.md:226documents the opposite of what Doctor does.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):extensions/line/package.jsondeclared nodoctorCapabilities, sogetDoctorChannelCapabilitiesfell 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.
ChannelDoctorAdaptercarries these fields (src/channels/plugins/types.adapters.ts:484-487),and Doctor reads a plugin's
doctorblock atchannel-capabilities.ts:67-71— but only after thecatalog lookup misses, and only when the plugin object resolves.
catalog metadata because the runtime fallback loaded the full plugin graph and broke in packaged
installs that exclude the channel from
dist/extensions.nextcloud-talk, mattermost, signal) resolves the default; every manifest declarer resolves what it
declared.
86667d670e6and fix(discord): avoid doctor runtime loading #119391. LINE was never migrated.The adapter fixes the warning.
groupAllowFromis empty — butLINE also admits a group through the per-group
allowFromdocumented atdocs/channels/line.md:227-228and honored atbot-handlers.ts:232,236-237, which Doctor neverreads.
uncovered ones are dropped silently.
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
resolveLineGroupConfigEntryresolves it:
groups["*"]is a defaults node merged field by field into each named entry, and it is also whata group with no entry of its own resolves to.
allowFromis the first defined value between the group's own entry, the defaultsentry, and
groupAllowFrom. An empty list at any of those levels blocks the group while hidingthe 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, orgroupAllowFrom. Telling an operator to remove a key the group never authored would not help.enabled: falseresolves through the same merge, so a group disabled only through"*"reads asintentional silence rather than a missing allowlist.
groupsreplaces the channel-level map rather than merging per entry(
mergeAccountConfigspreads 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
groupAllowFromthe published driver already copied. The candidate preserves it untouched and stays quiet about it,
so an operator who took the old
--fixkeeps working group access across the upgrade. Thepublished-driver × candidate cell below runs that path end to end.
User Impact
doctor --fixno longer promotes a DM allowlist into a group allowlist.groupAllowFromandgroupPolicy: "open"instead of offeringallowFrom.messages. That case was silent before.
groupAllowFromare untouched, and LINE's runtime admission is unchanged.Evidence
Environment: the built CLI (
node dist/index.js doctor [--fix]) against isolatedOPENCLAW_STATE_DIRconfigs. No channel traffic, no credentials.published-driver × candidate cell. The published
[email protected]from npm drives the wizardconfig, then the candidate reads the state it left behind:
Step 1 is the bug reproduced against the published artifact, not a local build of
main. Step 2shows 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:
genericis the shared empty-allowlist warning,uncoverednames groups with no allowlist anywhere, and the three
empty-*columns are the warning that nameswhichever key supplies an empty list:
J through M are the inheritance cases:
allowFrom: []on the group itself whilegroups["*"]carries senders. The groupis named, and the remedy points at its own entry.
groups["*"].enabled: false. That is intentional silence, sonothing is reported.
groups["*"].allowFromwhilegroupAllowFromcarries senders.The remedy points at the defaults entry, not at a key the group never authored.
groupAllowFrom. The remedy points there.No shape copies
allowFromintogroupAllowFrom.groups.C222.allowFromset,groups.C333without) is what the narrow suppression existsfor.
Case E's warning, with doctor's box drawing stripped:
The config after
doctor --fix:{ "channels": { "line": { "enabled": true, "channelAccessToken": "tok", "channelSecret": "sec", "dmPolicy": "allowlist", "allowFrom": [ "U1" ], "groupPolicy": "allowlist" } } }Red/green, twice:
extensions/line/src/doctor.tsto the naive "any group with an allowFrom silenceseverything" shape turns the suite red (10 failed / 1 passed).
(3 failed / 11 passed for the first pair) and pass after (16/16 now).
Checks run:
{dmAllowFromMode:"topOnly", groupModel:"sender", groupAllowFromFallbackToAllowFrom:false, warnOnEmptyGroupSenderAllowlist:true}, and the pluginexposes both
collectEmptyAllowlistExtraWarningsandshouldSkipDefaultEmptyGroupAllowlistWarning.catalog and bundled-metadata checks, oxfmt — all pass.
Not covered:
admission gate is unchanged and already carried this contract.
side is covered by the defaults node and
groupAllowFrombut never named individually.resolveBundledPluginsDir(), which readsdist/extensions/line/package.json. Reverting only the source manifest leaves it passing untilthe next build. CI builds before testing, so it pins the shipped artifact there.
warnOnEmptyGroupSenderAllowlist: falsewas tried first and withdrawn: it removed a warningmaindoes emit.Scope
Other channels share the same Doctor default. This PR does not touch them:
false(extensions/irc/src/inbound.ts:273), declaredonly on its plugin
doctorblock.extensions/imessage/src/monitor/inbound-processing.ts:587,extensions/imessage/src/doctor.ts:6).falseat runtime: it mergesallowFromintogroupAllowFromitself (extensions/whatsapp/src/inbound-policy.ts:74-81), so Doctor'strueiscorrect for it. "Passes false" does not imply "no fallback".
trueat runtime, matching what Doctor resolves.