mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
885c1486bb
* test(ci): single-retry policy for enumerated contention-flaky files * fix: satisfy fallow * test(ci): read failures through a lane reporter so timeouts stay distinguishable * test(ci): cover the lane reporter and drop its duplicated boilerplate * chore(fallow): own the retry lane's tool-loaded export seams * test(ci): block retries on non-test failures and classify timeouts structurally * test(ci): decide retry eligibility from runner metadata and route gate verdicts through blockers * refactor(ci): name the retry policy's rules in code instead of comments * test(ci): mark runner-aborted timeouts inside the runner instead of inferring them * test(ci): make timeout provenance a per-run secret, not a writable flag Cover direct task.meta mutation in the real child-Vitest fixture gate. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(ci): retry the failed files in the first run's project and coverage modes Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: drop deleted repo-health file from the retry list after #1480 Rebase onto main post-#1480: the SkillGym/repo-health descope deleted scripts/repo-health/run.test.ts, whose CONTENTION_RETRY_FILES entry would now fail this PR's own missing-file check, and inlined the slow-test budgets into the reporter, resolving the budgets-module import. Envelope comments now point at scripts/lib/lane-envelope.ts instead of the closed #1430. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUv7bvbWNryuXgSBuqTtep --------- Co-authored-by: Michał Pierzchała <thymikee@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
// Vitest argv for the two runs of the contention retry lane (#1419). The retry
|
|
// must execute the failed files the same way the first run did — same projects,
|
|
// same V8 instrumentation — or a failure the Coverage job produced could be
|
|
// accepted by a run that could not reproduce it.
|
|
|
|
export type RunModes = { projects: readonly string[]; coverage: boolean };
|
|
|
|
/** Where the retry's own coverage lands, so the first run's report stays the gate's evidence. */
|
|
export const RETRY_COVERAGE_DIR = 'coverage/contention-retry';
|
|
|
|
function projectArgs(modes: RunModes): string[] {
|
|
return modes.projects.flatMap((name) => ['--project', name]);
|
|
}
|
|
|
|
export function firstRunArgs(modes: RunModes): string[] {
|
|
return [...projectArgs(modes), ...(modes.coverage ? ['--coverage'] : [])];
|
|
}
|
|
|
|
export function retryRunArgs(modes: RunModes, files: readonly string[]): string[] {
|
|
if (!modes.coverage) return [...projectArgs(modes), ...files];
|
|
// Global thresholds describe the whole suite; a handful of files can never meet
|
|
// them. A first-run threshold failure is a blocker, so the retry never runs.
|
|
return [
|
|
...projectArgs(modes),
|
|
'--coverage',
|
|
`--coverage.reportsDirectory=${RETRY_COVERAGE_DIR}`,
|
|
'--coverage.thresholds.statements=0',
|
|
'--coverage.thresholds.lines=0',
|
|
...files,
|
|
];
|
|
}
|