Skip to content

fix(tui): make Allow pattern a generalized family - #357

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/allow-pattern-generic
Aug 15, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/allow-pattern-generic

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

  • Allow pattern now remembers a generalized session pattern (suggest_pattern), not one exact argv/cwd/env.
  • Example: git push -u origin main shows and grants bash(git push *). Later git push origin feature does not ask again; git status still does.
  • File and fetch calls generalize the same way (read_file(src/**), host for URLs).
  • Still session-only — nothing is written to permissions.toml.

Test plan

  • cargo test --package forge-governance --locked --lib
  • cargo test --package forge-core --locked --lib session_pattern
  • cargo test --package forge-tui --locked --lib approval
  • cargo clippy --package forge-governance --package forge-core --package forge-tui --all-targets --locked -- -D warnings
  • In the TUI, confirm an approval shows Allow pattern bash(git push *) (or similar), not the full exact command.
  • Pick Allow pattern, then run a sibling command in the same family and confirm it is not asked again.
  • Run a different family and confirm Forge still asks.

Allow pattern now remembers suggest_pattern for the session, e.g.
bash(git push *), instead of one exact argv. Sibling commands in that
family skip HITL; a different family still asks. Still not written to
permissions.toml.
@github-actions
github-actions Bot enabled auto-merge (squash) August 15, 2026 20:46
@github-actions
github-actions Bot merged commit bd8e0d2 into main Aug 15, 2026
7 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
Allow pattern now remembers suggest_pattern for the session, e.g.
bash(git push *), instead of one exact argv. Sibling commands in that
family skip HITL; a different family still asks. Still not written to
permissions.toml.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Allow pattern now remembers suggest_pattern for the session, e.g.
bash(git push *), instead of one exact argv. Sibling commands in that
family skip HITL; a different family still asks. Still not written to
permissions.toml.
mohitranka added a commit that referenced this pull request Sep 11, 2026
Allow pattern now remembers suggest_pattern for the session, e.g.
bash(git push *), instead of one exact argv. Sibling commands in that
family skip HITL; a different family still asks. Still not written to
permissions.toml.
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