Skip to content

feat(output): show blocked macos grants in capability summary - #1178

Merged
lukehinds merged 3 commits into
mainfrom
issue-1176
Jun 17, 2026
Merged

feat(output): show blocked macos grants in capability summary#1178
lukehinds merged 3 commits into
mainfrom
issue-1176

Conversation

@lukehinds

@lukehinds lukehinds commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g., ~/Library) overlapped with multiple deny groups.

This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the -v (verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use --bypass-protection. This significantly improves readability and user experience by folding multiple related warnings into a concise summary.

image

Linked Issue

Closes #1176

  • An issue exists and is linked above
  • All commits are signed-off, using DCO
  • All new code follows the project's coding standards (CLAUDE.md) and is covered by tests
  • Public-facing changes are paired with documentation updates
  • Release note has been added to CHANGELOG.md if needed

Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g., `~/Library`) overlapped with multiple deny groups.

This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the `-v` (verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use `--bypass-protection`. This significantly improves readability and user experience by folding multiple related warnings into a concise summary.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Size

Metric Value
Lines added +136
Lines removed -26
Total changed 162
Classification Medium (50–300 lines)

Affected crates

  • crates/nono-cli — CLI changes. Verify argument parsing, flag documentation, and UX behaviour across supported platforms.

Blast radius — Contained

This PR touches: source code


Updated automatically on each push to this PR.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors how silently blocked user-granted paths on macOS are handled. Instead of printing individual warnings immediately, they are now collected into blocked_grants and folded into a single row in the capability summary (expandable with -v). The review feedback suggests two performance optimizations in crates/nono-cli/src/output.rs to avoid unnecessary string allocations when grouping and rendering these blocked paths.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/nono-cli/src/output.rs
Comment thread crates/nono-cli/src/output.rs
- Use `Path::to_string_lossy` for displaying paths in `print_blocked_grants`. This provides more robust handling of non-UTF-8 characters and avoids unnecessary `String` allocations compared to `Path::display().to_string()`.
- Optimize string handling when grouping blocked grants by deferring `.to_string()` calls until group names are inserted into the `groups` vector, reducing temporary allocations.
- Reorder test module imports in `output.rs` for minor style consistency.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

@SequeI SequeI left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@lukehinds
lukehinds merged commit a0bba5e into main Jun 17, 2026
13 checks passed
oscarmackjr-twg pushed a commit to OscarMackJr/nono that referenced this pull request Jun 23, 2026
…-ai#1178)

* feat(output): show blocked macos grants in capability summary

Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g., `~/Library`) overlapped with multiple deny groups.

This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the `-v` (verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use `--bypass-protection`. This significantly improves readability and user experience by folding multiple related warnings into a concise summary.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

* refactor(output): improve path display and string allocations

- Use `Path::to_string_lossy` for displaying paths in `print_blocked_grants`. This provides more robust handling of non-UTF-8 characters and avoids unnecessary `String` allocations compared to `Path::display().to_string()`.
- Optimize string handling when grouping blocked grants by deferring `.to_string()` calls until group names are inserted into the `groups` vector, reducing temporary allocations.
- Reorder test module imports in `output.rs` for minor style consistency.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

---------

Signed-off-by: Luke Hinds <lukehinds@gmail.com>
(cherry picked from commit a0bba5e)
Signed-off-by: oscarmackjr-twg <oscar.mack.jr@gmail.com>
klassm pushed a commit to klassm/nono that referenced this pull request Jul 3, 2026
…-ai#1178)

* feat(output): show blocked macos grants in capability summary

Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g., `~/Library`) overlapped with multiple deny groups.

This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the `-v` (verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use `--bypass-protection`. This significantly improves readability and user experience by folding multiple related warnings into a concise summary.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

* refactor(output): improve path display and string allocations

- Use `Path::to_string_lossy` for displaying paths in `print_blocked_grants`. This provides more robust handling of non-UTF-8 characters and avoids unnecessary `String` allocations compared to `Path::display().to_string()`.
- Optimize string handling when grouping blocked grants by deferring `.to_string()` calls until group names are inserted into the `groups` vector, reducing temporary allocations.
- Reorder test module imports in `output.rs` for minor style consistency.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

---------

Signed-off-by: Luke Hinds <lukehinds@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warn noise when agent traverses folder structure with protected groups

2 participants