Skip to content

Recipe Read Guard: check-ignore Metadata Command Compatibility (#4262)#4263

Open
AyushkhatiDev wants to merge 1 commit into
TalonT-Org:developfrom
AyushkhatiDev:dry-walkthrough-check-ignore-guard-compat/4262
Open

Recipe Read Guard: check-ignore Metadata Command Compatibility (#4262)#4263
AyushkhatiDev wants to merge 1 commit into
TalonT-Org:developfrom
AyushkhatiDev:dry-walkthrough-check-ignore-guard-compat/4262

Conversation

@AyushkhatiDev

Copy link
Copy Markdown

git check-ignore -v {path} was getting blocked by recipe_read_guard on protected paths because check-ignore was never added to _PROTECTED_PATH_METADATA_GIT_SUBCOMMANDS — #4213 only covered add/diff/status/wc -l.
Added a narrow classifier for the exact form dry-walkthrough prescribes. Only allows -v/--verbose with literal paths — rejects --stdin, shell variables, redirect metacharacters, and global Git options that can redirect config or repo context (-c, -C, --git-dir, --work-tree, --bare). Hook and server layers share the same primitive so parity is automatic.
Closes #4262

…T-Org#4262)

## Summary

dry-walkthrough's required committability check (`git check-ignore -v {path}`)
was denied by recipe_read_guard whenever the deliverable path was a protected
recipe, skill, or agent path, because `check-ignore` was missing from
`_PROTECTED_PATH_METADATA_GIT_SUBCOMMANDS` (PR TalonT-Org#4213's staged allowlist only
covered `add`/`diff`/`status`/`wc -l`).

Adds a narrow classifier for the exact grammar dry-walkthrough prescribes:
`git check-ignore (-v|--verbose) [--no-index] [--] LITERAL_PATH...`. Permits
only forms whose output is limited to ignore provenance/status for named
literal paths. Rejects Git global options that redirect repository/config
context (`-c`, `-C`, `--git-dir`, `--work-tree`, `--bare`), `--stdin` and
other non-literal path sources, redirect metacharacters, and unexpanded
shell variables. Both the hook (`recipe_read_guard.py`) and server
(`_guards.py`) enforcement layers share the same primitive, so classification
stays in parity automatically.

Closes TalonT-Org#4262

🤖 Generated with [Claude Code](https://claude.com/claude-code) via
AutoSkillit
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.

1 participant