M8 — Orchestration, error handling, validation & eval #18
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-9/stage-m8-orchestration-and-error-handling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
M8 wires the previously-built M1–M7 stages into one autonomous run and enforces the error-handling policy end to end:
Closes #9.
Changes
src/orchestrator/(new module):runPipeline— sequential orchestrator; every stage/effect is an injectable seam so the whole flow is unit-testable without git, an LLM, or the network.classifyError— maps thrown errors + the executing stage onto anerror.jsonreport (uses the retry helper's annotated attempt count).buildFinalSummary— MR URL, remaining findings, degraded stages, and the Jira write-back outcome.ErrorReport/ stage / kind types.error.jsonartifact —validateErrorReport+writeErrorReport/readErrorReport, mirroring the existing artifact pattern.runCliis now async — runs the pipeline after setup, returns exit0(success) /1(pipeline failure) /2(usage), and emits the final summary to stdout +run.log.runPipeline.e2e.test.ts,PILOOP_E2E=1) — asserts on artifacts/exit conditions (never exact LLM text); skips whenPILOOP_E2E_JIRA_KEY/PILOOP_E2E_REPOare unset.error.jsonschema, E2E env vars; M8 checkboxes ticked inIMPLEMENTATION_PLAN.md.Error-handling policy (enforced)
401/403/404(no agent session starts).degradedStages.error.json(kind: agent-failure) on hard agent failure.session.dispose()infinallyis owned byrunStage(per the M2 contract).Testing
npm run build(tsc --noEmit) cleannpm run lintcleanPILOOP_E2E=1): 1 pass, 1 skipped (no sandbox)Checklist
Note: 5 pre-existing Prettier warnings in unrelated committed files were left untouched.