Skip to content

agents claude-channel: validate --self against the scope frame agent_person_id #254

Open

Description

@bniladridas

Problem. --self is accepted as the agent's person id, but it is never compared with the scope frame's agent_person_id. A wrong value is used for every self_id tag and for dropping the agent's own posts, so another member's posts can be dropped and the agent's own posts can be pushed.

Evidence. The flag is defined at src/pepper_cli/cli.py:2268-2274. ChannelWorker copies it at src/pepper_cli/claude_channel.py:431. _accept_scope fills self.self_id only when it is None and never checks a supplied value against seen.agent_person_id at :814-815. _handle_event uses self.self_id to drop posts at :679.

Scope. If the supplied --self and the scope's agent_person_id differ, either end with a clear error or prefer the scope id and warn. Keep the unscoped behavior unchanged, where no scope id exists and --self is the only source.

Done when. A scoped channel with a mismatched --self is handled by the chosen policy, with a test for the mismatch and a test that a matching value still drops the agent's own posts.

Refs #122. Item 3 of 4. PR #232 covers item 2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions