Skip to content

fix(stella-model): unbreak main — adapter_sources merge collision (#2748×#2752) + the dangling private doc link - #2754

Merged
macanderson merged 3 commits into
mainfrom
fix/2686-dangling-doc-link
Aug 10, 2026
Merged

fix(stella-model): unbreak main — adapter_sources merge collision (#2748×#2752) + the dangling private doc link#2754
macanderson merged 3 commits into
mainfrom
fix/2686-dangling-doc-link

Conversation

@macanderson

@macanderson macanderson commented Aug 10, 2026

Copy link
Copy Markdown
Owner

What & why

Main (f83692c) is red, from two independent residues of #2748's admin-merge, and this PR repairs both:

  1. Compile error under --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 added zai/tests/stream_fallback.rs to provider_parity.rs::adapter_sources (bumping the array length to 15) and feat(stella-core): reactive recovery from provider context-overflow errors (#2680) #2752 added include_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 and cargo test/clippy --all-targets fail on main (E0308 at provider_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 from GATE_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.
  2. rustdoc -D warnings failurefeat(stella-model): streaming→non-streaming fallback on hung or empty streams, with a first-byte deadline (#2686) #2748 moved ToolCallAccumulator into the private zai::stream module but left complete_inner's intra-doc link pointing at it. The doc-warnings gate documents private items (Makefile:247, --document-private-items), so main fails with unresolved link to 'ToolCallAccumulator::announced' while a plain cargo doc --no-deps stays 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

  • Witness test
  • No witness needed — both are build/doc repairs whose oracle is the gate itself, red on main and green here:
cargo test -p stella-model              # main: E0308, could not compile → here: 390 passed
RUSTDOCFLAGS="-D warnings" cargo doc -p stella-model --no-deps \
  --document-private-items --keep-going # main: unresolved link, exit 101 → here: exit 0

The gate

Nothing left behind

Nothing new; the remaining-dialects extension of #2686 stays tracked in #2746.

Refs #2686, #2748, #2752

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
stella-cli-docs Ignored Ignored Preview Aug 10, 2026 10:49pm

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@sourcery-ai

sourcery-ai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Fixes 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

Change Details Files
Fix broken intra-doc reference in ZaiProvider::complete_inner doc comment to restore rustdoc gate passing.
  • Replaced unresolved intra-doc link to ToolCallAccumulator::announced with inline code-form reference
  • Clarified that ToolCallAccumulator::announced is defined in zai/stream.rs while keeping the surrounding explanatory prose intact
crates/stella-model/src/zai.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

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
macanderson force-pushed the fix/2686-dangling-doc-link branch from 44fdfda to e3a5ec5 Compare August 10, 2026 22:32
@macanderson macanderson changed the title fix(stella-model): repoint the ToolCallAccumulator doc reference #2748's split dangled fix(stella-model): unbreak main — adapter_sources merge collision (#2748×#2752) + the dangling private doc link Aug 10, 2026
#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
macanderson merged commit 6308227 into main Aug 10, 2026
15 checks passed
@macanderson
macanderson deleted the fix/2686-dangling-doc-link branch August 10, 2026 22:51
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant