# SPDX-License-Identifier: MPL-2.0
# CODEOWNERS - Define code review assignments for GitHub
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
#
# ⚠ WHY TWO OWNERS ON EVERY LINE
#
# The Base ruleset sets `require_code_owner_review: true`. GitHub will not let a
# pull request's author satisfy that requirement themselves. So while
# @hyperpolymath was the SOLE owner of every path, the rule could not be
# satisfied by anybody: every PR authored by the maintainer sat permanently
# BLOCKED, and the only way anything merged was the admin bypass
# (RepositoryRole id=2, mode=always). PRs #592, #593 and #597 all merged with
# DISMISSED / CHANGES_REQUESTED and zero approvals for exactly this reason.
#
# A rule that can never pass does not gate anything — it just makes bypass the
# normal path, and once bypass is routine it stops carrying information.
#
# @JoshuaJewell (repo admin) is therefore named as co-owner so the requirement
# becomes satisfiable. Either maintainer can approve the other's work.
#
# ⚠ ON EVERY LINE, not just the `*` default: in CODEOWNERS the LAST matching
# rule wins, and a specific path line REPLACES the default rather than adding to
# it. Naming a co-owner only on `*` would leave every explicitly-listed path
# below (SECURITY.md, .github/workflows/, *.sh …) single-owned and therefore
# still deadlocked for any PR touching them.

# Default: both maintainers
* @hyperpolymath @JoshuaJewell

# Security-sensitive files require explicit ownership
SECURITY.md @hyperpolymath @JoshuaJewell
.github/workflows/ @hyperpolymath @JoshuaJewell
.machine_readable/ @hyperpolymath @JoshuaJewell
contractiles/ @hyperpolymath @JoshuaJewell

# License files
LICENSE @hyperpolymath @JoshuaJewell
LICENSES/ @hyperpolymath @JoshuaJewell

# Configuration
.gitignore @hyperpolymath @JoshuaJewell
.github/ @hyperpolymath @JoshuaJewell

# Documentation
README* @hyperpolymath @JoshuaJewell
CONTRIBUTING* @hyperpolymath @JoshuaJewell
CODE_OF_CONDUCT* @hyperpolymath @JoshuaJewell
GOVERNANCE* @hyperpolymath @JoshuaJewell
MAINTAINERS* @hyperpolymath @JoshuaJewell
CHANGELOG* @hyperpolymath @JoshuaJewell
ROADMAP* @hyperpolymath @JoshuaJewell

# Build and CI
Justfile @hyperpolymath @JoshuaJewell
Makefile @hyperpolymath @JoshuaJewell
*.sh @hyperpolymath @JoshuaJewell
