REQ-DELEG-004: Sequential pipeline with forward carry and per-stage reporting

← Requirements

What it requires

  1. Given a three-stage pipeline, When it executes, Then stages run in order and each stage after the first sees the prior stage's output in its task text.
  2. Given a start callback returning REJECT, When the pipeline runs, Then it fires once with is_pipeline = 1 and no stage runs.
  3. Given a stage that fails or names an unknown tier, When the pipeline runs, Then it breaks at that stage.
  4. Given a completed pipeline, When stage_log is inspected, Then it holds one result per executed stage in order.
tier
NOT_RUN

Where it lives

  • src/core7

See it on the map

How it is met

implemented byresults (127 tests)dir_pipelineexecute_pending_pipelineexecute_pipelinefire_start_cbpipeline_contextreject_pipeline_if_guardedrun_pipeline_stage127 absent127 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (127)

Reached through calls

127 tests: 127 absent

testresultlinked byimplementers exercisedcalls away
Pipeline mid-stream failure paths break the loopabsentinferred4 of 7: execute_pipeline, fire_start_cb, pipeline_context, run_pipeline_stage1
gh#125: execute_pipeline populates stage_log with per-stage resultsabsentinferred4 of 7: execute_pipeline, fire_start_cb, pipeline_context, run_pipeline_stage1
pipeline executes stages sequentiallyabsentinferred4 of 7: execute_pipeline, fire_start_cb, pipeline_context, run_pipeline_stage1
pipeline forwards prior stage output as contextabsentinferred4 of 7: execute_pipeline, fire_start_cb, pipeline_context, run_pipeline_stage1
pipeline start_cb REJECT skips all stagesabsentinferred4 of 7: execute_pipeline, fire_start_cb, pipeline_context, run_pipeline_stage1
pipeline start_cb fires once with is_pipeline=1absentinferred4 of 7: execute_pipeline, fire_start_cb, pipeline_context, run_pipeline_stage1
Exception shields treat throwing callbacks as REJECTabsentinferred1 of 7: fire_start_cb3
Storage interface lifecycle integrationabsentinferred1 of 7: fire_start_cb3
a delegated child is locked to its target tier — the key the absentinferred1 of 7: fire_start_cb3
child context has correct depthabsentinferred1 of 7: fire_start_cb3
child context has fresh messagesabsentinferred1 of 7: fire_start_cb3
complete_cb REJECT writes patch to pending/<id>.patchabsentinferred1 of 7: fire_start_cb3
complete_cb receives patch and files_touchedabsentinferred1 of 7: fire_start_cb3
completion instructions injected for explicit_completionabsentinferred1 of 7: fire_start_cb3
coverage_gap absent → result fields stay defaultabsentinferred1 of 7: fire_start_cb3
coverage_gap signal propagates from child metadata to absentinferred1 of 7: fire_start_cb3
delegation result captures turn countabsentinferred1 of 7: fire_start_cb3
execute_delegation returns error for unknown tierabsentinferred1 of 7: fire_start_cb3
execute_resume_delegation handles seed history variantsabsentinferred1 of 7: fire_start_cb3
execute_resume_delegation precondition rejectionsabsentinferred1 of 7: fire_start_cb3
extract_summary falls back to last assistant messageabsentinferred1 of 7: fire_start_cb3
extract_summary prefers explicit completion summaryabsentinferred1 of 7: fire_start_cb3
extract_summary returns placeholder when no responseabsentinferred1 of 7: fire_start_cb3
gh#158: a delegated child's read satisfies its parent's write — absentinferred1 of 7: fire_start_cb3
gh#160: a nested delegation restores its parent's sandboxabsentinferred1 of 7: fire_start_cb3
gh#160: sibling delegations get distinct sandbox idsabsentinferred1 of 7: fire_start_cb3
gh#162: no context means a byte-identical opening messageabsentinferred1 of 7: fire_start_cb3
gh#162: seeded context reaches the child's opening messageabsentinferred1 of 7: fire_start_cb3
gh#48: a manager-driven delegation persists a row the FK accepts absentinferred1 of 7: fire_start_cb3
log_child_result emits warn branch for terminal_reasonabsentinferred1 of 7: fire_start_cb3
null complete_cb writes patch to pending/<id>.patchabsentinferred1 of 7: fire_start_cb3
start_cb ACCEPT lets delegation proceedabsentinferred1 of 7: fire_start_cb3
start_cb REJECT aborts delegation before child loop runsabsentinferred1 of 7: fire_start_cb3
start_cb receives correct request fieldsabsentinferred1 of 7: fire_start_cb3
todo list saved and restored across delegationabsentinferred1 of 7: fire_start_cb3
Basic response contains no special tokensabsentinferred6 of 76
Batch generation worksabsentinferred6 of 76
Budget-exhausted forced complete sets terminal_reason metadataabsentinferred6 of 76
Circuit breaker limits tool calls per turnabsentinferred6 of 76
Compaction fires when context exceeds thresholdabsentinferred6 of 76
Compaction triggers at thresholdabsentinferred6 of 76
Context accumulates across turnsabsentinferred6 of 76
Context anchors persist across runsabsentinferred6 of 76
Delegation directive triggers child loopabsentinferred6 of 76
Delegation wiring fires on_delegation_start callbackabsentinferred6 of 76
Dynamic identity creation and generation through engine loopabsentinferred6 of 76
Empty response handled gracefullyabsentinferred6 of 76
Engine state transitions include PLANNING and EXECUTINGabsentinferred6 of 76
Finish reason length continues loopabsentinferred6 of 76
Generate is called exactly once per iterationabsentinferred6 of 76
Hooks fire in correct order during a generation cycleabsentinferred6 of 76
Interrupt stops loopabsentinferred6 of 76
MCP authorization denial propagates through engineabsentinferred6 of 76
Max iterations stops loopabsentinferred6 of 76
Metrics accurate after runabsentinferred6 of 76
Multi-turn engine calls retain contextabsentinferred6 of 76
Root conversation created at run() init when storage wired (gh#48)absentinferred6 of 76
Route callback is invoked for tier selectionabsentinferred6 of 76
Routing fires on_tier_selected callbackabsentinferred6 of 76
Single iteration completesabsentinferred6 of 76
Single-turn engine loop produces coherent responseabsentinferred6 of 76
State transitions IDLE->PLANNING->EXECUTING->COMPLETEabsentinferred6 of 76
Streaming generation worksabsentinferred6 of 76
Streaming interrupt propagates to backend cancel chain absentinferred6 of 76
Tier routing fires callbackabsentinferred6 of 76
Tool call cycle: generate, parse, execute, generateabsentinferred6 of 76
Tool call cycle: generate, parse, execute, regenerateabsentinferred6 of 76
True end-to-end: real prompts, real engine, real modelabsentinferred6 of 76
a context-overflow refusal fails the turn instead of retrying itabsentinferred6 of 76
auto_chain child sets COMPLETE at depth > 0absentinferred6 of 76
auto_chain does not fire without configabsentinferred6 of 76
auto_chain root fires tier change at depth 0absentinferred6 of 76
budget_exhausted child is relayed partial to lead (E2)absentinferred6 of 76
delegation guards reject depth/cycle/repeat/pipeline-depthabsentinferred6 of 76
delegation snapshot + per-tier metrics accumulationabsentinferred6 of 76
gh#105: constitutional validator's toolless render must NOT clobber absentinferred6 of 76
gh#111: a delegation whose child produces raw UTF-8 content does not absentinferred6 of 76
gh#111: a tool call whose arg carries raw UTF-8 is preserved, not absentinferred6 of 76
gh#111: raw UTF-8 in backend-cleaned content is sanitized before it absentinferred6 of 76
gh#119: delegation auto-complete folds child summary into lead's absentinferred6 of 76
gh#121: zero-tool-call correction names tier's actual toolsabsentinferred6 of 76
gh#123 part 1: zero-tool-call counter resets after genuine tool call progressabsentinferred6 of 76
gh#123 part 2: zero-tool-call ceiling is per-tier configurableabsentinferred6 of 76
gh#123 part 3: prose-only nudge turn does NOT set failure_reason in metadataabsentinferred6 of 76
gh#123 part 4: ChildContextInfo.max_consecutive_empty_turns_override wired through engineabsentinferred6 of 76
gh#158: two concurrent runs accumulate metrics safelyabsentinferred6 of 76
gh#160: an isolated delegation never writes the project, and absentinferred6 of 76
gh#162: a delegate seeded with context answers from the named absentinferred6 of 76
gh#162: resume by target picks that tier's latest delegationabsentinferred6 of 76
gh#169: a capped loop carries its last real content, annotatedabsentinferred6 of 76
gh#169: a capped loop that produced nothing stays distinguishableabsentinferred6 of 76
gh#169: the parent relay receives the capped child's real workabsentinferred6 of 76
gh#181: a hard cut with nothing substantive stays distinguishableabsentinferred6 of 76
gh#181: a thinking-budget hard cut carries the run's real contentabsentinferred6 of 76
gh#181: the parent relay receives the hard-cut child's real workabsentinferred6 of 76
gh#183: a fresh top-level run still clears a stale interruptabsentinferred6 of 76
gh#183: a tier's identity overrides reach a top-level runabsentinferred6 of 76
gh#209/#212: a turn that ends in ERROR records why, for the callerabsentinferred6 of 76
gh#77: entropic.complete is terminal when emitted with sibling pipelineabsentinferred6 of 76
gh#80: a tool call resets the budget windowabsentinferred6 of 76
gh#80: budget off (default) does not gate a tool-call-free spiralabsentinferred6 of 76
gh#80: tokens budget nudges then hard-cuts a tool-call-free spiralabsentinferred6 of 76
gh#81: interrupt during tool processing halts before pending dispatchabsentinferred6 of 76
gh#81: run_loop(inherit_interrupt=false) clears a stale interruptabsentinferred6 of 76
gh#81: run_loop(inherit_interrupt=true) preserves a pre-set interruptabsentinferred6 of 76
gh#84 combined: should_stop halts the loop when the duplicate absentinferred6 of 76
gh#84: a successful tool call DOES reset the budgetabsentinferred6 of 76
gh#84: rejected-duplicate tool calls do NOT reset the budgetabsentinferred6 of 76
gh#88 combined: process_tool_results defangs a meta {action} absentinferred6 of 76
gh#88: a gemma multi-turn session never accumulates a parrotable absentinferred6 of 76
hook dispatch: info / PRE_GENERATE cancel / POST_GENERATE rewrite / ON_ERRORabsentinferred6 of 76
last_loop_metrics populated after runabsentinferred6 of 76
max_iterations override caps loop before global limitabsentinferred6 of 76
misc accessors: pause / context_usage / idle / project_dirabsentinferred6 of 76
queue capacity / cap mutation / clear / observer / state slotabsentinferred6 of 76
resume_delegation failure paths surface typed errorsabsentinferred6 of 76
set_storage wiring covers init_session_conversation pathsabsentinferred6 of 76
should_auto_chain false when no locked tierabsentinferred6 of 76
v2.14.6: a lead that answers in prose is nudged, and its forced absentinferred6 of 76
v2.14.6: after a nudge, a tier that owes a tool call is forced to make oneabsentinferred6 of 76
v2.14.6: an empty turn is retried, never accepted as completeabsentinferred6 of 76
v2.14.6: the model's own tool call stays in the history it is shownabsentinferred6 of 76
v2.14.6: with thinking on, each loop turn ends in a real tool callabsentinferred6 of 76
validation_provider variants are all non-fatalabsentinferred6 of 76
zero-tool-call with explicit_completion halts within retry capabsentinferred6 of 76
gh#182: a model-supplied max_turns bounds the delegated childabsentinferred6 of 77
v2.14.6: after a prose answer is nudged, the forced retry may only absentinferred6 of 77