Repository navigation
Conversation
Entire-Checkpoint: 204dee55f859
…ting Entire-Checkpoint: 8fe00b4cf322
…efactor Entire-Checkpoint: c66d4574a934
… the resolved model Entire-Checkpoint: 8fb17dddaaf2
Entire-Checkpoint: e518a7fbe7d8
This was referenced Sep 29, 2026
…s-run-log-records-each-phase-s-model-and-t
admarble
deleted the
feature/1198-feat-logs-run-log-records-each-phase-s-model-and-t
branch
September 29, 2026 19:03
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PhaseLognow has an optionalmodel(the resolved model frommodelUsage) andrequestedModel(the pre-resolutionrole:string, when one was configured). All threecreatePhaseLogFromTimingcall sites inbatch-executor.tsfill them in: spec, the main phase loop, and the quality loop.RunLogtop level hassequantVersion(fromgetVersion()increateEmptyRunLog) anddriver(resolveRunAgent(config)passed throughLogWriterOptions).modelinmetrics.jsonis the first phase's resolved model, inconfig.phasesorder. It falls back toANTHROPIC_MODEL ?? "opus"only when no phase reported one.Runner fix after QA (AC_NOT_MET → fixed)
QA found that all three call sites logged
config.phasePolicies[phase].modelasrequestedModel.resolvePhasePolicieshas already replaced that value with the resolved model, so arole:fastpolicy was logged asrequestedModel: "claude-sonnet-5". QA also found that the tests builtPhaseLogby hand and never ran the wiring..requestedModel.ExecutionConfig.phasePolicies's inline type gainsrequestedModel?, whichresolvePhasePoliciesalready set at runtime.batch-executor.test.ts(#1198: phase log model fields (AC-1)) runrunIssueWithLoggingand assert what reachescreatePhaseLogFromTiming. With arole:fastpolicy,requestedModelis"role:fast"andmodelis the dispatched model. With a raw model policy,requestedModelis absent.Mutation-verified: AC-1 — the main-loop site changed back to
?.model; both new wiring tests failed (2 failed / 102 passed); restored.Known limitation (QA, recommended action "document")
When the model ladder escalates a phase, the per-phase
requestedModelstill holds the phase's baserole:policy. The escalation's own requested rung is recorded inconfig.modelEscalation(seeModelEscalationFacts.requestedModel), not on the phase log.Test plan
npx tsc --noEmit: cleannpx vitest run src/lib/workflow/batch-executor.test.ts src/lib/workflow/run-log-schema.test.ts src/lib/workflow/log-writer.test.ts src/lib/workflow/run-orchestrator.test.ts src/lib/workflow/run-orchestrator.model-roles.test.ts: 259 passed (runner, after the fix)[Unreleased]entryCloses #1198
Refs #1203
🤖 Generated with Claude Code