Policy: add ingress channel conformance checks#85744
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 29, 2026, 1:07 AM ET / 05:07 UTC. Summary PR surface: Source +1053, Tests +1568, Docs +41. Total +2662 across 5 files. Reproducibility: not applicable. this is a feature PR adding config-level Policy plugin conformance checks, not a bug report needing reproduction. The changed command path is still covered by provided failing and passing policy-check JSON proof plus focused tests. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this only after explicit maintainer approval of the Policy plugin ingress config, selector, and check-ID contract; otherwise keep the branch open for that decision rather than closing it as stale or obsolete. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature PR adding config-level Policy plugin conformance checks, not a bug report needing reproduction. The changed command path is still covered by provided failing and passing policy-check JSON proof plus focused tests. Is this the best way to solve the issue? Yes, subject to maintainer approval: keeping this as config-only Policy plugin conformance matches the existing policy-check pattern and avoids runtime channel enforcement. The remaining question is whether maintainers accept the new durable field, check-ID, and selector contract. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 22e8cd2a1d25. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1053, Tests +1568, Docs +41. Total +2662 across 5 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Frosted Lint Imp Hatch commandComment Hatchability rules:
Rarity: 🌱 uncommon. What is this egg doing here?
|
bfee8da to
6acd6f0
Compare
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
6acd6f0 to
6b82aff
Compare
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Removed the release-owned Current signed head: Fresh validation for this cleanup:
The existing ingress real behavior proof remains valid; the only follow-up change was removing the release-owned changelog line. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer-side contract review for the current ingress branch ( I reviewed the PR against current Contract surface accepted for this PR:
Implementation review notes:
Validation already provided for the rebased branch:
Real behavior proof remains valid: the actual @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Fresh proof on latest PR head
This is the same focused policy/CLI coverage on the current PR head after rebasing/merging latest main into the branch. The previous off-meta result appears to be from ClawSweeper/Codex review execution failing, not from a concrete code finding. @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Adds policy conformance checks for ingress and channel access posture. This is a config-level conformance layer: it reports findings when the configured OpenClaw workspace does not satisfy the authored policy, and it does not add runtime channel enforcement.
The new
policy.jsoncsyntax is:{ "ingress": { "session": { "requireDmScope": "per-channel-peer" }, "channels": { "allowDmPolicies": ["pairing", "allowlist", "disabled"], "denyOpenGroups": true, "requireMentionInGroups": true } }, "scopes": { "telegram-ingress": { "channelIds": ["telegram"], "ingress": { "channels": { "allowDmPolicies": ["allowlist", "disabled"], "denyOpenGroups": true, "requireMentionInGroups": true } } } } }Contract
ingress.session.requireDmScopeobservessession.dmScopeand remains top-level only, because session scope is not channel-attributable evidence.ingress.channels.*observes configured channel/account/group ingress settings and can be used either top-level or insidescopes.<name>withchannelIds. A policy finding means the configured workspace violates the policy claim for that channel posture.Supported fields:
ingress.session.requireDmScopesession.dmScopeingress.channels.allowDmPolicieschannels.*.dmPolicyand legacy channel DM policy fieldsingress.channels.denyOpenGroupsingress.channels.requireMentionInGroupsNew check IDs:
policy/ingress-dm-policy-unapprovedpolicy/ingress-dm-scope-unapprovedsession.dmScopedoes not match the policy-required DM isolation scope.policy/ingress-open-groups-deniedopenwhile policy denies open group ingress.policy/ingress-group-mention-requiredUsage
Validation