[Bugfix #710] Skip E2E tests that depend on removed porch run orchestrator#715
[Bugfix #710] Skip E2E tests that depend on removed porch run orchestrator#715waleedkadous merged 7 commits intomainfrom
Conversation
…chestrator The four affected E2E scenario files (single-phase, happy-path, feedback-loop, benchmark) all spawn 'porch run' or 'porch run --single-phase'. Those commands were removed in spec 0095 (commit ed2012a) when the orchestrator was deleted in favor of the 'porch next' planner. The runner now exits 1 with a migration message before emitting any GATE / __PORCH_RESULT__ output, so every assertion that waits for that output fails. Mark the affected describe blocks as describe.skip with a comment pointing to issue #710 and spec 0095. Reviving these tests requires a planner-aware harness (the parent agent now executes tasks emitted by 'porch next') and belongs to its own spec.
…essage Pin the behavior that 'porch run' exits 1 with a migration message pointing to 'porch next'. If the message is ever changed or removed, this test will catch it. Anyone (including the previously-broken E2E runner) that still invokes 'porch run' will continue to get a clear pointer to the new command.
Architect review — CI failure needs fixing before mergeCI Unit Tests job fails on The regression test spawns Fix: rewrite the test to call import { cli } from '../index.js';
it('exits 1 with a migration message pointing to porch next', async () => {
const stderr: string[] = [];
const spy = vi.spyOn(console, 'error').mockImplementation((...a) => {
stderr.push(a.map(String).join(' '));
});
// Note: cli() throws or process.exits — wrap accordingly
await expect(cli(['run', 'some-id'])).rejects.toThrow(); // or check process.exit mock
expect(stderr.join('\n')).toContain("'porch run' has been removed");
expect(stderr.join('\n')).toContain('porch next');
spy.mockRestore();
});(Adjust to the actual exit mechanism — looking at line 929 of The rest of the PR (4 — Architect |
… call CI unit tests run before pnpm build, so dist/ may be absent. The previous version of this test spawned 'node bin/porch.js run', which imports from dist/, and failed in CI with ERR_MODULE_NOT_FOUND. Switch to importing cli() directly (vitest transforms TypeScript) and mock console.error + process.exit. This matches the pattern used by bugfix-711's --version test (PR #714).
Fixes #710
Root Cause
The four affected E2E scenario files (
single-phase,happy-path,feedback-loop,benchmark) all spawnporch runorporch run --single-phasevia the helpers inrunner.ts:runPorchUntilGate,runPorchWithAutoApprove→porch runrunPorchSinglePhase→porch run --single-phaserunPorchOnce→porch run --onceporch runwas removed in spec 0095 (commited2012ae, "[Spec 0095][Phase: phase_2] refactor: Remove porch orchestrator"). The CLI now responds with:…and exits with code 1 before writing anything to stdout. The runner's gate /
__PORCH_RESULT__regexes therefore never match,singlePhaseResultstaysnull, andhitGatestaysnull— which is exactly the failure shape described in the issue.Fix
The orchestration loop these tests describe was deliberately moved out of porch — the parent agent now executes tasks emitted by
porch next, so an "orchestrator-style" E2E test no longer applies. Reviving the coverage requires a planner-aware harness and belongs to its own spec.This PR:
describe.skipwith a clear annotation pointing to issue E2E: 12 porch single-phase / happy-path failures (singlePhaseResult is null) #710 and spec 0095.__tests__/run-removed.test.ts, a regression test that pins the migration message so anyone (including the previously-broken runner) who still invokesporch runkeeps getting a clear pointer toporch next. The test invokescli()directly (mockingconsole.error+process.exit) so it does not depend ondist/— same pattern asbugfix-711-pending-and-version.test.ts.Test Plan
pnpm test src/commands/porch/__tests__)vitest run --config vitest.e2e.config.tson each affected file shows 0 failed, all skipped)CMAP Review
Three-way review run with
--protocol bugfix --type pr:status.yamland missing CMAP section in PR body. Both addressed.dist/dependency viaspawnSync. Addressed by switching to directcli()invocation.All blocking issues addressed:
status.yamladvanced frominvestigate→fixviaporch donewith--pr 715 --branch builder/bugfix-710(recorded in pr_history)cli()directly so it works withoutdist/