fix(stella-model): unbreak main — adapter_sources merge collision (#2748×#2752) + the dangling private doc link - #2754
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFixes a failing rustdoc gate by replacing a broken intra-doc link to ToolCallAccumulator with a plain code-form reference that points readers to the correct file, without changing any executable code. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…stream split dangled The doc-warnings gate documents private items (--document-private-items), so complete_inner's intra-doc link to a type #2748 moved into the private zai::stream module fails rustdoc -D warnings on every push to main, while a plain `cargo doc --no-deps` stays green locally — which is how it slipped through. Plain code-font reference with the file named instead. Verify: RUSTDOCFLAGS="-D warnings" cargo doc -p stella-model --no-deps \ --document-private-items --keep-going Refs #2686
…2748 and #2752 collided on Two green PRs composed into a red main: #2748 added zai/tests/stream_fallback.rs to adapter_sources (bumping the array to 15) and #2752 added http.rs (its bump to 15 from the other side); the textual merge kept both entries and one length, so provider_parity.rs no longer compiles under --all-targets and every cargo test on main is red. The length was a shared cell every source-adding PR had to write — the same shape that removed the spelled-out total from GATE_STEPS (#1883) — so the fix returns a slice and deletes the cell rather than writing 16 into it. Refs #2686, #2748, #2752
macanderson
force-pushed
the
fix/2686-dangling-doc-link
branch
from
August 10, 2026 22:32
44fdfda to
e3a5ec5
Compare
7 tasks
#2680 merge duplicated f83692c (#2680/#2752) was branched before #2677's ladder extraction (drive_attempt_ladder in driver/rate_limit.rs). Its merge into main dropped `mod rate_limit;`, orphaning that file, and reintroduced the pre-#2677 inline retry_with_backoff_observed block verbatim on top of the new drive_attempt_ladder() call — corrupting the connecting comment into a bare `.rs`. token and leaving driver.rs referencing variables (cancel_guard, attempt_reasons, incomplete_events) that only exist inside the ladder now. Restores the clean call site (drive_attempt_ladder + destructure) and moves the actual new behavior — withholding terminal events for ProviderError::ContextOverflow so the caller can arm a recovery rung — into drive_attempt_ladder itself, where the ladder's error handling now lives. Verified: cargo check/clippy/test -p stella-core clean, including the three context_overflow witness tests from #2680 unchanged.
macanderson
added a commit
that referenced
this pull request
Aug 10, 2026
…t (torn comment, orphaned rate_limit module, doubled retry ladder) (#2759) ## What & why **Main is red at `f83692c82`** — stella-core does not compile. The admin merge of #2752 raced its in-flight rebase over #2744, and the squash text-merged a pre-#2744 branch onto post-#2744 main. Three artifacts in `crates/stella-core/src/driver.rs`: 1. A doc comment torn mid-word at line 1715–1716 (`// lives in `driver/` + a bare `.rs`.` line with no `//`) — the workspace-wide compile error. 2. `mod rate_limit;` was *replaced* by (instead of joined with) `pub(crate) mod overflow_recovery;`, orphaning `driver/rate_limit.rs` — the `check-module-reachability` failure. 3. `run_model_call` contained **both** retry ladders: #2744's extracted `drive_attempt_ladder` call *and* the dead pre-#2744 inline `retry_with_backoff_observed` block — and #2680's `ContextOverflow` interception lived only in the dead copy. ## The fix Single-ladder shape restored, with the two features composed where they belong: `drive_attempt_ladder` (`driver/rate_limit.rs`) now returns `ModelCallFailure`, and on a `ContextOverflow` withholds the terminal events and the breaker feed (an oversized request is the engine's accounting miss, not provider ill-health) so `settle_model_call_failure`'s recovery rungs (#2680) work; every other terminal error keeps the `RetriesExhausted`/`Error` pair + `record_failure` and returns `Fatal`. `RateLimited` parking (#2677) is untouched inside the ladder — the two recoveries are disjoint by error class. Net: −60 lines, driver.rs well under its ceiling. ## Evidence - Both features' witnesses pass on the composition: `context_overflow` (3/3) and `parked_wait` (6/6). - `cargo test -p stella-core --lib`: 1124 passed / 0 failed. - clippy `--all-targets -- -D warnings` clean; `cargo fmt --all` applied; unpiped `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p stella-core` exit 0. - `check-module-reachability`: OK (954 files, all reachable). `check-file-size`: OK. ## Companion The stella-model half of the red main (adapter_sources collision + doc link) is **PR #2754** — the two PRs touch different crates and compose; both are needed for green. ## Deleted tests None. (The deleted inline block was production code duplicated by the merge, not tests.) Refs #2752 #2744 #2680 #2677 ## Summary by Sourcery Restore stella-core’s model call retry ladder after a bad merge so main compiles and error handling is correctly composed. New Features: - Propagate model call failures from the rate-limit ladder via ModelCallFailure, including explicit ContextOverflow handling. Bug Fixes: - Fix a broken doc comment in driver.rs that prevented stella-core from compiling. - Reintroduce the rate_limit module alongside overflow_recovery to restore module reachability. - Ensure ContextOverflow and fatal error handling are wired through the unified drive_attempt_ladder path instead of duplicated inline logic. Enhancements: - Centralize terminal event emission and provider outcome recording inside the rate_limit ladder, reducing duplication and shrinking driver.rs.
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
Main (f83692c) is red, from two independent residues of #2748's admin-merge, and this PR repairs both:
--all-targets— a merge composition, not a bug in either parent: feat(stella-model): streaming→non-streaming fallback on hung or empty streams, with a first-byte deadline (#2686) #2748 addedzai/tests/stream_fallback.rstoprovider_parity.rs::adapter_sources(bumping the array length to 15) and feat(stella-core): reactive recovery from provider context-overflow errors (#2680) #2752 addedinclude_str!("http.rs")from the other side; the textual merge kept both entries and one length, so the array literal has 16 items behind a[&'static str; 15]return type andcargo test/clippy --all-targetsfail on main (E0308atprovider_parity.rs:617). The length was a shared cell every source-adding PR had to write — the exact shape that removed the spelled-out total fromGATE_STEPS(gate: the spelled-out gate-step count is a shared cell two concurrent PRs always collide on #1883) — so the fix returns&'static [&'static str]and deletes the cell instead of writing 16 into it, with a comment naming the incident.-D warningsfailure — feat(stella-model): streaming→non-streaming fallback on hung or empty streams, with a first-byte deadline (#2686) #2748 movedToolCallAccumulatorinto the privatezai::streammodule but leftcomplete_inner's intra-doc link pointing at it. The doc-warnings gate documents private items (Makefile:247,--document-private-items), so main fails withunresolved link to 'ToolCallAccumulator::announced'while a plaincargo doc --no-depsstays green — which is how it slipped through feat(stella-model): streaming→non-streaming fallback on hung or empty streams, with a first-byte deadline (#2686) #2748's local check. Repointed as plain code font naming the file.The witness
mainand green here:The gate
cargo fmt --checkcargo clippy -p stella-model --all-targets -- -D warnings(exit 0)cargo test -p stella-model— 390 passed, including feat(stella-model): streaming→non-streaming fallback on hung or empty streams, with a first-byte deadline (#2686) #2748's fallback witnesses and feat(stella-core): reactive recovery from provider context-overflow errors (#2680) #2752's overflow witnesses togetherNothing left behind
Nothing new; the remaining-dialects extension of #2686 stays tracked in #2746.
Refs #2686, #2748, #2752