Skip to content

Dynamic Scopes #393

Description

@joe0BAB

Consider a store with following sample content:

proj1/foo
proj2/foo
foo

Possible generic scoping rules we could impose:

Prefix scoping: docker/mcp/** -> **

docker/mcp/foo
docker/mcp/proj1/foo
docker/mcp/proj2/foo

Wrap scoping:

docker/*/mcp/* -> */*

docker/foo/mcp (not a match)
docker/proj1/mcp/foo
docker/proj2/mcp/foo

docker/**/mcp -> **
Queries:
docker/proj1/foo/mcp -> proj1/foo
docker/foo/mcp -> foo

docker/**/mcp/* -> **/*
Queries:
docker/proj1/foo/mcp/day1 -> proj1/foo/day1
docker/mcp/day1 -> day1

docker/*/mcp/** -> */**

docker/**/mcp/** -> **/** -> ** -> illegal scoping rule

docker/*/**/mcp/**/* -> */**/**/* -> */**/* -> illegal scoping rule

docker/*/**/mcp/*/** -> */**/*/** -> */*/** -> illegal scoping rule

Scoping algorithm:

  1. must be a valid pattern
  2. compute the forwarded pattern
  3. verify if the forwarded pattern does not have any redundancy
    • If redundancy: ambiguous scoping rule -> error
    • If no redundancy: unique scoping rule -> pass

Activity

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

Metadata

Metadata

Assignees

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