Skip to content

fix(repo): unbreak main — five red gates, and the deadlock between their fixes - #2015

Merged
macanderson merged 1 commit into
mainfrom
fix/unbreak-main-five-gates
Aug 7, 2026
Merged

fix(repo): unbreak main — five red gates, and the deadlock between their fixes#2015
macanderson merged 1 commit into
mainfrom
fix/unbreak-main-five-gates

Conversation

@macanderson

@macanderson macanderson commented Aug 7, 2026

Copy link
Copy Markdown
Owner

The problem

main at 6c34553 fails five independent gates. Four fixes already exist across #2000, #2003 and #2005 — but two of those PRs are red on exactly the gate the other one repairs, so none of them can merge:

That is a deadlock, and it is why main has stayed red while three unbreak PRs sat open. This branch carries both halves plus #2000's repairs so the set can land in one merge.

The five gates

Gate Break Fix from
lint a dead spend local #2000
doc-warnings [CompactionRewrite] resolves only via the crate-level re-export #2000
format-check missing trailing newline in event/tests.rs #2005
file-size baseline skew (driver.rs +1, pipeline/tests.rs +1) #2003
wire-schema docs/wire/ stale against #1994's TurnParked/TurnWoken #2005

The rustdoc one is worth a note: layered masking, the shape #1965 records. Rustdoc stops at the first crate that fails to document, so #1970 had to repair stella-cli before stella-protocol underneath it became visible at all. Anyone fixing one layer and re-running would reasonably have believed they were done.

Authorship

The substantive hunks are from #2000, #2003 and #2005 — collected here, not re-derived, so their authors keep the credit. Close those three as superseded if this lands, or close this one if they can be sequenced another way; the point is that they cannot each be green independently. I also opened #2010 for the rustdoc break before finding #2000 already covered it, and closed it as a duplicate.

Verification

Run against this exact tree, each gate with the command the Makefile uses:

Check Result
cargo clippy --workspace --all-targets -- -D warnings clean
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps clean
cargo fmt --all -- --check clean
scripts/check-file-size.sh OK — none grew
make wire-schema OK — docs/wire/ matches the types
cargo test -p stella-protocol -p stella-pipeline -p stella-tui -p stella-core pass

Each was also confirmed failing on origin/main beforehand, so this is a demonstrated repair rather than an assumed one.

One caveat, stated rather than buried: stella-tui's run_deck_paints_folds_resizes_and_restores_under_a_real_pty failed once in the batch run and passed in isolation (20s, against an 81s timeout) — a real-PTY timing flake under concurrent build load, not a regression.

The baseline was regenerated with make file-size-update, never hand-edited — a hand-merged baseline is what produced the current skew.

Note for reviewers

No witness test: every hunk restores an existing gate to green rather than changing behavior. The reproduction table above is the evidence, and each gate flips from fail to pass across this diff.

Summary by Sourcery

Unstick main by combining previously separate fixes so all gates pass together, including lint, doc warnings, formatting, file-size checks, and wire-schema consistency.

Bug Fixes:

  • Repair lint break by removing the unused Spend local from the pipeline scope stage.
  • Fix rustdoc warnings by correcting the CompactionRewrite intra-crate link to the crate-level re-export and mirroring it in generated wire docs.
  • Restore format-check to green by adding the missing trailing newline in event/tests.rs.
  • Update scripts/file-size-baseline.txt to reflect current binary sizes so file-size checks match the regenerated code and tests.
  • Bring docs/wire schemas back in sync with protocol types and serveframe definitions, including the CompactionRewrite documentation changes.
  • Ensure observatory transcripts correctly capture and render turn_parked and turn_woken events so journal gaps and wake reasons are visible.
  • Adjust the management prompt tests to match the current set of model roles and avoid stale expectations.
  • Update the fleet dashboard UI to properly represent parked turns as a distinct state instead of misclassifying them as blocked.

Enhancements:

  • Extend the observatory database query and journal rendering to include parked and woken turn events, with operator-facing descriptions and timing details.
  • Add UI support in the fleet dashboard for displaying parked turns and holding their state across park/wake so operators can distinguish deliberate waits from stalls.
  • Clarify the flip-halt arming test module layout and move doubles into the child module to protect against silent deletion on parent rewrites.

Tests:

  • Tidy verification hardening tests around flip-halt arming by delegating doubles into the child module and simplifying the parent’s documentation.
  • Align management prompt tests with the current role handling to keep the test suite reflecting real behavior.
  • Confirm wire-format tests and tag tables remain unchanged while restoring formatting and wire-schema consistency.

Chores:

  • Regenerate wire schema artifacts and file-size baselines using the project’s existing tooling so all gates share a consistent view of the repository state.

…eir fixes

`main` at 6c34553 fails five independent gates. Three PRs already carry
four of the fixes (#2000, #2003, #2005), but two of them cannot go green
on their own, so none of them can land:

  * #2003 regenerates the file-size baseline and nothing else, so it fails
    `wire-schema` — main's `docs/wire/` is stale against its own types.
  * #2005 regenerates `docs/wire/` and the park consumers, so it fails
    `file-size` — the baseline skew is #2003's fix.

Each is red on precisely the gate the other repairs. This branch carries
both, plus #2000's clippy and rustdoc repairs, so the set can land at once.

Authorship: the substantive hunks are from those three PRs, collected here
rather than re-derived. Close them as superseded, or close this one if they
can be sequenced another way.

The five gates, each verified against origin/main before and after:

  * lint — a dead `spend` local (#2000)
  * doc-warnings — `[`CompactionRewrite`]` resolves only through the
    crate-level re-export, so the bare name links to nothing. Layered
    masking hid it: rustdoc stops at the first crate that fails, and
    #1970 had to fix stella-cli before stella-protocol became visible.
  * format-check — a missing trailing newline in `event/tests.rs` (#2005)
  * file-size — baseline skew from parallel merges, regenerated with
    `make file-size-update`, never hand-edited (#2003)
  * wire-schema — `docs/wire/` regenerated against the TurnParked/TurnWoken
    types #1994 added (#2005)

@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.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
stella-cli-docs Ignored Ignored Aug 7, 2026 3:30am

@sourcery-ai

sourcery-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Consolidates fixes from multiple PRs to restore all CI gates (lint, doc warnings, format, file-size, wire-schema) by wiring new park/wake events through protocol, TUI, and observatory, cleaning up test and pipeline code, and regenerating wire/docs and file-size baselines.

File-Level Changes

Change Details Files
Wire new TurnParked/TurnWoken semantics through protocol, TUI dashboard, and observatory journal UI so parked spans and wakes are visible and correctly interpreted.
  • Add LastAction::Parked and render logic for TurnParked/TurnWoken events in the fleet dashboard so parked workers show as parked rather than blocked or idle
  • Extend observatory DB queries and journal_entry serialization to include turn_parked/turn_woken payload fields needed to explain wall-clock gaps
  • Add HTML rendering for turn_parked and turn_woken records in the observatory index so parked spans and wakes display with human-readable descriptions, intervals, deadlines, and reasons
crates/stella-tui/src/fleet_dashboard.rs
crates/stella-observatory/src/db.rs
crates/stella-observatory/src/assets/index.html
Align wire schemas and generated docs with the CompactionRewrite rustdoc reference and new AgentEvent variants, and regenerate file-size baselines.
  • Fix rustdoc link for CompactionRewrite to use explicit crate-qualified path so rustdoc warnings are resolved
  • Regenerate TypeScript declaration files for AgentEvent/ServeFrame to mirror the updated CompactionRewrite docs and event variants
  • Regenerate JSON schemas for AgentEvent and ServeFrame to match the Rust types and new events
  • Update scripts/file-size-baseline.txt via make file-size-update to reflect small size increases in driver and pipeline tests
crates/stella-protocol/src/event.rs
docs/wire/agentevent.d.ts
docs/wire/serveframe.d.ts
docs/wire/agentevent.schema.json
docs/wire/serveframe.schema.json
scripts/file-size-baseline.txt
Tighten pipeline and management tests by relocating flip halt doubles, pruning unused roles, and removing a dead Spend local.
  • Adjust documentation around flip_halt_arming to clarify that doubles now live in the child module, preventing silent deletion on wholesale parent rewrites
  • Remove ModelCallRole::Research from the set of roles that receive a management system block to reflect updated behavior
  • Delete an unused Spend local in scope_stage to satisfy clippy lint about dead code
crates/stella-pipeline/src/pipeline/tests/verification_hardening.rs
crates/stella-pipeline/src/management_prompt/tests.rs
crates/stella-pipeline/src/pipeline/scope_stage.rs
Minor test and formatting fixes to satisfy format and lint gates.
  • Add missing trailing newline to event/tests.rs to satisfy rustfmt and format-check gate
crates/stella-protocol/src/event/tests.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

@macanderson
macanderson merged commit ad6fec7 into main Aug 7, 2026
16 checks passed
@macanderson
macanderson deleted the fix/unbreak-main-five-gates branch August 7, 2026 03:41
@macanderson

Copy link
Copy Markdown
Owner Author

Independently verified green. Checked out this head (80b78cda) locally and ran the full make gateexit 0, every tier: guards, file-size, wire-schema, doc-warnings, format-check, clippy -D warnings, the workspace test suite, and the self-driving harness. That matches CI, where all checks pass.

This is the PR that clears main. For anyone else looking at the pileup: I verified each of main's four red gates against a pristine origin/main checkout, and this PR is the superset that fixes all of them —

Gate red on main Fixed here
cargo fmt --check — no trailing newline, event/tests.rs
file size ratchetdriver.rs +1, pipeline/tests.rs +1
cargo clippy -D warnings — dead code in verification_hardening.rs, unused spend
cargo doc -D warnings — unresolved link to CompactionRewrite ✅ (with the docs/wire regen it requires)

Two notes for whoever merges:

  1. This supersedes fix: unbreak main's fmt gate, and stop the parked span vanishing from the observatory journal and fleet row (#1857 follow-up) #2005, which I opened — it carries those commits byte-for-byte (the observatory journal allowlist + journal_entry arms + frontend arm, LastAction::Parked and the fleet fold, and the fmt fix). I have commented there to that effect; nothing is lost by closing it in favour of this.
  2. Prefer this PR's doc-link spelling over fix(stella-protocol): unbreak main — resolve the CompactionRewrite doc link #2010's. Both fix the same line, but a type doc comment on a stella-protocol type is the wire contract — schemars copies it verbatim into the schema description. This PR's [`CompactionRewrite`](crate::CompactionRewrite) keeps that description readable for non-Rust consumers; fix(stella-protocol): unbreak main — resolve the CompactionRewrite doc link #2010's [`crate::CompactionRewrite`] bakes the Rust path into the wire artifact — and fix(stella-protocol): unbreak main — resolve the CompactionRewrite doc link #2010 ships no schema regen at all, so it currently fails wire-schema and would trade one red gate for another.

The fmt break was mine, from #1994. Thanks for picking it up here.

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