Repository navigation
feat: github_edit_issue (title/body) and github_create_label write tools - #40
Merged
mabry1985 merged 1 commit intoOct 17, 2026
Merged
Conversation
There was a problem hiding this comment.
QA panel review — WARN
code-review-structural · head 1566414f8f13 · formal
Clean additive PR with one confirmed minor conventions finding: github_create_label classifies a gh failure tool-side rather than extending check_gh_error, violating PROTO.md §5. Verification confirmed the finding (n=1, no refutations). No prior requests to disposition. No coverage gaps — every changed file was read by at least two finders.
Findings
| Severity | Location | Finding | Verified | |
|---|---|---|---|---|
| 🟡 | minor | write_tools.py:420 |
github_create_label classifies a gh failure tool-side (matching 'already exists' in stderr and returning a custom message) instead of adding that category to g… | confirmed |
findings JSON (machine-readable)
[
{
"file": "write_tools.py",
"line": 420,
"severity": "minor",
"category": "conventions",
"claim": "github_create_label classifies a gh failure tool-side (matching 'already exists' in stderr and returning a custom message) instead of adding that category to gh_cli.check_gh_error, violating PROTO.md \u00a75's 'Add a category here, not in a tool' rule.",
"evidence": "low = (serr or \"\").lower()\n if rc != 0 and (\"already exists\" in low or \"already_exists\" in low):\n return f\"Label {name!r} already exists in {repo} \u2014 not overwritten (github_create_label never forces).\"\n if gh_err := check_gh_error(rc, serr, repo=repo):",
"verdict": "confirmed",
"note": "Code at write_tools.py:420-423 matches verbatim; PROTO.md \u00a75 (line ~163) states 'Add a category here, not in a tool.' The tool-side 'already exists' check bypasses check_gh_error's classification, violating that rule.",
"line_original": 419,
"line_corrected": true
}
]There was a problem hiding this comment.
Promoting the WARN verdict for head 1566414f8f13: all checks terminal-green, zero unresolved review threads. (approve-on-green)
Open findings carried by this approval — non-blocking, but they did not go away:
- minor
write_tools.py:420— github_create_label classifies a gh failure tool-side (matching 'already exists' in stderr and returning a custom message) instead of adding that category to gh_cli.check_gh_error, violating PROTO.md
Approving a WARN does not resolve its findings (issue #22).
mabry1985
deleted the
feat/bd-zxpz-github-edit-issue-title-body-and-github
branch
October 17, 2026 02:58
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
Added two gated write tools to
write_tools.py:github_edit_issue(number, repo="", title="", body="")— runsgh issue edit <n> --repo … [--title] [--body], the issue-side counterpart ofgithub_edit_pr. Refuses with anError:string (and runs nothing) when neither title nor body is given.github_create_label(name, repo="", color="", description="")— runsgh label create <name> --repo … [--color] [--description]with no--force, so an existing label returns a readable "already exists" message instead of an error trace. Empty name is refused.Both validate the repo via
bad_repo(), read config live through the existingdefault_repogetter, return readableError:strings (never raise), and use plain-string@tooldocstrings. They register only whengithub.writeis true. Since this adds two tools, the inventory counts were bumped in lockstep (10→12 write, 29→31 total) acrosstest_register.py,test_no_raise_sweep.py's_ARGS, PROTO.md §3/§5, and README.md — otherwise the inventory-coherence gate fails. Version intentionally not bumped.Fixes #39