Skip to content

fix: Address review nits from rossoctl/repoman#24 - #142

Merged
jimcadden merged 4 commits into
mainfrom
chore/review-nits-from-repoman-24
Nov 16, 2026
Merged

jimcadden merged 4 commits into
mainfrom
chore/review-nits-from-repoman-24

Conversation

@jimcadden

@jimcadden jimcadden commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Provenance

Applies the engine-script review nits raised on rossoctl/repoman#24 (rossoctl/repoman#24) — repoman only vendors the engine scripts, so these fixes land here first. Reviewers: @rubambiza (github-api.sh), @clawgenti (link-health-scanner.sh).

Changes

  1. github-api.sh — fixer_comment_count doc comment: updated the usage/Args examples to the rossoctl era (rossoctl/repoman), matching the one-line change already carried by the vendored copy in repoman#24 (commit 96919b4) byte-for-byte so the next vendoring converges.

  2. github-api.sh — resolve_skill_meta gh api call: the provenance lookup no longer discards gh's stderr and exit code behind 2>/dev/null. It now captures both and distinguishes error classes: an HTTP 401/403/404 that is not a rate limit is reported as an auth/permission failure (token likely lacks read access to the source repo), while anything else — network blip, rate limit — is reported as transient (will retry next run). gh's stderr is surfaced indented under the warning. Both classes remain non-fatal: provenance never affects the scan/fix rc, and no meta file is written on failure either way. Note: the two jq meta-file reads in the same function already handle failure correctly (empty output falls through to re-resolution with a WARN), so they were left as-is; no repo-wide audit was done.

  3. link-health-scanner.sh — WARN headers: the three WARN: header lines paired with a stderr excerpt (checker non-zero exit, empty output, invalid JSON) now go to stderr (>&2) so each header stays with its excerpt when streams are captured separately (cron logs).

  4. CLAUDE.md — error-handling policy: encoded the policy per the review request — engine scripts must not silently swallow exit codes behind 2>/dev/null; capture return codes and keep transient vs. permission error classes distinguishable so calling scripts can react.

Also adds Branch 7 to tests/test-skill-meta.sh: regression coverage for the new failure classification (bare 403 = permission class; 403 rate limit and network errors = transient; gh stderr surfaced; no meta file written on any failure class).

Validation

  • Full test suite (the CI Run test suite list from .github/workflows/tests.yml): all shell test files pass, plus python3 tests/test-link-check.py — 52 tests, OK (1 skipped).
  • shellcheck --severity=warning on the touched scripts (scripts/github-api.sh, scripts/link-health-scanner.sh, tests/test-skill-meta.sh) and the full CI library-module shellcheck step: clean.
  • bash -n on all touched scripts: clean.

Assisted-By: Claude Code

Applies the engine-script review feedback from
rossoctl/repoman#24:

- github-api.sh: bring the fixer_comment_count usage/Args doc examples
  to the rossoctl era (rossoctl/repoman), matching the vendored copy in
  repoman#24 byte-for-byte so the next vendoring converges.
- github-api.sh: resolve_skill_meta no longer discards gh's stderr and
  exit code behind 2>/dev/null -- the gh api provenance lookup now
  captures both and distinguishes an auth/permission failure (HTTP
  401/403/404 that is not a rate limit) from a transient one, so a wrong
  PAT no longer reads as a GitHub hiccup. Both classes stay non-fatal.
- link-health-scanner.sh: the three WARN: headers paired with a stderr
  excerpt now go to stderr themselves, so header and excerpt land in the
  same place when streams are captured separately (cron logs).
- CLAUDE.md: encode the error-handling policy (no silently swallowed
  exit codes behind 2>/dev/null; keep transient vs. permission error
  classes distinguishable) per reviewer request.
- test-skill-meta.sh: Branch 7 regression coverage for the new failure
  classification (bare 403 = permission, 403 rate limit and network
  errors = transient).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Jim Cadden <[email protected]>
@jimcadden jimcadden added the ready-for-ai-review Request automated AI code review from clawgenti label Nov 12, 2026
@jimcadden
jimcadden marked this pull request as ready for review November 12, 2026 21:48

@clawgenti clawgenti 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.

Summary

All checks pass. Ready for human review.

The provenance lookup now keeps gh's exit code and stderr and tells permission refusals apart from transient failures. Both stay non-fatal, and no meta file is written on any failure. The scanner's WARN headers now go to stderr with their excerpts, and Branch 7 covers the classification, including the 403 rate-limit case.

