Slice/m2.9#354
Conversation
…r error PhaseNode now declares resolves?: ResolverInput[] on both serial and parallel variants to enumerate which configuration inputs each phase validates. PreflightSnapshot and ResolverInput types define the shape of preflight validation contracts. config-resolver PipelineError variant captures resolution failures during the pre-flight walk (Slice 2.9 task 1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The structured fields (failure/target/phaseName) are the contract; detail stays optional so the pre-flight walk can omit it and only the orchestrator's existing log fallback consumes it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…phase 0 Wires runPreflight into the inner for(;;) loop as the first statement, so any declared resolver failures abort the run before phase 0 executes. Routes through the existing abortRun path (preflight-failure → outcome=failed, reverse-replay is a no-op at zero deltas). Widens AbortCause and abortRun's cause param with 'preflight-failure'; the user-cancel/otherwise ternary maps it to 'failed' without further change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gged) Direct insert/delete bypasses the delta log — system entries are diagnostic artifacts, not narrative state. writeSystemEntry clears any existing system entry before inserting so the MAX(position)+1 subquery resolves to the true content tail; at most one per branch, always the last entry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A throwing ResolverInput.when predicate rejected runPipeline outside the abort path, orphaning the registered run + its unresolved terminal (blocked edits, deadlocked awaitRunTerminal waiters). Catch and fail through abortRun like phase throws.
📝 WalkthroughWalkthroughImplements Slice 2.9 config pre-flight validation: extends pipeline types with ChangesConfig Pre-flight Validation and System Entry Helpers
Sequence Diagram(s)sequenceDiagram
participant Caller
participant runPipeline
participant runPreflight
participant resolveModel
participant abortRun
Caller->>runPipeline: runPipeline(pipeline, ctx)
runPipeline->>runPreflight: runPreflight(pipeline, { appSettings })
loop Each phase → branch → resolves input
runPreflight->>resolveModel: resolveModel(target, config)
resolveModel-->>runPreflight: ok | failure
end
alt any input fails
runPreflight-->>runPipeline: ConfigResolverError { kind, target, phaseName }
runPipeline->>abortRun: abortRun('preflight-failure', error)
abortRun-->>runPipeline: failed pipeline_runs record + run_complete event
runPipeline-->>Caller: failed result (no deltas, no phase 0)
else all inputs pass
runPreflight-->>runPipeline: null
runPipeline->>runPipeline: runPhases(...)
runPipeline-->>Caller: completed result
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request implements a configuration pre-flight validation step before running pipeline phases, ensuring that declared resolver inputs are valid against the current settings. It introduces runPreflight to perform this check in phase order, aborting the pipeline run cleanly with a config-resolver error if validation fails. Additionally, it introduces direct, non-delta-logged "system entries" (kind='system') to represent diagnostic artifacts (such as configuration failures) at the branch tail, along with actions to write and clear them, complete with comprehensive unit and integration tests. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/implementation/milestones/02-first-user-loop/slices/09-preflight.md`:
- Around line 148-159: The document contains conflicting guidance about system
entry write behavior. While the Preflight section correctly states that system
entries use direct non-delta-logged inserts, the Background and Scope sections
earlier in the 09-preflight.md file still reference composing the delta-logged
entry-create arm. Update the wording in the Background and Scope sections to
consistently state that system entries use direct non-delta inserts instead of
the delta-logged entry-create approach, ensuring the entire document describes a
single canonical behavior for system entry handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b9e2d302-2b2c-4fbe-b0b4-154a132b7292
📒 Files selected for processing (11)
docs/data-model.mddocs/implementation/milestones/02-first-user-loop/slices/09-preflight.mdlib/actions/index.tslib/actions/story-entries/system-entry.test.tslib/actions/story-entries/system-entry.tslib/pipeline/__tests__/preflight-orchestration.test.tslib/pipeline/index.tslib/pipeline/runtime/orchestrator.tslib/pipeline/runtime/preflight.test.tslib/pipeline/runtime/preflight.tslib/pipeline/types.ts
Summary by CodeRabbit
New Features
Documentation
Tests