Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/added-mergelane-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- mergelane: core of the serialized merge lane for `hive-serialized` repositories ([#10888](https://github.com/hivecommons/hive/issues/10888), part of [#10884](https://github.com/hivecommons/hive/issues/10884)). A new `pkg/mergelane` keeps a durable, fenced front record per (repo, target branch) under `/data/mergelane/`, orders pull requests oldest-eligible first, times out a stuck front (60 minutes by default, per-repo override, restarted on every update) and drives the front pull request through compare-based staleness detection, a merge update pinned to the evaluated head, required checks on the exact head (unknown or empty set means no merge), a live final re-check, a head-pinned merge and a post-merge parent check that alerts when the merge did not land on the validated tip. Every front entry and exit, update, merge and refusal is audited. The lane is not yet called by any merge path, so nothing changes for `direct` repositories.
204 changes: 102 additions & 102 deletions src/docs/api-reference.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/pkg/config/repo_merge_strategy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ func TestInvalidMergeStrategyFailsValidationAndStopsAutoMerge(t *testing.T) {
cfg.ACMMLevel = &level
cfg.Project.RepoPolicies = []RepoPolicy{{Repo: "console", MergeStrategy: "hive-serialised"}}

err := cfg.Validate()
// No agents on purpose: RequireAgents=false so the merge_strategy check is
// the first thing that can fail.
err := cfg.ValidateWithOptions(ValidateOptions{})
if err == nil || !strings.Contains(err.Error(), "console") || !strings.Contains(err.Error(), "hive-serialised") {
t.Fatalf("Validate() = %v, want error naming repo and value", err)
t.Fatalf("ValidateWithOptions() = %v, want error naming repo and value", err)
}
if cfg.RepoAutoMergeEnabled("console") {
t.Error("auto-merge must be off for a repo with an invalid merge_strategy")
Expand Down
Loading
Loading