Skip to content

Ownership overrides #69

@perryqh

Description

@perryqh

Feature Request

Owner overrides

Context

Today, if more than one mapper claims ownership of a file, we return an error. There are limited exceptions for directory ownership where multiple directories may apply, and we conceptually pick the nearest directory.

We have seen frequent confusion and repeated requests for a way to explicitly override ownership.

Proposal

Allow overrides, resolving conflicts by choosing the most specific claim.

Priority (most specific to least specific)

Ownership for a file is determined by the closest applicable claim:

  1. File annotations (inline annotations in the file)
  2. Directory ownership (the nearest ancestor directory claim). If directory ownership is declared above a package file, it would be lower priority
  3. Package ownership (package.yml, package.json)
  4. Team glob patterns

If multiple teams match at the same priority level (e.g., multiple team glob patterns match the same path), this remains an error.

Tooling to reduce confusion

Update the for-file command to list all matching teams in descending priority, so users can see which owner would win and why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions