fix: repair the #1331 merge — one generation of #1295, one engine, one bus - #1337
Merged
Conversation
…e bus `main` has not compiled since #1331. Its branch merged `main` in and resolved three conflicts by keeping both sides, which left two crates unparseable and a shipped knob unreachable. Each fix takes the side `main` already had. **#1295 had two generations, and both landed.** #1328 shipped the refined design to `main` — `judge_evidence_demand`, gated on a tracked command so the ask is only raised where it can be answered (#1211 §1). The #1331 branch still carried its own earlier draft, `require_evidence_for_lone_judge_pass`. The merge kept both config fields, both CLI knobs, and spliced both bodies into `verify_candidate`, leaving a `revise_candidate(` call unterminated. The older draft is removed: its const, its field, its CLI plumbing, and the two tests that exercised it — `tests/judge_evidence_demand.rs` covers all four of their cases plus the no-tracked-command one they never had. The draft's TOML plumbing had *displaced* the shipped knob's, so `pipeline_judge_evidence_demand` parsed as an unknown key, never reached `PipelineConfig`, and was dropped by `AgentEngineConfig::overlay` — the same silently-lower-scope-wins bug the `headless_scope_bypass` comment describes. Renaming that plumbing restores it. **`ServeConfig` lost a field initializer.** `extensions` (#1298) was spliced into the body of `with_sub_agents` (#1297), which then returned nothing. **`run_session` built two engines.** One over `&tools` with the hook bus and the calibration map (#1298), one over the delegating `tool_view` that makes sub-agents reachable (#1297) — with neither attachment. They are now one engine over `tool_view`, carrying both. The duplicated `drive_turn` that followed the goal-run `match` is gone, and the bus reaches every round of a goal run and every sub-agent's tool executor: an operator policy that can refuse a tool call must not be escapable by delegating it. Also: the `SessionSpec` literals in both serve suites carry the other side's fields, `api_sources()` counts the two files it gained, `judge_evidence_demand` is switched off in the OOM scenario the way its siblings already do it, and `routes.rs` — 1521 lines once both sides' routes landed — moves `/v1/sessions` into a submodule, with the two now-obsolete baseline entries retired. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C6NdL7mDUZZGk3FD44EgY8
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Reviewer's GuideMerge repair that restores compilation and intended behaviour after #1331 by removing the earlier #1295 evidence knob implementation, wiring the shipped Sequence diagram for goal runs and sub-agents sharing one engine and hook bussequenceDiagram
actor Host
participant routes_handle_session_turn
participant Session
participant run_session
participant Engine
participant HookBus
participant drive_goal
participant drive_turn
participant RemoteToolExecutor
Host->>routes_handle_session_turn: POST /v1/sessions/{id}/turns
routes_handle_session_turn->>Session: Session::start(SessionSpec{extensions,sub_agents,calibration})
Session->>run_session: run_session(spec,bus)
run_session->>RemoteToolExecutor: RemoteToolExecutor::new(advertised,frame_tx,pending,spec.reverse_request_timeout,bus.clone)
run_session->>Engine: Engine::with_sleeper(provider,tool_view,spec.config,sleeper)
run_session->>Engine: Engine::with_gate(gate)
run_session->>Engine: Engine::with_steering(steering)
run_session->>Engine: Engine::with_bus(bus)
run_session->>Engine: Engine::with_calibration(spec.calibration)
alt spec.goal is Some
run_session->>drive_goal: drive_goal(engine,spec.messages,run,spec.budget,event_tx,cancel,bus.as_ref)
loop each_round
drive_goal->>Engine: Engine::with_turn_instance(base_turn_offset)
drive_goal->>drive_turn: drive_turn(round_engine,messages,budget,events,round_cancel,bus)
end
else no goal
run_session->>drive_turn: drive_turn(engine,spec.messages,spec.budget,event_tx,cancel,bus.as_ref)
end
Flow diagram for wiring the judge_evidence_demand knob from CLI/TOML into PipelineConfigflowchart LR
CLI[AgentEngineConfig.pipeline_judge_evidence_demand]
TOML[AgentsSection.pipeline_judge_evidence_demand]
Overlay[AgentEngineConfig::overlay]
Pipeline[PipelineConfig.judge_evidence_demand]
CLI --> Overlay
TOML --> Overlay
Overlay --> Pipeline
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
macanderson
marked this pull request as ready for review
August 4, 2026 07:37
Contributor
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
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.
What & why
mainhas not compiled since #1331. That branch mergedmainin and resolved three conflicts by keeping both sides, which left two crates unparseable,docker-servered, and a shipped knob unreachable. Every fix below takes the sidemainalready had.#1295 had two generations, and both landed. #1328 shipped the refined design to
main—judge_evidence_demand, gated on a tracked command so the ask is only raised where it can be answered (#1211 §1). The #1331 branch still carried its own earlier draft,require_evidence_for_lone_judge_pass. The merge kept both config fields, both CLI knobs, and spliced both bodies intoverify_candidate, leaving arevise_candidate(call unterminated. The older draft is removed — its const, field, CLI plumbing, and its two tests, whose four casestests/judge_evidence_demand.rsalready covers, plus the no-tracked-command case they never had.That draft's TOML plumbing had displaced the shipped knob's, so
pipeline_judge_evidence_demandparsed as an unknown key, never reachedPipelineConfig, and was dropped byAgentEngineConfig::overlay— the same silently-lower-scope-wins bug theheadless_scope_bypasscomment describes. Renaming that plumbing restores it. This one is a silent behavior regression, not a compile error, so it would have survived a green build.ServeConfiglost a field initializer.extensions(#1298) was spliced into the body ofwith_sub_agents(#1297), which then returned nothing.run_sessionbuilt two engines. One over&toolscarrying the hook bus and calibration map (#1298); one over the delegatingtool_viewthat makes sub-agents reachable (#1297), carrying neither. They are now one engine overtool_viewwith both attachments. The duplicateddrive_turnafter the goal-runmatchis gone, and the bus now reaches every round of a goal run and every sub-agent's tool executor — an operator policy that can refuse a tool call must not be escapable by delegating it.Also: the
SessionSpecliterals in both serve suites carry the other side's fields;api_sources()counts the two files it gained;judge_evidence_demandis switched off in the OOM scenario the way its siblings already do; androutes.rs— 1521 lines once both sides' routes landed — moves/v1/sessionsinto a submodule, with the two now-obsolete size-baseline entries retired.Refs #1331
The witness
stella-pipelineandstella-servedid not compile, socargo test,clippy,doc,fmtand the container build all failed before reaching an assertion. The restored suites are the proof, includingtests/judge_evidence_demand.rs, which pins the surviving generation's four behaviours and never ran onmain.Verified that no shipped feature was dropped: every file added by #1330 is present and byte-identical to
main, and the key symbols of #1290, #1291, #1293, #1294, #1295, #1297, #1298 and #1301 all resolve.The gate
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace— 108 binaries, 0 failuresjudge_evidence_demand)check-file-size.sh,check-wire-schema.sh,RUSTDOCFLAGS="-D warnings" cargo doc,make cache-correctness,stella context validateRefs, notCloses: this repairs a merge rather than finishing an issue.Ground-rule check
stella-core; no new depsAnything reviewers should know?
The one judgement call is which generation of #1295 survives. Both compile in isolation, so this could not be settled by the build. The evidence:
git log -Sshowsevidence_demand_is_worth_a_turnenteredmainwith #1328 (9a509cc), andrequire_evidence_for_lone_judge_passhas no history onmainat all — it existed only on the #1331 branch. The surviving generation is also the stricter one (bounded to one demand per candidate, and only raised when a tracked command could answer it) and is the one whose default is on. If that reading is wrong, the revert is contained tostella-pipeline/src/pipeline.rsand the CLI settings plumbing.Second call:
routes.rsneeded to lose ~21 lines to clear the 1500-line ratchet. Splitting out its#[cfg(test)] mod testswould have cleared it by 33 lines; extracting the four/v1/sessionshandlers instead leaves ~330 lines of headroom, which matters because both merge parents were actively adding routes to this file. The handlers are re-exported, soserver.rs's dispatch is unchanged — the move is mechanical, with no logic edits.The size baseline's obsolete entries were retired with
make file-size-update, which also retightened several stale ceilings. I confirmed against both merge parents that those files genuinely are that size and no content was lost in the merge.Generated by Claude Code
Summary by Sourcery
Repair post-#1331 merge regressions by removing the obsolete pipeline evidence knob generation, fixing serve/session engine wiring and configuration initialization, and splitting /v1/sessions routes into a dedicated module while keeping APIs and tests in sync.
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: