ci(zeph-acp): add CI guard against AcpPermissionGate::new(_, None) reintroduction#6524
Merged
Conversation
…introduction A None second argument falls back to the developer's real acp-permissions.toml instead of an isolated test path, silently persisting AllowAlways/RejectAlways decisions across unrelated test runs (#6512, fixed for both terminal.rs and permission.rs by PR #6514). Adds a self-testing bash guard, check_acp_permission_gate.sh, wired into the lint-shellcheck CI job, that fails the build if the pattern reappears in crates/zeph-acp/src. Closes #6515
bug-ops
enabled auto-merge (squash)
July 19, 2026 23:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/scripts/check_acp_permission_gate.sh, wired into thelint-shellcheckjob, that fails the build ifAcpPermissionGate::new(_, None)reappears anywhere incrates/zeph-acp/src.Nonesecond argument makes the gate fall back to the developer's realacp-permissions.tomlinstead of an isolated test path, silently persistingAllowAlways/RejectAlwaysdecisions across unrelated test runs — the exact regression class zeph-acp: permission.rs tests write allow/reject decisions to the real, non-fixture acp-permissions.toml #6512 identified and PR fix(acp): isolate permission.rs tests from real acp-permissions.toml #6514 fixed for bothterminal.rsandpermission.rs. This guard keeps that fix from silently regressing.AcpPermissionGate::newis ever renamed, rather than silently going dead).permission.rs's test module. That assumption held by the time this PR was ready to merge (PR fix(acp): isolate permission.rs tests from real acp-permissions.toml #6514 landed onmainmid-development), so this PR contains only the guard + CI wiring + CHANGELOG entry — nopermission.rschanges, since fix(acp): isolate permission.rs tests from real acp-permissions.toml #6514 already covers that.Test plan
bash .github/scripts/check_acp_permission_gate.shpasses on the current tree (exit 0).Noneat multiple sites (including both halves of the two multi-gate isolation tests) is correctly flagged with file:line and a fix hint; reverting restores a clean pass.rust:1.97.1-slimcontainer), not just BSD/macOS grep — an earlier revision had a GNU-grep-only self-test failure caught and fixed here (-Hflag).shellcheckclean on the new script.cargo nextest -p zeph-acp --features zeph-core/scheduler: 131/131 passed.cargo +nightly fmt --checkclean.gitleaks protect --stagedclean.Closes #6515