Author: jimcadden (COLLABORATOR — maintainer)
Areas reviewed: Shell (github-api.sh, link-health-scanner.sh, tests), Docs (CLAUDE.md)
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: PR checks pass (DCO, PR title, project automation). The push-triggered tests.yml run on this head failed, and it is also failing on main since c138e5f, so that failure predates this PR.

Verified by: bash tests/test-skill-meta.sh on head (PASS) and the CI shell test list. The only local failure is test-extract-broken-links.sh Test 11, a sandbox /dev/stdin limitation that is unrelated to this PR.

Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).

@rubambiza rubambiza 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.

I am raising the below issue to a must fix because I keep finding it across repos now 😅 Looking back, I think it's the same pattern that Vinod described in his talk yesterday.

Comment thread tests/test-skill-meta.sh Resolved
Encode in CLAUDE.md that citations of issues/PRs from other repos (e.g.
repoman while working in automation) must use the full URL rather than
bare shorthand like repoman#24, so references stay traceable outside
GitHub's auto-linking (raised in
rossoctl/repoman#24 (comment)).
Linkify the bare cross-repo refs this PR itself introduced: the
repoman#10 citations in the attribution-footer spec and the repoman#24
comment in tests/test-skill-meta.sh.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Jim Cadden <[email protected]>
@jimcadden
jimcadden requested a review from rubambiza November 13, 2026 19:53

@clawgenti clawgenti 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.

Summary

Clean fix-up PR: the resolve_skill_meta provenance lookup now keeps gh's stderr and exit code and distinguishes permission-class (401/403/404, non-rate-limit) from transient failures; the three link-health-scanner WARN headers moved to stderr so they stay with their excerpts; docs encode the error-handling policy and cross-repo URL convention. New Branch 7 in tests/test-skill-meta.sh covers all three failure classes. DCO and title checks pass; the touched-scripts shellcheck and full test suite are reported green in the PR body.

No must-fix issues. One suggestion below.

Author: jimcadden (COLLABORATOR — maintainer)
Areas reviewed: Shell, Docs, Tests
Agent/IDE config (.claude/.vscode): none
Commits: 2 commits, all signed-off: yes
CI status: passing

Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).

Comment thread scripts/github-api.sh Resolved
@clawgenti clawgenti mentioned this pull request Nov 16, 2026
10 tasks
jimcadden and others added 2 commits November 16, 2026 13:17
resolve_skill_meta still classifies permission vs transient failures
from gh's human stderr, because gh has no stable machine-readable error
code (GH_ERROR_FORMAT is an open design). Note that next to the grep,
and pin gh 2.89's "gh: <message> (HTTP 403)" shape in Branch 7 so a
reword fails the test instead of classing a permission refusal as
transient.

Drop the leftover bare repoman#24 in that test header; cross-repo
citations use the full URL.

Assisted-by: Cursor <[email protected]>
Signed-off-by: Jim Cadden <[email protected]>
Co-authored-by: Cursor <[email protected]>

@clawgenti clawgenti 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.

Clawgenti Code Review

Read the full diff. The error-class split in resolve_skill_meta is the right design: exit code and stderr captured, permission (401/403/404 non-rate-limit) vs transient distinguished, both non-fatal, no meta file written on either — and Branch 7 pins the exact gh 2.89 stderr shapes so a gh reword flips a test instead of silently misclassifying. The >&2 fixes in link-health-scanner.sh correctly pair each WARN header with its excerpt, and the CLAUDE.md policy + cross-repo URL rule codify what this PR practices. DCO signed on all commits; title check passes.

No must-fix findings. One nit below.

Author: jimcadden (COLLABORATOR — maintainer)
Areas reviewed: Shell (github-api.sh, link-health-scanner.sh), tests, docs/spec, CLAUDE.md
Agent/IDE config (.claude/.vscode): none
Commits: 4 commits, all signed-off: yes
CI status: DCO and verify-pr-title passing (no test workflow on this repo)


Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).

Comment thread scripts/github-api.sh Resolved

@clawgenti clawgenti 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.

@rubambiza rubambiza 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.

LGTM.

Comment thread CLAUDE.md
- Commit message trailers referenced in PR descriptions
- Any auto-generated changelogs or release notes

## Cross-Repo References

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.

Thanks for this. :)

@jimcadden
jimcadden merged commit ef8a26f into main Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ai-review Request automated AI code review from clawgenti

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants