Skip to content

feat: implement issue #61 — Compliance: codeowners-org-leads-not-first - #552

Merged
don-petry merged 26 commits into
mainfrom
dev-lead/issue-61-20260610-1417
Jun 13, 2026
Merged

feat: implement issue #61 — Compliance: codeowners-org-leads-not-first#552
don-petry merged 26 commits into
mainfrom
dev-lead/issue-61-20260610-1417

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #61

Implemented by dev-lead agent. Please review.

Copilot AI review requested due to automatic review settings June 10, 2026 14:29
@don-petry
don-petry requested a review from a team as a code owner June 10, 2026 14:29
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 40 minutes and 11 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: abfa6d07-7d15-4c88-b708-f4fc1a83030c

📥 Commits

Reviewing files that changed from the base of the PR and between 3f9e580 and 6616494.

📒 Files selected for processing (2)
  • scripts/dev-lead-lint.sh
  • tests/dev-lead/unit/test_dev_lead_lint.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-61-20260610-1417

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a CODEOWNERS validation step to the dev-lead-lint.sh script to ensure that @petry-projects/org-leads is always listed as the first owner, accompanied by comprehensive unit tests. The review feedback points out performance and correctness issues with the current implementation—specifically regarding subshell forks per line, CRLF line endings, and escaped spaces in paths—and provides a pure Bash suggestion to resolve them.

