feat(FN-5518): merge fusion/fn-5518

This commit is contained in:
gsxdsm
2026-05-22 22:42:57 -07:00
parent 838002491d
commit 394b9adc91
4 changed files with 8 additions and 9 deletions

View File

@@ -12,7 +12,8 @@ function git(repo: string, command: string): string {
return execSync(command, { cwd: repo, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }).trim();
}
describeIfGit("merger auto-prerebase real-git scenarios", () => {
// FN-5518 (FN-4807 pattern): real-git rebase scenarios exceed Vitest's 5s default under workspace pnpm test contention; bound but raise the per-test deadline without weakening subprocess guards.
describeIfGit("merger auto-prerebase real-git scenarios", { timeout: 30_000 }, () => {
const dirs: string[] = [];
afterEach(() => {
for (const dir of dirs.splice(0)) rmSync(dir, { recursive: true, force: true });

View File

@@ -34,7 +34,8 @@ function createRepoWithFeatureCommit() {
return { dir, baseSha, mainTipSha, auditSha };
}
describe("resolvePostMergeAuditInvocation", () => {
// FN-5518 (FN-4807 pattern): rangebase resolution drives real-git rev-parse / merge-base ceremony; bound but lift the per-test deadline above Vitest's 5s default to absorb pnpm test contention without weakening subprocess guards.
describe("resolvePostMergeAuditInvocation", { timeout: 30_000 }, () => {
const cleanup: string[] = [];
afterEach(() => {
for (const dir of cleanup.splice(0)) rmSync(dir, { recursive: true, force: true });

View File

@@ -103,7 +103,8 @@ function makeUnprovenDoneTask(taskId: string): Task {
} as Task;
}
describe("FN-4811 follow-up: integrity warning dedup persists across restarts", () => {
// FN-5518 (FN-4807 pattern): the file header already documents this is real-git wallclock under parallel CI load (FN-4839); lift the per-test deadline above Vitest's 5s default rather than weakening or removing the real-git regression backstop.
describe("FN-4811 follow-up: integrity warning dedup persists across restarts", { timeout: 30_000 }, () => {
it("emits the unproven warning once, persists it on mergeDetails.integrityWarning", async () => {
const dir = mkdtempSync(join(tmpdir(), "fn-4811-dedup-first-"));
try {

View File

@@ -899,11 +899,7 @@ export function packageNamesForFiles(rootDir: string, files: string[]): string[]
*
* @internal Exported for testing only.
*/
export function deriveScopedPnpmTestCommand(
rootDir: string,
baseBranch: string,
branch: string,
): string | null {
export function deriveScopedPnpmTestCommand(rootDir: string, baseBranch: string): string | null {
// 1. Read and parse pnpm-workspace.yaml
const workspacePath = join(rootDir, "pnpm-workspace.yaml");
let workspaceContent: string;
@@ -992,7 +988,7 @@ export function inferDefaultTestCommand(
if (existsSync(join(rootDir, "pnpm-workspace.yaml"))) {
if (baseBranch?.trim() && branch?.trim()) {
try {
const scoped = deriveScopedPnpmTestCommand(rootDir, baseBranch.trim(), branch.trim());
const scoped = deriveScopedPnpmTestCommand(rootDir, baseBranch.trim());
if (scoped) {
mergerLog.log(
`Scoped inferred test command to changed packages: ${scoped}`,