Skip to content

Consolidate the Write Guard's Flag-Value Argv Walks #3285

Closed

Description

@ptr727

Context

Raised by the local review of #3283. That pull request adds _gh_owner_words and _gh_issue_ref_words to host-setup/agent-safety/claude/gh-write-guard.py.

The Duplication

_gh_owner_words, _gh_issue_ref_words, and _gh_positional_repo_words each walk a gh argv the same way. Each skips a text flag's value, stops at --, splits a word on =, and takes the next word when no value is attached. _gh_repo_words reads the repo flag in a similar way. A fix to one walk, such as how a short-option cluster is read, then has to be made in each copy.

Possible Direction

Add one reader that yields each (flag name, value) pair a gh argv holds for a given set of flag names. Move the walks onto it, and check the move with a develop-versus-branch differential over the guard's self-test commands, expecting no verdict change.

🤖 Generated with Claude Code

Activity

  1. added
    introducedReview finding classed introduced per local-strict-review Disposing of Findings
    scriptA defect in hub tooling
    on Oct 20, 2026
  2. ptr727 commented on Oct 23, 2026

    @ptr727
    OwnerAuthor

    Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    introducedReview finding classed introduced per local-strict-review Disposing of FindingsscriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions