Skip to content

fix(repo): unbreak main — eight breaks the four parallel unbreak merges left behind - #2014

Merged
macanderson merged 4 commits into
mainfrom
unbreak-main-1964-merge
Aug 7, 2026
Merged

fix(repo): unbreak main — eight breaks the four parallel unbreak merges left behind#2014
macanderson merged 4 commits into
mainfrom
unbreak-main-1964-merge

Conversation

@macanderson

@macanderson macanderson commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What & why

main is red at 6c345532 on three separate gatescargo fmt --check,
cargo clippy -D warnings, and the file-size ratchet — plus workspace
rustdoc. Every open PR inherits all of it.

The cause is not one bad change. Four sessions fixed the same red base
concurrently (#1964, #1970, #1971, and an earlier push to #1964's branch).
The merge that closed #1964 resolved every overlap by keeping both
sides
, which is the dangerous resolution here: it produces code that
still compiles, so nothing conflicted and nobody had to look at it, and the
damage only shows up under -D warnings.

clippy (-D warnings) — four merge artefacts

Site Lint
management_prompt/tests.rs ModelCallRole::Research appears twice in one | chain → unreachable_patterns
pipeline/scope_stage.rs a hoisted let mut spend and a per-iteration inline Spendunused_variables + unused_mut
tests/verification_hardening.rs SHELL_TOOL, shell_call_result, PassingShell duplicated into the flip_halt_arming child → three dead_code

In each case the duplicate is deleted and the used copy kept. For
scope_stage that is the inline Spend, because the loop replans after a
rejected scope card and a moved bundle could not be handed to the next
attempt — #1971's comment beside it already says so.

fmt

crates/stella-protocol/src/event/tests.rs is missing the trailing newline
rustfmt wants after mod tag_table;. Unrelated to the merges and failing
on its own.

rustdoc

StepUsage links a bare [`CompactionRewrite`], re-exported at the crate
root but never in event's scope — the next line already spells the field
crate::CompactionRewrite, so the link now matches. This one was
invisible until the stella-cli link above it was fixed: cargo doc
stops at the first failing crate, so a broken link one dependency layer
down masks every link beneath it. Third occurrence of that pattern here.

file-size ratchet

driver.rs and pipeline/tests.rs each sit one line over a stale ceiling.
Regenerated with make file-size-update rather than hand-edited — which is
why the diff mostly tightens: pipeline.rs drops 3451 → 3181 and
bus.rs 2126 → 1891. Both were already true and neither was recorded.

The witness

No witness test: this is a build/lint/format repair with no behaviour
change. The gate is the witness, and each failure was reproduced locally
before and after.

The gate

Run on this tree, not inferred:

  • make guards-fast — all 25 guards plus cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps (24 crates)
  • cargo test --workspace
  • ./scripts/check-file-size.sh and check-god-files

Nothing left behind

Already filed and linked, not duplicated:

Refs #1986
Refs #1972
Refs #1977

Summary by Sourcery

Repair main by resolving merge artefacts and bringing formatting, linting, documentation, and file-size checks back to green.

Bug Fixes:

  • Remove duplicated management prompt role arm to fix unreachable pattern lint.
  • Drop unused scope-stage budget variable to clear unused variable lints.
  • Delete duplicate shell tooling fakes from verification hardening tests to remove dead code lints.
  • Correct rustdoc link for compaction rewrite events so documentation builds cleanly.
  • Add missing trailing newline in event tests module to satisfy rustfmt.

Enhancements:

  • Clarify documentation around daemon boot resume-point handling and location of shell doubles for flip-halt tests.

Build:

  • Regenerate file-size baseline to reflect current driver and pipeline module sizes, re-aligning with the file-size ratchet checks.

Tests:

  • Tighten test layout by consolidating flip-halt shell doubles into a single module referenced by the arming tests.

Chores:

  • Minor comment and whitespace cleanups across daemon boot, pipeline scope stage, and event tests.

…s the #1964 merge and its neighbours left

`main` fails `fmt`, `clippy -D warnings` and the file-size ratchet at
6c34553. Four parallel sessions fixed the same red base at once (#1964,
#1970, #1971 and this branch's earlier push); the merge that closed #1964
resolved every overlap by keeping BOTH sides, which produces code that
compiles and lints red rather than a conflict anyone had to look at.

Clippy (`-D warnings`), all merge artefacts:

- `management_system_block` lists `ModelCallRole::Research` twice in one
  `|` chain — both sides appended it at different positions, so git took
  both. `unreachable_patterns`. One copy removed.
- `scope_stage::plan_with_review` both hoists `let mut spend` before the
  loop AND builds an inline `Spend` per iteration. The hoisted binding is
  dead (`unused_variables` + `unused_mut`). The inline form is kept: it is
  the one the loop actually needs, and #1971's comment beside it says why.
- `SHELL_TOOL`/`shell_call_result`/`PassingShell` exist in both
  `verification_hardening` and its `flip_halt_arming` child. The child's
  are the used ones, so the parent's three are `dead_code`. Deleted, and
  the `mod` doc now says where the doubles live.

Formatting: `crates/stella-protocol/src/event/tests.rs` is missing the
trailing newline `rustfmt` wants after `mod tag_table;` — unrelated to any
of the above and failing `cargo fmt --check` on its own.

File-size ratchet: `driver.rs` and `pipeline/tests.rs` each sit one line
over a stale ceiling. Regenerated with `make file-size-update` rather than
hand-edited, which is also why the diff mostly TIGHTENS: `pipeline.rs`
drops 3451 -> 3181 and `bus.rs` 2126 -> 1891, both already true before this
change and neither recorded.

Verified on this tree, not inferred: `make guards-fast` (all 25 guards plus
fmt), workspace clippy, workspace rustdoc, and `cargo test -p
stella-pipeline`.

Refs #1986
Refs #1972
An eighth break on the same red base, and one the previous commit's
workspace rustdoc run could not see: `cargo doc` stops at the first crate
that fails, and `stella-protocol` sits under everything, so this only
surfaced once the `stella-cli` link above it was resolved — the layered
masking that has now bitten this repo three times in a row.

`StepUsage`'s doc links a bare [`CompactionRewrite`], which is re-exported
at the crate root but never imported into `event`'s scope; the very next
line already spells the field's type `crate::CompactionRewrite`. The link
now uses the same path the field does.

Refs #1986

@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

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
stella-cli-docs Ready Ready Preview Aug 7, 2026 3:46am

@sourcery-ai

sourcery-ai Bot commented Aug 7, 2026

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

Reviewer's Guide

Restores main to green by removing merge-introduced duplicates that broke Clippy, fixing rustdoc link scoping, satisfying rustfmt, and updating the file-size baseline to match current code size, with no intended behavioral changes.

Flow diagram for restoring CI gates on main

flowchart TD
    repo_red["Red main at 6c345532"]
    clippy_fail["Clippy -D warnings fails"]
    rustdoc_fail["Rustdoc -D warnings fails"]
    fmt_fail["cargo fmt --check fails"]
    size_fail["File-size ratchet fails"]
    pr_fixes["This PR: remove duplicates, fix rustdoc link, add newline, update file-size baseline"]
    repo_green["All gates green on main"]

    repo_red --> clippy_fail
    repo_red --> rustdoc_fail
    repo_red --> fmt_fail
    repo_red --> size_fail

    clippy_fail --> pr_fixes
    rustdoc_fail --> pr_fixes
    fmt_fail --> pr_fixes
    size_fail --> pr_fixes

    pr_fixes --> repo_green
Loading

File-Level Changes

Change Details Files
Remove duplicated shell test helpers that were incorrectly reintroduced into verification_hardening and document that shell-related fakes live in the parent module.
  • Delete local definitions of SHELL_TOOL, shell_call_result, and PassingShell in the flip_halt_arming child module wrapper so the shared versions in the parent test module are used instead
  • Clarify module-level comment to state that shell doubles the halt needs live in the parent module beside the tests that script them
crates/stella-pipeline/src/pipeline/tests/verification_hardening.rs
Fix duplicated match arm and clean up scope-stage budgeting state introduced by overlapping merges.
  • Remove the duplicate ModelCallRole::Research arm from the management_system_block match to satisfy Clippy's unreachable_patterns lint
  • Drop the unused hoisted let mut spend variable so the loop uses only the per-iteration Spend constructed inline, eliminating unused_mut/unused_variables lints and preserving the intended re-planning behavior after rejected scope cards
crates/stella-pipeline/src/management_prompt/tests.rs
crates/stella-pipeline/src/pipeline/scope_stage.rs
Repair documentation issues so cargo doc passes with warnings-as-errors.
  • Change the CompactionRewrite intra-doc link on StepUsage to [crate::CompactionRewrite] so it resolves within the event module's scope
  • Fix a small wording/line-wrap issue in the stella-cli daemon boot documentation comment for clarity
crates/stella-protocol/src/event.rs
crates/stella-cli/src/daemon/boot.rs
Satisfy formatting and file-size gates with no behavioral changes.
  • Add the missing trailing newline to event/tests.rs so cargo fmt --check passes
  • Regenerate scripts/file-size-baseline.txt via make file-size-update so the recorded ceilings match the current sizes of driver.rs, pipeline.rs, bus.rs, and related files, mostly tightening previously stale limits
crates/stella-protocol/src/event/tests.rs
scripts/file-size-baseline.txt

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

…docs/wire

`StepUsage::rewrites`' doc comment is not only rustdoc — `docs/wire/` is
generated from these types and the comment ships as the field's
`description` in `agentevent.schema.json`, `serveframe.schema.json` and
both `.d.ts` files. So the previous commit's `crate::CompactionRewrite`
fixed the rustdoc link by writing Rust-internal pathing into a
language-agnostic contract a TypeScript consumer reads, and left the
committed schema stale, which `wire-schema` caught.

Plain backticks instead: no link for rustdoc to resolve, and a description
that still names the type for every consumer. A JSON Schema reader loses
nothing — the field's `items` already carries
`"$ref": "#/$defs/CompactionRewrite"` on the next line.

`docs/wire/` regenerated with `make wire-schema-update`; the diff is the
four description lines and nothing else.

Refs #1986
@macanderson
macanderson merged commit 2d3cd79 into main Aug 7, 2026
11 of 12 checks passed
@macanderson
macanderson deleted the unbreak-main-1964-merge branch August 7, 2026 03:46
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