Comment thread scripts/dev-lead-lint.sh
Comment on lines +108 to +116
while IFS= read -r line; do
[[ "$line" =~ ^[[:space:]]*$ ]] && continue
[[ "$line" =~ ^[[:space:]]*# ]] && continue
first_owner=$(printf '%s\n' "$line" | awk '{print $2}')
if [ "$first_owner" != "@petry-projects/org-leads" ]; then
echo "FAIL: $codeowners_file — @petry-projects/org-leads must be the first owner on line: $line"
codeowners_fail=1
fi
done < "$codeowners_file"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Running printf and awk in a subshell for every line of the file is highly inefficient in Bash because it forks two new processes per line. This can make the lint script noticeably slow, especially on Windows or macOS environments.

Additionally, this approach has two correctness issues:

  1. CRLF Line Endings: If the CODEOWNERS file has CRLF (\r\n) line endings, the trailing \r will remain on the line and cause the validation to fail.
  2. Escaped Spaces: If a pattern contains escaped spaces (e.g., path\\ with\\ spaces/ @owner), awk will split on the space and incorrectly identify the second part of the path as the owner.

We can resolve all of these issues efficiently using pure Bash built-ins and array splitting.

Suggested change
while IFS= read -r line; do
[[ "$line" =~ ^[[:space:]]*$ ]] && continue
[[ "$line" =~ ^[[:space:]]*# ]] && continue
first_owner=$(printf '%s\n' "$line" | awk '{print $2}')
if [ "$first_owner" != "@petry-projects/org-leads" ]; then
echo "FAIL: $codeowners_file — @petry-projects/org-leads must be the first owner on line: $line"
codeowners_fail=1
fi
done < "$codeowners_file"
while IFS= read -r line; do
line="${line%$'\r'}"
[[ "$line" =~ ^[[:space:]]*$ ]] && continue
[[ "$line" =~ ^[[:space:]]*# ]] && continue
clean_line="${line//\\ /}"
read -r -a parts <<< "$clean_line"
first_owner="${parts[1]:-}"
if [ "$first_owner" != "@petry-projects/org-leads" ]; then
echo "FAIL: $codeowners_file — @petry-projects/org-leads must be the first owner on line: $line"
codeowners_fail=1
fi
done < "$codeowners_file"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented the suggestion in scripts/dev-lead-lint.sh (lines 108–116): replaced the printf '%s\n' "$line" | awk '{print $2}' subshell with pure Bash builtins — added line="${line%$'\r'}" to strip CRLF, clean_line="${line//\\ /}" to handle escaped spaces in paths, and read -r -a parts <<< "$clean_line" to split on whitespace without forking processes. Also added three new bats tests in tests/dev-lead/unit/test_dev_lead_lint.bats covering CRLF handling, escaped-space paths, and CRLF-with-wrong-owner; all 22 tests pass.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed implemented. scripts/dev-lead-lint.sh lines 108–119 now use pure Bash builtins matching the suggestion exactly: line="${line%$'\r'}" strips CRLF, clean_line="${line//\\ /}" collapses escaped spaces before splitting, and read -r -a parts <<< "$clean_line" replaces the per-line printf | awk subshell. Three corresponding bats tests (lines 256–279 in tests/dev-lead/unit/test_dev_lead_lint.bats) cover CRLF-clean, escaped-space paths, and CRLF-with-wrong-owner. ShellCheck passes with no warnings.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified as implemented: scripts/dev-lead-lint.sh lines 108–119 now match the suggestion exactly — line="${line%$'\r'}" strips CRLF, clean_line="${line//\\ /}" collapses escaped spaces, and read -r -a parts <<< "$clean_line" replaces the per-line printf | awk subshell. Three bats tests (lines 256–279 in tests/dev-lead/unit/test_dev_lead_lint.bats) cover CRLF-clean, escaped-space paths, and CRLF-with-wrong-owner. ShellCheck passes with no warnings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the compliance requirement from issue #61 by adding a repo-local lint guard that validates CODEOWNERS owner lines always list @petry-projects/org-leads as the first owner, preventing future regressions.

Changes:

  • Add CODEOWNERS validation to scripts/dev-lead-lint.sh (checks .github/CODEOWNERS, CODEOWNERS, or docs/CODEOWNERS in priority order).
  • Add Bats unit tests covering pass/fail scenarios for the new CODEOWNERS lint behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/dev-lead/unit/test_dev_lead_lint.bats Adds unit tests for CODEOWNERS lint scenarios (missing file, valid ordering, invalid ordering, comments/blanks).
scripts/dev-lead-lint.sh Adds a new lint phase to enforce @petry-projects/org-leads as the first owner on each non-comment CODEOWNERS line.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 10, 2026 14:41
@don-petry
don-petry disabled auto-merge June 10, 2026 14:53
@don-petry
don-petry enabled auto-merge (squash) June 10, 2026 14:58
@don-petry
don-petry disabled auto-merge June 10, 2026 21:20
@don-petry
don-petry enabled auto-merge (squash) June 10, 2026 21:22
donpetry-bot
donpetry-bot previously approved these changes Jun 10, 2026

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 780fe17a11607cd65be2c86c8e3143fa471ff202
Review mode: triage-approved (single reviewer)

Summary

Adds a CODEOWNERS lint phase to scripts/dev-lead-lint.sh that enforces @petry-projects/org-leads as the first owner, with 9 bats tests covering pass/fail/blank/comment/CRLF/escaped-space cases. Implementation is pure bash (no per-line subshells), strips CR for CRLF, and removes escaped spaces before parsing — directly addressing gemini-code-assist's earlier feedback.

Linked issue analysis

Closes #61 (Compliance: codeowners-org-leads-not-first). The new lint phase implements exactly the compliance check named in the issue, looking at .github/CODEOWNERS / CODEOWNERS / docs/CODEOWNERS in priority order. Scope matches the issue.

Findings

No blocking issues.\n\n- The implementation is pure bash with no per-line forks, handles CRLF endings (${line%$'\\r'}) and escaped spaces in paths (${line//\\\\ /}), and skips blank/comment lines correctly.\n- The repo's own .github/CODEOWNERS already lists @petry-projects/org-leads first, so the new check will not break the repository it ships in.\n- shellcheck passes (no warnings on the modified script).\n- Tests cover: missing file, single owner, multi-owner, wrong first owner, missing org-leads, comments+blanks, CRLF, escaped spaces, and CRLF+wrong order. Coverage is thorough.\n- Minor nit (non-blocking): trailing inline comments on an owner line (e.g. * @owner # note) would be parsed as tokens — but CODEOWNERS rarely uses inline comments and this is consistent with how GitHub's own parser treats them in practice.

CI status

All checks passing: CI (Lint, ShellCheck, Agent Security Scan, Compile agentic workflows, Secret scan), Lint workflow (bats, shellcheck, gh-aw-compile, validate-agent-profiles), Tests (unit-tests), Test Dev-Lead Agent (validate-fixtures, unit, prompt-coverage, concurrency-config, caller-permissions, toplevel-permissions, stub-structure, dependency-audit-stub), CodeQL (actions + python), SonarCloud (quality gate passed), AgentShield, Dev-Lead Agent dispatch, Dependency audit (no applicable ecosystems). External reviews (gemini, copilot) have no unresolved blocking comments; CodeRabbit was rate-limited (not a failure).


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 4.7). Reply if you need a human review.

@don-petry
don-petry disabled auto-merge June 10, 2026 22:50
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #552
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-10T23:24:02Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-10T23:24:02Z

@don-petry
don-petry enabled auto-merge (squash) June 10, 2026 22:54
@don-petry
don-petry disabled auto-merge June 10, 2026 23:09
@don-petry
don-petry enabled auto-merge (squash) June 10, 2026 23:11
donpetry-bot
donpetry-bot previously approved these changes Jun 10, 2026

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 9d64239fb03affbf3ed1c937c531cb0665ad019e
Review mode: triage-approved (single reviewer)

Summary

Triage confirmation of a small, focused change: adds a CODEOWNERS lint phase to scripts/dev-lead-lint.sh enforcing @petry-projects/org-leads as the first owner, with 9 bats tests (pass/fail/blank/comment/CRLF/escaped-space). Already approved by the cascade at 780fe17; the only commits since are merges from main bringing in unrelated files (feature-ideation, release runbook) — no scope changes.

Linked issue analysis

Closes #61 (Compliance: codeowners-org-leads-not-first). The new lint phase implements exactly the named compliance check, scanning .github/CODEOWNERS / CODEOWNERS / docs/CODEOWNERS in priority order. Scope matches the issue.

Findings

No blocking issues.

  • Pure bash with no per-line subshell forks; strips CR for CRLF (${line%$'\\r'}) and removes escaped spaces (${line//\\\\ /}) before tokenizing — directly addresses gemini-code-assist's earlier feedback.
  • Repo's own .github/CODEOWNERS already lists @petry-projects/org-leads first, so the new check will not break the repository it ships in.
  • shellcheck and bats both pass on head SHA.
  • Test coverage is thorough: missing file, single owner, multi-owner, wrong first owner, missing org-leads, comments+blanks, CRLF, escaped paths, CRLF+wrong order.
  • Merges from main since prior review touch only unrelated files (feature-ideation workflow + sources, release runbook) and do not affect PR scope.

CI status

All checks passing on 9d64239: CI (Lint, ShellCheck, Agent Security Scan, Compile agentic workflows, Secret scan), Lint workflow (bats, shellcheck, gh-aw-compile, validate-agent-profiles), Tests (unit-tests), Test Dev-Lead Agent (validate-fixtures, unit, prompt-coverage, concurrency-config, caller-permissions, toplevel-permissions, stub-structure, dependency-audit-stub), CodeQL (actions + python), SonarCloud (quality gate passed, 0 new issues), AgentShield, Dev-Lead Agent dispatch, Dependency audit (no applicable ecosystems). External reviewers: gemini and copilot left no unresolved blockers; CodeRabbit was rate-limited (not a failure). mergeStateStatus: BLOCKED is expected — branch protection requires a fresh approval on the current head.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 4.7). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review June 10, 2026 23:13

Superseded by automated re-review at 9d64239.

@don-petry
don-petry disabled auto-merge June 11, 2026 00:59
@don-petry
don-petry enabled auto-merge (squash) June 12, 2026 02:18
@don-petry
don-petry disabled auto-merge June 12, 2026 02:19
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
Skipped (informational): 0
No action required — SonarCloud quality gate is passing with 0 issues. All CI checks pass. Stale gemini-code-assist comment from earlier commit is already addressed in current code. PR is approved and ready.
```

@don-petry
don-petry enabled auto-merge (squash) June 12, 2026 02:19
donpetry-bot
donpetry-bot previously approved these changes Jun 12, 2026

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: cbabe7e216583e0d3b315b0ea52369e9a1357960
Review mode: triage-approved (single reviewer)

Summary

Adds a CODEOWNERS validation check to scripts/dev-lead-lint.sh enforcing that @petry-projects/org-leads is the first owner on every owner line, with 9 bats tests covering pass/fail cases, comments, blank lines, CRLF endings, and escaped spaces. Confirms the triage assessment: focused, well-tested, low-risk change. Only delta since the prior cascade review (eb7fa4c) is a merge of main; no PR-owned files changed.

Linked issue analysis

Issue #61 (compliance: codeowners-org-leads-not-first) requires CODEOWNERS owner lines to list @petry-projects/org-leads first. The repo's .github/CODEOWNERS is already compliant ('* @petry-projects/org-leads'); this PR adds ongoing enforcement to the dev-lead lint script so regressions are caught locally. Substantively addresses the finding.

Findings

No blocking issues.

  • Resolved prior feedback: the gemini-code-assist performance suggestion (per-line printf | awk subshell) is implemented in the current diff using pure Bash builtins (${line%$'\r'}, ${line//\\ /}, read -r -a parts). The review thread shows as unresolved in the UI, but the owner confirmed implementation and the code verifiably matches the suggestion.
  • Minor (non-blocking): under set -euo pipefail, [ "$codeowners_fail" -eq 0 ] && echo "OK: ..." exits the script immediately on a failed check. Exit status is still non-zero (correct), and fail=1 is set on the preceding line, but the pattern bypasses the script's fail accumulation and would silently skip any checks added after this block. Suggest an if statement in a follow-up.
  • Minor (non-blocking): while IFS= read -r line skips a final CODEOWNERS line lacking a trailing newline. Edge case; unlikely in practice.

CI status

All 35 checks green: shellcheck, bats, unit-tests, CodeQL (actions+python), SonarCloud quality gate (0 new issues), gitleaks, Agent Security Scan, agent-shield, lint/validate jobs all SUCCESS; remaining checks SKIPPED (not applicable).


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review June 12, 2026 02:21

Superseded by automated re-review at cbabe7e.

@don-petry
don-petry disabled auto-merge June 13, 2026 12:51
@don-petry
don-petry enabled auto-merge (squash) June 13, 2026 12:53
@don-petry
don-petry disabled auto-merge June 13, 2026 12:55
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
**Bot Comment Analysis:**
The SonarCloud comment is **informational** — it reports that quality checks passed. There are no specific code issues, security hotspots, or bugs referenced for me to fix. The "0 New issues" result means no actionable findings exist.
---
## Summary
**No actionable changes required**
- **Bot:** SonarCloud (Quality Gate passed)
- **Issues identified:** 0 new issues, 0 security hotspots
- **Tier 1 blockers:** None
- **Status:** PR is green across all checks (CI success, APPROVED review from dev-lead agent)
The PR is ready to merge. All quality gates and CI checks pass with no issues to address.

@don-petry
don-petry enabled auto-merge (squash) June 13, 2026 12:55
donpetry-bot
donpetry-bot previously approved these changes Jun 13, 2026

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: c50ff372b70978100414d4fd02a31af108a7dbef
Review mode: triage-approved (single reviewer)

Summary

Adds a CODEOWNERS validation check to scripts/dev-lead-lint.sh enforcing that @petry-projects/org-leads is the first owner on every CODEOWNERS line, with 9 new bats tests covering pass/fail, comments/blanks, CRLF, and escaped-space paths. +113/-0 across 2 files.

Linked issue analysis

Closes #61 (Compliance: codeowners-org-leads-not-first), which requires CODEOWNERS owner lines to list @petry-projects/org-leads as the FIRST owner. The new check parses each owner line, skips comments/blanks, strips CR and escaped spaces, and fails if parts[1] != @petry-projects/org-leads — substantively implementing the standard as a repeatable lint gate.

Findings

No issues. Logic is correct: parts[0] is the path pattern, parts[1] the first owner. CRLF handled via ${line%$'\r'} and escaped spaces via ${line//\ /} (both test-covered). The earlier gemini-code-assist advisory (printf/awk subshell with CRLF and escaped-space correctness bugs) was a COMMENTED note on a prior commit and is fully resolved in the current pure-bash implementation. No auth/secrets/migrations/security-sensitive surface; non-destructive read-only validation.

CI status

All checks green (shellcheck, bats, unit-tests, CodeQL, SonarCloud, agent-shield, secret scan, etc.); dependency-audit ecosystem jobs SKIPPED as expected. SonarCloud Quality Gate passed with 0 new issues. donpetry-bot review is APPROVED; no CHANGES_REQUESTED reviews and no open human-reviewer questions.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review June 13, 2026 12:56

Superseded by automated re-review at c50ff37.

@don-petry
don-petry disabled auto-merge June 13, 2026 13:05
@don-petry
don-petry enabled auto-merge (squash) June 13, 2026 13:07
@don-petry
don-petry disabled auto-merge June 13, 2026 13:08
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
Files changed: None (Quality Gate passed, no fixes needed)
Tier 1 blockers: None
PR state: APPROVED, all checks green
```

donpetry-bot
donpetry-bot previously approved these changes Jun 13, 2026

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 9b23306ee2294318fac8bda4fbfd694eecc4dc12
Review mode: triage-approved (single reviewer)

Summary

Adds a CODEOWNERS lint check to scripts/dev-lead-lint.sh enforcing that @petry-projects/org-leads is the first owner on every owner line, plus 9 bats unit tests. Directly resolves compliance finding #61 (codeowners-org-leads-not-first). +113/-0 across 2 files.

Linked issue analysis

Issue #61 is a compliance-audit finding requiring CODEOWNERS owner lines to list @petry-projects/org-leads first (check: codeowners-org-leads-not-first, standard: standards/codeowners-standard.md). The PR implements exactly this validation and exercises it with passing/failing/edge-case tests. Substantively addressed.

Findings

No blocking findings. The earlier gemini-code-assist high-priority comment (printf/awk subshell per line; CRLF; escaped spaces) was raised against an older commit and is fully resolved at the reviewed head: the implementation now uses a pure-bash while IFS= read -r loop, strips trailing CR via ${line%$'\r'}, and handles escaped spaces via ${line//\ /}. Both CRLF and escaped-space cases have dedicated tests. Verified the parsing logic locally against all test cases — correct. shellcheck passes clean.

CI status

All checks green: CodeQL (Analyze actions, Analyze python, CodeQL) SUCCESS; CodeRabbit SUCCESS; SonarQube Cloud Quality Gate passed (0 new issues). mergeStateStatus is BLOCKED only pending an approving review.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
Files changed: none (Quality Gate passed, no actionable issues found)
Skipped (informational): 0
```
The pull request is clean and ready to merge. All automated quality checks pass, the PR review is approved, and there are no open findings to resolve.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 66164943402b0a91f98ce61b6ce4948f6fcda65a
Review mode: triage-approved (single reviewer)

Summary

Adds a CODEOWNERS validation step to scripts/dev-lead-lint.sh enforcing that @petry-projects/org-leads is listed first on every owner line, plus 9 bats unit tests. +113/-0 across 2 files (lint script + tests). Directly implements the enforcement for compliance check codeowners-org-leads-not-first from issue #61.

Linked issue analysis

Issue #61 (OPEN) is an auto-generated compliance finding requiring CODEOWNERS owner lines to list @petry-projects/org-leads first (check codeowners-org-leads-not-first, standard codeowners-standard.md). This PR addresses it by adding an automated lint check that detects/enforces the standard, backed by comprehensive tests. Substantively addressed as a tooling/enforcement implementation.

Findings

No blocking findings. Lint logic correctly handles edge cases: strips CRLF (${line%$'\r'}), collapses escaped spaces in paths before splitting, skips comments/blank lines, and uses pure Bash builtins (read -a) rather than per-line subshells. The earlier gemini-code-assist HIGH-priority comment about printf|awk subshell inefficiency and CRLF correctness was resolved in the current head SHA — the code now matches the suggested pure-Bash approach, and tests cover CRLF and escaped-space cases. Note: the PR adds enforcement tooling rather than mutating an existing non-compliant CODEOWNERS file, which is the appropriate dev-lead interpretation.

CI status

All checks green or skipped (no failures). Includes shellcheck, ShellCheck, bats, unit-tests, CodeQL, SonarCloud, agent-shield/AgentShield, Agent Security Scan, gitleaks secret scan, CodeRabbit — all SUCCESS. mergeStateStatus is BLOCKED pending the required review gate; mergeable=MERGEABLE.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compliance: codeowners-org-leads-not-first

3 participants