Repository navigation
feat(control): pipelines-must-succeed and all-threads-resolved merge gates on the merge settings control - #677
Conversation
|
Standalone mode e2e (gitlab.com, config enables mergeRequestSettingsMustBeCompliant with pipelinesMustSucceed: false and allThreadsMustBeResolved: false), head 6e73ffa against a build of origin/main. Project origin/main (the two keys are unknown to it, it ignores them): this branch: Only difference: the new clause |
|
Linked (platform) mode e2e: throwaway CI job on gitlab.com Log lines: The demo policy configures neither gate, so the Task 4 guard did not fire: ISSUE-506 evaluates as before, no |
|
Doc PR: getplumber/getplumber.io#578 |
Exypte
left a comment
There was a problem hiding this comment.
Two fixes before merge (the gate mark copied into every platform policy, and the whole control dropped when a gate is unknown), plus four nits inline.
…ated Follows the review of getplumber/plumber#677: a merge check the platform does not serve yet is left out of the comparison, and the control is not evaluable only when nothing deviates. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR
Claude PR review — findings not anchorable to the diffNone on the latest revision. |
…gates on the merge settings control
Adds two optional expectations to mergeRequestSettingsMustBeCompliant (ISSUE-506), available on
every GitLab tier and compared for exact equality like the eight existing settings:
- pipelinesMustSucceed: GitLab only_allow_merge_if_pipeline_succeeds ("Pipelines must succeed")
- allThreadsMustBeResolved: only_allow_merge_if_all_discussions_are_resolved ("All threads must
be resolved")
Both come from the project call the collector already makes. The finding names them with
GitLab's labels, for example "Pipelines must succeed is disabled (expected enabled)".
Platform mode: the two are optional in the snapshot's project_details, each tracked on its own.
A gate the snapshot did not carry is left out of the comparison, so deviations of the other
settings are still reported. The control is not evaluable (snapshot_lacks_merge_gates) only when
nothing deviates and an expected gate was not read, so it never claims a pass it could not check.
Schema docs, the catalog, the default config comments and the ISSUE-506 texts name the two
settings.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR
6519410 to
e8d5cb3
Compare
|
On the unanchored finding (the wire-contract decode test not covering the two merge-gate fields): fixed, now part of the squashed commit e8d5cb3.
Proven to bite: with the first tag mistyped as The branch was also squashed into one signed commit at Thomas's request; the tree is identical to the reviewed head plus this test. |
…te mark In platform mode, the SARIF, GitLab SAST, CSV and OCSF reports read the union of the policy runs. The union kept the first run's not-evaluable mark for a control, so when one policy could not read its merge gates from a pre-gate snapshot and another found a real ISSUE-506 deviation, the CSV and OCSF status said "not evaluated" for a control that failed. The snapshot_lacks_merge_gates mark only says that one policy's gates were unreadable, so the union now drops it when any run reports a finding on the same control. With no finding, the mark stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the project member quota control (ISSUE-507, #504) and the 0.7.25 release. Conflicts were additive on both sides and keep both controls; the catalog golden is regenerated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR
## [0.7.26](v0.7.25...v0.7.26) (2026-12-03) ### ✨ Features * **control:** pipelines-must-succeed and all-threads-resolved merge gates on the merge settings control ([#677](#677)) ([daa20a9](daa20a9))
…ntrol (ISSUE-506) (#578) * docs(controls): the two merge checks of the merge request settings control (ISSUE-506) Documents pipelinesMustSucceed and allThreadsMustBeResolved on mergeRequestSettingsMustBeCompliant: the configuration reference and the ISSUE-506 page, with the platform not-evaluable note. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR * docs(controls): an unread merge check leaves the other settings evaluated Follows the review of getplumber/plumber#677: a merge check the platform does not serve yet is left out of the comparison, and the control is not evaluable only when nothing deviates. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Conflicts with the member quota control (#504) and the merge gates (#677), both sides kept everywhere: - control/task.go: the engine config goes through engineConfigFor then omitUnreadMergeGates; the two GitLab early returns attach the member quota verdict and mark mise-en-place not evaluated; runRegoEngine keeps its error return and takes membersData; the end of the run marks the merge gates gap and the mise gap. - control/packagemanagers_run_test.go: runRegoEngine call updated to the new signature (a compile break git did not flag). - control/platform_call_inventory_test.go: recorder fields of both sides. - test lists and the fingerprint golden: both controls listed. - cmd/testdata/catalog_golden.json: regenerated with -update-catalog. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UuPoP4xPXZ8rLEDYRiKznq
Why
A customer could not map the merge request settings control to GitLab's own merge request settings page, and asked for its two merge checks: "Pipelines must succeed" and "All threads must be resolved". The control (
mergeRequestSettingsMustBeCompliant, ISSUE-506) compared eight settings and lacked those two.What changes
pipelinesMustSucceed: GitLabonly_allow_merge_if_pipeline_succeeds("Pipelines must succeed")allThreadsMustBeResolved: GitLabonly_allow_merge_if_all_discussions_are_resolved("All threads must be resolved")Pipelines must succeed is disabled (expected enabled)).project_details.only_allow_merge_if_pipeline_succeeds,..._all_discussions_are_resolved). A snapshot stored before this release keeps evaluating the eight settings; a policy that expects one of the new gates against such a snapshot reports the control not evaluable (reasonsnapshot_lacks_merge_gates) until the platform serves them, never a fabricated deviation.Verification
make lint,make deadcode,go vet ./...,go test ./... -count=1: green.Follow-up
The platform serves the two snapshot fields and bumps its pin in the follow-ups pull request on the monorepo (same program, after this release).
🤖 Generated with Claude Code
https://claude.ai/code/session_01AmKdDgroztPWz5N5LBCVzR