-
Notifications
You must be signed in to change notification settings - Fork 4.4k
12.4 Code Ownership
Relevant source files
The following files were used as context for generating this wiki page:
This document defines the code ownership structure for the ZeroClaw repository, specifying which team members are responsible for reviewing and approving changes to different subsystems. Code ownership is enforced through GitHub's CODEOWNERS mechanism, which automatically assigns reviewers to pull requests based on modified file paths.
For information about the PR review process and criteria, see Contributing. For details about CI/CD workflows that enforce quality gates, see CI/CD Workflows.
ZeroClaw uses a path-based ownership model with three core maintainers, each responsible for specific subsystems based on their domain expertise. The ownership structure prioritizes security-critical components, infrastructure configuration, and documentation quality.
Ownership Hierarchy
graph TB
root["Repository Root<br/>@theonlyhennygod"]
subgraph "High-Risk Surfaces"
security["src/security/**<br/>@willsarg"]
runtime["src/runtime/**<br/>@theonlyhennygod"]
memory["src/memory/**<br/>@theonlyhennygod<br/>@chumyin"]
github["/.github/**<br/>@theonlyhennygod"]
cargo["Cargo.toml<br/>Cargo.lock<br/>@theonlyhennygod"]
end
subgraph "CI Infrastructure"
workflows["/.github/workflows/**<br/>@theonlyhennygod<br/>@willsarg"]
codeql["/.github/codeql/**<br/>@willsarg"]
dependabot["/.github/dependabot.yml<br/>@willsarg"]
end
subgraph "Documentation"
docs["docs/**<br/>@chumyin"]
agents_md["AGENTS.md<br/>@chumyin"]
claude_md["CLAUDE.md<br/>@chumyin"]
contrib_md["CONTRIBUTING.md<br/>@chumyin"]
pr_workflow["docs/pr-workflow.md<br/>@chumyin"]
reviewer["docs/reviewer-playbook.md<br/>@chumyin"]
end
subgraph "Security Overrides"
security_md["SECURITY.md<br/>@willsarg"]
actions_policy["docs/actions-source-policy.md<br/>@willsarg"]
ci_map["docs/ci-map.md<br/>@willsarg"]
end
root --> security
root --> runtime
root --> memory
root --> github
root --> cargo
root --> workflows
root --> codeql
root --> dependabot
root --> docs
root --> agents_md
root --> claude_md
root --> contrib_md
root --> pr_workflow
root --> reviewer
docs --> security_md
docs --> actions_policy
docs --> ci_map
Sources: .github/CODEOWNERS:1-29
| GitHub Handle | Primary Responsibility | Secondary Areas |
|---|---|---|
@theonlyhennygod |
Default owner, runtime, memory, GitHub infrastructure, dependency management | CI/CD workflows |
@willsarg |
Security subsystem, CI/CD workflows, security documentation | CodeQL configuration, Dependabot |
@chumyin |
Documentation, governance, contributor guides | Memory backend documentation |
The security subsystem requires approval from @willsarg for all changes. This includes authentication, authorization, encryption, and security policy enforcement.
Owned Paths:
-
/src/security/**- All security implementation files -
/SECURITY.md- Security policy and vulnerability disclosure -
/docs/actions-source-policy.md- GitHub Actions security policy -
/docs/ci-map.md- CI/CD security documentation
Sources: .github/CODEOWNERS:5,26-28
Runtime adapters (native, Docker) and memory backends require approval from @theonlyhennygod, with additional review from @chumyin for memory subsystem changes.
Owned Paths:
-
/src/runtime/**- RuntimeAdapter trait implementations -
/src/memory/**- Memory trait implementations (dual ownership) -
/.github/**- All GitHub configuration except specialized areas -
/Cargo.toml- Rust dependencies and project metadata -
/Cargo.lock- Dependency version lock file
Path Ownership Diagram
graph LR
subgraph "src/"
security_dir["security/"]
runtime_dir["runtime/"]
memory_dir["memory/"]
other_src["*.rs files"]
end
subgraph ".github/"
workflows_dir["workflows/"]
codeql_dir["codeql/"]
dependabot_file["dependabot.yml"]
codeowners_file["CODEOWNERS"]
end
subgraph "Root Files"
cargo_toml["Cargo.toml"]
cargo_lock["Cargo.lock"]
security_md["SECURITY.md"]
end
security_dir --> willsarg["@willsarg"]
runtime_dir --> theonlyhennygod["@theonlyhennygod"]
memory_dir --> theonlyhennygod
memory_dir --> chumyin["@chumyin"]
other_src --> theonlyhennygod
workflows_dir --> theonlyhennygod
workflows_dir --> willsarg
codeql_dir --> willsarg
dependabot_file --> willsarg
codeowners_file --> theonlyhennygod
cargo_toml --> theonlyhennygod
cargo_lock --> theonlyhennygod
security_md --> willsarg
Sources: .github/CODEOWNERS:6-10
CI/CD workflows require dual approval from both @theonlyhennygod and @willsarg to ensure both operational correctness and security policy compliance.
Owned Paths:
-
/.github/workflows/**- All GitHub Actions workflow definitions -
/.github/codeql/**- CodeQL static analysis configuration -
/.github/dependabot.yml- Automated dependency updates
Workflow Sanity Enforcement:
The workflow-sanity.yml workflow enforces quality standards on workflow files:
| Check | Implementation | Purpose |
|---|---|---|
| No Tabs | .github/workflows/workflow-sanity.yml:30-54 | Prevents tab characters in YAML files (tabs cause parsing errors) |
| Actionlint | .github/workflows/workflow-sanity.yml:56-64 | Validates workflow syntax and catches common mistakes |
| Path Triggers | .github/workflows/workflow-sanity.yml:5-13 | Runs on .github/workflows/**, .github/*.yml, .github/*.yaml changes |
Sources: .github/CODEOWNERS:12-15, .github/workflows/workflow-sanity.yml:1-65
Documentation changes require approval from @chumyin, except for security-specific documentation which requires @willsarg approval (last-match-wins rule).
Owned Paths:
-
/docs/**- General documentation (default owner:@chumyin) -
/AGENTS.md- Agent design patterns -
/CLAUDE.md- Claude-specific configuration -
/CONTRIBUTING.md- Contribution guidelines -
/docs/pr-workflow.md- PR process documentation -
/docs/reviewer-playbook.md- Review criteria and standards
Override Paths (require @willsarg approval):
-
/SECURITY.md- Security policy -
/docs/actions-source-policy.md- GitHub Actions security policy -
/docs/ci-map.md- CI/CD architecture
Sources: .github/CODEOWNERS:17-28
GitHub's CODEOWNERS uses last-match-wins semantics, allowing specific paths to override broader patterns. This enables security overrides for documentation files.
Override Example:
graph TD
pr["Pull Request Modifies<br/>docs/actions-source-policy.md"]
match1["Pattern 1: /docs/**<br/>Owner: @chumyin"]
match2["Pattern 2: /docs/actions-source-policy.md<br/>Owner: @willsarg"]
result["Required Reviewer:<br/>@willsarg"]
pr --> match1
match1 --> match2
match2 --> result
style result fill:#f9f9f9,stroke:#333,stroke-width:2px
Precedence Order:
-
* @theonlyhennygod- Default fallback (line 2) - Path-specific rules (lines 5-23)
- Security overrides (lines 26-28) - Takes precedence
Sources: .github/CODEOWNERS:25-28
Some paths require approval from multiple owners. Changes to these paths must be reviewed by all specified owners before merging.
Dual Ownership Paths:
| Path Pattern | Required Reviewers | Rationale |
|---|---|---|
/src/memory/** |
@theonlyhennygod, @chumyin
|
Memory backend implementation and documentation expertise |
/.github/workflows/** |
@theonlyhennygod, @willsarg
|
Operational correctness and security policy compliance |
Approval Flow for CI/CD Changes:
sequenceDiagram
participant dev as "Developer"
participant pr as "Pull Request"
participant henny as "@theonlyhennygod"
participant will as "@willsarg"
participant ci as "CI Required Gate"
dev->>pr: "Modify .github/workflows/ci.yml"
pr->>henny: "Auto-assign for operational review"
pr->>will: "Auto-assign for security review"
henny->>pr: "Approve (operational correctness)"
will->>pr: "Approve (security policy compliance)"
pr->>ci: "All required reviewers approved"
ci->>pr: "Merge allowed"
Sources: .github/CODEOWNERS:7,13
Code ownership integrates with the PR workflow defined in Contributing:
Definition of Ready (DoR):
- CODEOWNERS automatically assigns required reviewers based on modified paths
- Developer must ensure all CI checks pass before requesting review
Definition of Done (DoD):
- All required owners have approved the PR
- CI Required Gate (CI/CD Workflows) passes
- No merge conflicts with target branch
Review Assignment Logic:
flowchart TD
pr_open["Pull Request Opened"]
analyze["GitHub Analyzes<br/>Changed Files"]
match_patterns["Match File Paths Against<br/>CODEOWNERS Patterns"]
assign["Auto-Assign Reviewers<br/>Based on Ownership Rules"]
check_multi{Multiple Owners<br/>for Any Path?}
assign_all["Assign All Required<br/>Owners for Each Path"]
assign_one["Assign Single Owner<br/>Per Path"]
wait["Wait for Approvals"]
check_all_approved{All Required<br/>Owners Approved?}
merge_blocked["Merge Blocked"]
merge_allowed["CI Required Gate<br/>Allows Merge"]
pr_open --> analyze
analyze --> match_patterns
match_patterns --> assign
assign --> check_multi
check_multi -->|Yes| assign_all
check_multi -->|No| assign_one
assign_all --> wait
assign_one --> wait
wait --> check_all_approved
check_all_approved -->|No| merge_blocked
check_all_approved -->|Yes| merge_allowed
merge_blocked --> wait
Sources: .github/CODEOWNERS:1-29
Each owner is responsible for:
- Reviewing assigned PRs within 48 hours (best effort)
- Ensuring changes meet subsystem quality standards (see Testing)
- Validating security implications for their domain
- Maintaining documentation for owned subsystems
- Coordinating with other owners for cross-cutting changes
If changes span multiple subsystems and owners disagree on approach:
- Discussion in PR comments - Primary resolution mechanism
- Synchronous meeting - For complex technical decisions
-
Default owner tie-break -
@theonlyhennygodhas final decision authority as repository owner
Security vulnerabilities require expedited review:
-
@willsargmust review all security-related changes - Bypass normal review timeline - same-day review expected
- Coordinate with affected subsystem owners after critical fixes merge
-
Publish security advisory (see
/SECURITY.mdprocess)
Dependabot PRs automatically assign @willsarg via /.github/dependabot.yml. These require:
- Security advisory review - Check for CVEs and breaking changes
- CI validation - All tests must pass
-
Lock file verification - Ensure
Cargo.lockchanges are correct
Sources: .github/CODEOWNERS:10,15
The complete CODEOWNERS configuration is maintained at .github/CODEOWNERS with the following structure:
Line 2: Default owner (*)
Lines 5-10: High-risk surfaces (/src/security, /src/runtime, /src/memory, /.github, Cargo.*)
Lines 13-15: CI infrastructure (/.github/workflows, /.github/codeql, /.github/dependabot.yml)
Lines 18-23: Documentation (/docs, *.md files)
Lines 26-28: Security overrides (last-match-wins for /SECURITY.md, actions-source-policy.md, ci-map.md)
Sources: .github/CODEOWNERS:1-29