fix: hint at permissions when R-PR-001 assignee mutation 404s - #64
Merged
Merged
Conversation
FilOzone/team-skills#14 was failing the hourly mechanical-rules run because the FilOzzy bot only had read access to that repo (never granted triage+ via github-mgmt), and GitHub returns a bare 404 for both "not found" and "no write access" on the assignees endpoint. Annotate that specific 404 with a permissions hint, and document the per-repo access requirement so it's actionable directly from the GITHUB_STEP_SUMMARY next time a new board repo is missing this grant. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
BigLep
commented
Sep 25, 2026
BigLep
left a comment
Contributor
Author
There was a problem hiding this comment.
This is a sensible clarity item. I'll merge since I don't see any reason not to. worst case we change in future. this isn't mission ciritical.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add focused tests covering the new 404 behavior and non-404 error handling.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Improves diagnostics for assignee-mutation 404 errors and documents repository-level permissions.
Changes:
- Adds a permissions hint to relevant 404 errors.
- Documents required bot access for new board repositories.
| File | Summary |
|---|---|
foc-mechanical-rules/README.md |
Documents repository permission requirements. |
foc-mechanical-rules/foc_mechanical_rules/github_api.py |
Annotates assignee-mutation 404 errors. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+112
to
+115
| indistinguishable from the response alone, but in this codebase's usage | ||
| (the target is always the PR's own author) it's almost always the | ||
| former, so the error is annotated with that hint rather than left as a | ||
| bare "Not Found". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
FOC Board Mechanical Rulesworkflow had been failing since 2026-09-24T22:05 onFilOzone/team-skills#14:R-PR-001's assignee mutation returned a bare404 Client Error: Not Found. Root cause was that theFilOzzybot only had read access toteam-skills(never granted triage+ access, unlike every other board repo), which I've since fixed directly viagh api .../collaborators/FilOzzy(role_name: triage).add_assigneenow detects that specific 404 and re-raises with an explicit permissions hint instead of the raw GitHub message, so the next time a newly-added board repo is missing this grant, the failure is actionable straight fromGITHUB_STEP_SUMMARY.github-mgmtor a direct collaborator add) or this recurs.cli.pyunchanged — that's intentional so permission gaps get noticed.Test plan
uv run pytest -m "not integration" -k "assignee"— 8 passedgh api repos/FilOzone/team-skills/collaborators/FilOzzy/permissionnow reportsrole_name: triageworkflow_dispatchdry-run (36169922287) — succeeded (note: dry-run skips the actualadd_assigneecall, so real confirmation comes from the next scheduled hourly run)🤖 Generated with Claude Code