Skip to content

Provider-covered endpoints cannot be extended through agent policy proposals #2921

Description

@zredlined

User Story

As an OpenShell policy reviewer, I need an agent's incremental policy proposal to reach normal review when it extends access to an endpoint already covered by a provider, so that provider defaults remain a baseline rather than a ceiling.

Problem Statement

With Providers v2 enabled and the built-in GitHub provider attached, an agent proposal for write access to api.github.com:443 is rejected before a draft is created. The provider contributes a read-oriented rule for the same endpoint, and candidate validation reports an overlapping-rule conflict because the rules differ on advisor_proposed metadata.

Removing an equivalent GitHub read rule from the sandbox's base policy does not help: the provider rule alone is enough to conflict with the proposed rule. The proposal therefore never reaches the configured manual reviewer.

Impact / Why This Matters

  • Agents cannot request incremental access on an endpoint supplied by an attached provider.
  • Provider defaults become a de facto ceiling for that host, even though provider and user policy layers are intended to compose.
  • Reviewers never see the proposal, so a policy decision is replaced by a candidate-validation failure.

Acceptance Criteria

  • An agent proposal may add narrower or broader access to a provider-covered host without conflicting solely because advisor_proposed differs.
  • The proposal reaches the normal pending-review flow when the composed candidate is otherwise valid.
  • Provider-owned policy remains immutable; approval changes only the sandbox/user policy layer.
  • An integration test covers a provider read rule and an agent write proposal for the same host.

Reproduction Steps

  1. Enable Providers v2, agent policy proposals, and manual proposal approval.
  2. Create a sandbox and attach the built-in GitHub provider.
  3. From the sandbox, submit a proposal for api.github.com:443 that allows PUT /repos/<owner>/<repo>/contents/<path> for /usr/bin/gh.
  4. Observe that no pending draft is created and the proposal is rejected during candidate validation.

Environment

  • OpenShell: 0.0.112-dev.5+g679fe4c3 (679fe4c334f0c62a653b004fae7008a631bf7f22)
  • Also observed on gateway commit d9d38a561944dd041342c004dbfe6ff5b3c8d8de
  • OpenShell SDK: 0.0.106
  • Linux ARM64 under Docker

Logs

network endpoint ambiguity validation failed
overlapping rules for api.github.com:443 have conflicting metadata:
advisor_proposed=false vs advisor_proposed=true

Related design context: provider policies supply defaults that compose with user policy (#734 and discussion #865).

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:acceptedA maintainer decided OpenShell should pursue this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions