Add configurable Fusion-side PR check gating across merge surfaces. - Add project required-check settings, validation, UI controls, CLI support, and operator documentation. - Evaluate configured checks before dashboard and CLI PR merges, accepting successful, skipped, and neutral checks. - Bind merges to the evaluated PR head SHA to prevent push-and-merge races. - Cover required-check policy and head-SHA merge behavior with tests. Files changed: .changeset/fn-8855-required-checks.md | 7 + docs/dashboard-guide.md | 5 + docs/settings-reference.md | 1 + .../src/commands/__tests__/task-lifecycle.test.ts | 30 ++++- packages/cli/src/commands/task-lifecycle.ts | 17 ++- .../core/src/__tests__/required-checks.test.ts | 16 +++ packages/core/src/config/index.ts | 1 + packages/core/src/config/required-checks.ts | 16 +++ packages/core/src/config/settings-schema.ts | 1 + packages/core/src/index.ts | 1 + packages/core/src/types.ts | 6 + packages/core/src/types/settings/settings-scope.ts | 6 + packages/core/src/types/task/task-tracking.ts | 5 + .../settings/__tests__/section-keys.test.ts | 1 + .../app/components/settings/section-keys.ts | 1 + .../settings/sections/MergeSection.search.ts | 3 + .../components/settings/sections/MergeSection.tsx | 30 ++++- .../__tests__/MergeSection.requiredChecks.test.tsx | 50 +++++++ .../settings-default-descriptions.test.tsx | 1 + packages/dashboard/src/__tests__/github.test.ts | 123 +++++++++++++++++ packages/dashboard/src/github.ts | 149 +++++++++++++-------- .../dashboard/src/routes/register-git-github.ts | 38 ++++-- .../src/routes/register-task-workflow-routes.ts | 8 +- packages/i18n/locales/en/app.json | 4 +- 24 files changed, 441 insertions(+), 79 deletions(-) Fusion-Task-Id: FN-8855 Fusion-Task-Lineage: 708e9c27-72be-4925-bf09-5db421bcaa67 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
48 lines
3.0 KiB
TypeScript
48 lines
3.0 KiB
TypeScript
/**
|
|
* Search entries for the Merge section.
|
|
*
|
|
* FNXC:SettingsSearch 2026-07-15-17:35:
|
|
* One entry per descriptor row the section renders, co-located so a setting and its index entry change in the same edit. Labels and help mirror the section's `t()` calls verbatim: the index matches on the copy operators actually read, so a paraphrase here would make search miss the words on screen.
|
|
* This list is short because most of Merge is deliberately still bespoke — "More details" disclosure rows, custom branch/remote dropdowns, and rows whose help interleaves `<code>` fragments. See the FNXC block in MergeSection.tsx for why each stayed. Those settings remain reachable through the section's own `searchableText` in SETTINGS_SECTIONS; they simply have no per-control anchor yet.
|
|
*
|
|
* FNXC:SettingsSearch 2026-07-15-20:30:
|
|
* The GitHub/GitLab auth entries moved to SourceControlSection.search.ts with their controls. Merge no longer renders any forge auth row, so password inputs are no longer among this section's reasons for staying bespoke.
|
|
*/
|
|
import type { SettingsSearchEntry } from "../search/types";
|
|
|
|
export const mergeSearchEntries: SettingsSearchEntry[] = [
|
|
{
|
|
sectionId: "merge", key: "requiredChecks", labelKey: "settings.merge.requiredChecks", labelFallback: "Required pull-request checks", helpKey: "settings.merge.requiredChecksHelp", helpFallback: "No default — unset. Comma-separated check names match GitHub exactly (case-sensitive). Leaving this empty uses GitHub required-status checks only; a named check that never reports blocks the merge.", keywords: ["CI", "status", "GitHub"],
|
|
},
|
|
{
|
|
sectionId: "merge",
|
|
key: "maxAutoMergeRetries",
|
|
labelKey: "settings.merge.autoMergeConflictRetries",
|
|
labelFallback: "Auto-merge conflict retries",
|
|
helpKey: "settings.merge.positiveIntegerRetryCapForAutoMergeConflict",
|
|
helpFallback:
|
|
"Positive integer retry cap for auto-merge conflict resolution before a task parks for human recovery. Default 3.",
|
|
keywords: ["attempts", "give up", "parked", "merge failure"],
|
|
},
|
|
{
|
|
sectionId: "merge",
|
|
key: "merger.maxReviewPasses",
|
|
labelKey: "settings.merge.maxAIReviewPasses",
|
|
labelFallback: "Max AI review passes",
|
|
helpKey: "settings.merge.aICorrectiveRoundsBeforeLandingTheBestResult",
|
|
helpFallback:
|
|
"AI corrective rounds before landing the best result (advisory concern) or hard-failing (unfixable correctness concern). Default 3. The reviewer uses your project's reviewer/validator model.",
|
|
keywords: ["clean room", "audit", "retries", "attempts"],
|
|
},
|
|
{
|
|
sectionId: "merge",
|
|
key: "mergeStrategyOverlapBehavior",
|
|
labelKey: "settings.merge.smartPreferMainOverlapGuard",
|
|
labelFallback: "Smart Prefer Main Overlap Guard",
|
|
helpKey: "settings.merge.whenUsingSmartPreferMainAutomaticallyPreferThe",
|
|
helpFallback:
|
|
" When using smart-prefer-main, automatically prefer the branch side for files that main has recently modified to avoid silently discarding branch work. ",
|
|
keywords: ["ours", "theirs", "lost work", "clobber"],
|
|
},
|
|
];
|