feat(tui): persist exact repo-scoped allow grants#4761
Conversation
Add a distinct approval-card action for remembering eligible safe shell and file-write calls as typed allow rules. Scope remembered grants to the active workspace, require exact shell command matching, preserve platform-correct path boundaries, and keep dangerous, critical, hook, auto-review, and repo-law holds outside the bypass.
|
Thanks @greyfreedom for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
Update real-PTY approval expectations for the renamed allow-once copy and the additional exact-repo option. Gate the process-table OnceLock import to Unix so Windows warning-as-error builds remain clean.
Avoid assuming Rust Debug quoting matches TOML output for Windows paths. Keep the rendered workspace-field check while relying on the typed round-trip assertion for the exact persisted value.
Let approval cards remember eligible safe shell and file-write approvals as exact allow rules bound to one repository, without weakening deny, ask, or safety-floor precedence. Refs #1186 and #2242. Harvested from PR #4761 by @greyfreedom Co-authored-by: greyfreedom <11493871+greyfreedom@users.noreply.github.com>
Update PTY approval expectations and keep Unix-only process support out of Windows warning builds. Harvested from PR #4761 by @greyfreedom Co-authored-by: greyfreedom <11493871+greyfreedom@users.noreply.github.com>
Assert persisted workspace scopes without assuming platform-specific leading separators. Harvested from PR #4761 by @greyfreedom Co-authored-by: greyfreedom <11493871+greyfreedom@users.noreply.github.com>
Run the POSIX case-distinction regression only on Linux; macOS and Windows intentionally fold paths in the production matcher. Harvested from PR #4761 by @greyfreedom Co-authored-by: greyfreedom <11493871+greyfreedom@users.noreply.github.com>
|
Superseded by #4863, which has now merged — your work is on To be explicit about what happened, because this is your contribution and the credit matters: #4863 is a harvest of this branch, not a reimplementation. All four substantive commits kept you as author ( This PR itself had gone CONFLICTING against #1186 and #2242 stay open, as you correctly scoped them — rule editing/removal, glob and directory grants, and deny persistence are still unbuilt. Thank you for the careful scoping and for doing the cross-platform work up front. |
Summary
allowrules.deny > ask > allowprecedence intact.Scope
write_file,edit_file, and validatedapply_patchtouched files.Builds on
Issues
Refs #1186 (partial)
Refs #2242 (partial)
Validation
cargo fmt --allgit diff --checkcargo test -p codewhale-execpolicy --lockedcargo test -p codewhale-config --lockedcargo test -p codewhale-tui --bin codewhale-tui --locked approvalcargo test -p codewhale-tui --bin codewhale-tui --locked file_ask_rulecodewhale-execpolicyandcodewhale-config.upstream/mainallowed.underwater_motion_keeps_its_smoother_cadence_during_live_statustiming assertion../scripts/release/check-versions.sh./scripts/sync-changelog.sh --check