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
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
id: bugfix-710
title: e2e-12-porch-single-phase-happ
protocol: bugfix
phase: pr
plan_phases: []
current_plan_phase: null
gates: {}
iteration: 1
build_complete: false
history: []
started_at: '2026-04-30T19:33:52.093Z'
updated_at: '2026-04-30T23:08:27.967Z'
pr_history:
- phase: investigate
pr_number: 715
branch: builder/bugfix-710
created_at: '2026-04-30T23:05:42.270Z'
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
* Specs and plans are pre-approved to skip specify/plan phases.
*
* Run with: npm run test:e2e -- --grep benchmark
*
* NOTE (issue #710): The benchmark is skipped because the strict-mode arm
* relies on the `porch run` orchestrator removed in spec 0095 (commit
* ed2012ae). With no orchestrator, there is no "strict mode" to benchmark
* against soft mode. Reviving the benchmark needs a planner-architecture
* comparison and its own spec.
*/

import { describe, it, expect, beforeAll, afterAll } from 'vitest';
Expand Down Expand Up @@ -255,7 +261,7 @@ function formatTimingSummary(result: BenchmarkResult): string {
return lines.join('\n');
}

describe('Porch Benchmark: Strict vs Soft Mode', () => {
describe.skip('Porch Benchmark: Strict vs Soft Mode', () => {
let strictCtx: TestContext;
let softCtx: TestContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
* Also tests the max iterations limit.
*
* Run with: npm run test:e2e
*
* NOTE (issue #710): These tests are skipped because they depend on the
* `porch run` orchestrator removed in spec 0095 (commit ed2012ae). The
* iteration / feedback loop is now driven by the parent agent calling
* `porch next` repeatedly, not by an internal porch loop. Re-enabling
* this coverage needs a planner-aware test harness and its own spec.
*/

import { describe, it, expect, beforeAll, afterAll } from 'vitest';
Expand All @@ -25,7 +31,7 @@ import {
assertIteration,
} from '../helpers/assertions.js';

describe('Porch E2E: Feedback Loop', () => {
describe.skip('Porch E2E: Feedback Loop', () => {
let ctx: TestContext;

beforeAll(async () => {
Expand Down Expand Up @@ -83,7 +89,7 @@ describe('Porch E2E: Feedback Loop', () => {
});
});

describe('Porch E2E: Max Iterations', () => {
describe.skip('Porch E2E: Max Iterations', () => {
let ctx: TestContext;

beforeAll(async () => {
Expand Down Expand Up @@ -120,7 +126,7 @@ describe('Porch E2E: Max Iterations', () => {
* Test with mock consult that always rejects.
* This verifies porch stops at max iterations even with constant rejection.
*/
describe('Porch E2E: Max Iterations with Mock Consult', () => {
describe.skip('Porch E2E: Max Iterations with Mock Consult', () => {
let ctx: TestContext;
let originalPath: string | undefined;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
* This is an expensive test (~$4, ~40 minutes).
*
* Run with: npm run test:e2e
*
* NOTE (issue #710): These tests are skipped because they depend on the
* `porch run` orchestrator removed in spec 0095 (commit ed2012ae). The new
* planner architecture (`porch next`) requires a parent agent to execute
* tasks, so an orchestrator-style E2E test no longer applies. Rewriting
* these tests for the planner architecture needs its own spec.
*/

import { describe, it, expect, beforeAll, afterAll } from 'vitest';
Expand All @@ -29,7 +35,7 @@ import {
assertGateApproved,
} from '../helpers/assertions.js';

describe('Porch E2E: Happy Path', () => {
describe.skip('Porch E2E: Happy Path', () => {
let ctx: TestContext;

beforeAll(async () => {
Expand Down Expand Up @@ -103,7 +109,7 @@ describe('Porch E2E: Happy Path', () => {
* Full lifecycle test with auto-approve.
* This runs the entire SPIR protocol from start to finish.
*/
describe('Porch E2E: Full Lifecycle', () => {
describe.skip('Porch E2E: Full Lifecycle', () => {
let ctx: TestContext;

beforeAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
* 3. Exits after the phase completes (or hits a gate)
*
* Run with: npm run test:e2e
*
* NOTE (issue #710): These tests are skipped because they depend on the
* `porch run --single-phase` mode removed in spec 0095 (commit ed2012ae).
* The Agent SDK orchestration was deliberately moved out of porch — the
* parent agent now executes tasks emitted by `porch next`. Re-enabling
* single-phase E2E coverage requires a new test harness for the planner
* architecture and needs its own spec.
*/

import { describe, it, expect, beforeAll, afterAll } from 'vitest';
Expand All @@ -27,7 +34,7 @@ import {
assertGateApproved,
} from '../helpers/assertions.js';

describe('Porch E2E: Single Phase Mode', () => {
describe.skip('Porch E2E: Single Phase Mode', () => {
let ctx: TestContext;

beforeAll(async () => {
Expand Down Expand Up @@ -103,7 +110,7 @@ describe('Porch E2E: Single Phase Mode', () => {
}, 600000);
});

describe('Porch E2E: Single Phase Result Format', () => {
describe.skip('Porch E2E: Single Phase Result Format', () => {
let ctx: TestContext;

beforeAll(async () => {
Expand Down
60 changes: 60 additions & 0 deletions packages/codev/src/commands/porch/__tests__/run-removed.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* Regression test for issue #710.
*
* `porch run` was removed in spec 0095 (commit ed2012ae) when the
* orchestrator was deleted in favor of the `porch next` planner. This
* test pins the migration message so the deprecation remains discoverable
* for anyone (including the E2E test runner) that still invokes the old
* command.
*
* Calls `cli()` directly rather than spawning `bin/porch.js` as a
* subprocess: unit tests run before `pnpm build`, so `dist/` may be
* absent in CI.
*/

import { describe, it, expect, vi, afterEach } from 'vitest';
import { cli } from '../index.js';

function captureRun(args: string[]): { stderr: string; exitCode: number } {
const stderr: string[] = [];
let exitCode = 0;

const errSpy = vi.spyOn(console, 'error').mockImplementation((...a: unknown[]) => {
stderr.push(a.map(String).join(' '));
});
const exitSpy = vi.spyOn(process, 'exit').mockImplementation(((code?: number) => {
exitCode = code ?? 0;
throw new Error('__process_exit__');
}) as never);

try {
// cli() is async and the 'run' branch calls process.exit synchronously
// inside the switch. Our mock throws to unwind the stack so the test
// doesn't hang waiting on the promise.
cli(args).catch(() => { /* swallowed: __process_exit__ */ });
} finally {
errSpy.mockRestore();
exitSpy.mockRestore();
}

return { stderr: stderr.join('\n'), exitCode };
}

describe('porch run (removed)', () => {
afterEach(() => {
vi.restoreAllMocks();
});

it('exits 1 with a migration message pointing to porch next', () => {
const { stderr, exitCode } = captureRun(['run', 'some-id']);
expect(exitCode).toBe(1);
expect(stderr).toContain("'porch run' has been removed");
expect(stderr).toContain('porch next');
});

it('exits 1 even when extra flags are passed (e.g. --single-phase)', () => {
const { stderr, exitCode } = captureRun(['run', 'some-id', '--single-phase']);
expect(exitCode).toBe(1);
expect(stderr).toContain("'porch run' has been removed");
});
});
Loading