fix(review): scope merge-train FIFO to overlapping siblings, fix dead persistence#4068
Conversation
… persistence The merge-train gate blocked a merge behind ANY older open sibling, so a PR stuck in manual review could stall unrelated PRs indefinitely. Scope the block to siblings that share a linked issue or a meaningful changed file (lockfiles/build output excluded) -- the actual conflict-prevention purpose of FIFO ordering, since an unrelated older sibling never blocks regardless of its review state. Also fixes a critical, previously-shipped bug: mergeTrainMode was computed correctly in upsertRepositorySettings but omitted from both the INSERT values and UPDATE set column lists, so it silently never reached the DB on either write path and always read back as the SQL default 'off'.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4068 +/- ##
=======================================
Coverage 93.60% 93.60%
=======================================
Files 381 381
Lines 35627 35647 +20
Branches 13070 13076 +6
=======================================
+ Hits 33347 33368 +21
Misses 1618 1618
+ Partials 662 661 -1
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 22:57:39 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
Two fixes to the merge-train FIFO gate (#selfhost-merge-train), both surfaced while working through the rollout decision for
mergeTrainMode:mergeTrainModewas computed correctly inupsertRepositorySettings'sresolvedobject but was missing from both the INSERTvaluesand UPDATEsetcolumn lists, so it silently never reached the database on either write path and always read back as the SQL defaultoff. This made the setting completely un-settable via the normal settings-write path since it was introduced.Test plan
npm run typecheckcleanmerge-train.test.ts(25 tests, 100% branch coverage on the pure decision function) +agent-action-executor.test.ts+agent-approval-queue.test.ts+ newrepository-settings-merge-train-mode.test.ts(regression-guards both the INSERT-path and UPDATE-path persistence bug separately) + fullqueue.test.ts(954 tests total across the 5 files) all pass on a fresh worktree rebased on latestorigin/main