Repository navigation
feat(protected_environments): edit approval group membership - #655
Merged
Merged
Conversation
Allow explicit direct or inherited membership changes on existing approval groups while preserving all other rule fields. Require complete preflight, changed-value consent, single-attempt transport and authoritative confirmation so unknown membership and stale sessions cannot authorize updates. Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
Record the concrete review artifact while retaining the pending CI and approval boundary. Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
sjungwon03-ai
approved these changes
Oct 18, 2026
sjungwon03-ai
left a comment
Member
There was a problem hiding this comment.
Review summary
Verdict: Approved
- Reviewed: protected-environment approval-group inheritance edit flow, API write guards, and regression coverage
- Checks: GitHub CI passed
12 tasks done
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
Existing group-based project protected-environment approval rules can now switch
between direct membership and inherited membership. Only explicitly reported
0/1 settings on known group rules are editable. The dialog shows the current
membership, group/rule IDs and approval count, then requires a changed choice,
the exact environment name and acknowledgement. It warns about expanding
approver eligibility or blocking deployments when narrowing it.
Complete paginated inventory and strict detail preflight precede one PUT with
only the target rule ID and
group_inheritance_type. Strict response comparisonand an authoritative read-back preserve the group, approval count, every other
approval/deploy grant and legacy count. Writes never follow redirects or replay
authentication; uncertainty requires inspection and renewed confirmation, and
account replacement isolates late results.
Closes #654
Validation
dart format --output=none --set-exit-if-changed .(999 files, no changes)flutter analyze --no-pubreports no issues; CI English language policy passesflutter gen-l10n; models unchangedunknown/unchanged/non-group targets, stale/ambiguous environments,
preservation, uncertainty, overlap, pending locking and account replacement.
Checklist
dev; independent branch from latestorigin/devCloses #654Screenshots
Synthetic widget captures with real local fonts, scrolled to confirmation:
Notes for reviewers
GitLab defines
group_inheritance_type0 as direct membership only and 1 asincluding inherited groups. Premium/Ultimate, project CI/CD, appropriate
management permissions and shared-group eligibility remain server requirements.
This slice does not enumerate approvers or infer whether approval counts can
be satisfied. Group-level rules and unreported/future membership values remain
read-only; user/role grants and group replacement are separate work.
The existing strict approval-group reader is reused. A changed response or
read-back in any other modelled field is an unconfirmed write, requiring fresh
inspection. The endpoint offers no atomic compare-and-set, so another actor can
still change the rule between requests. Unknown server metadata is outside the
modelled preservation comparison. No model code generation is needed.
References: group inheritance,
protected-environment update,
implementation notes.