fix(main): unbreak three gates — clone-on-Copy clippy, event.rs and deck_render.rs file-size overruns - #1874
fix(main): unbreak three gates — clone-on-Copy clippy, event.rs and deck_render.rs file-size overruns#1874macanderson wants to merge 1 commit into
Conversation
…d — clippy clone-on-Copy, two file-size overruns PR #1813 merged its pre-rebase head while its fmt+clippy+test job was still running, landing a clippy::clone_on_copy on GenerationParams in apply_role_shaping and a StageKind::Witness doc comment that put event.rs 2 lines over its god-file ceiling (the wire schema is regenerated for the reworded comment). #1828 separately grew deck_render.rs 3 lines past its ceiling; Stopped joins Cancelled's match arm — same theme value, and the grouping states what the comment said. Verified: check-file-size green, check-wire-schema green, clippy -D warnings green on stella-pipeline, cargo test -p stella-tui green.
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFixes three broken gates on main: resolves a clippy clone-on-Copy warning in witness_stage, brings event.rs back under the file-size limit by tightening the Witness doc comment and regenerating wire schemas, and reduces deck_render.rs size by consolidating color selection for Stopped and Cancelled without changing behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Closing as a duplicate: #1859 (both witness_stage clippy failures — including the masked field_reassign_with_default mine didn't catch, since cargo stops at the first error) plus #1845 (the two file-size overruns, resolved as parallel-merge skew via baseline regen) jointly cover all three failures, and both predate this PR. One note for the record: this branch resolved the two file-size overruns by trimming instead of raising — condensing the StageKind::Witness comment (−2, wire regenerated) and folding Stopped into Cancelled's match arm (−3, same theme value). If the split-over-raise direction is preferred after #1845, the trims are on branch |
…the fallback, budget stops degrade, arming symptoms recorded (#1890) ## What this is Round 3 of the verification-role work (#1798, #1813 were rounds 1–2): three decision-gated issues from the audit backlog, decided with the reasoning recorded in code, each with a witness test. ## The decisions 1. **A verifier outage is not a refutation** (`Closes #1788`). `heuristic_fallback` now passes on an observed fail→pass flip, not only on green touched tests. The asymmetry it closes: `Unverifiable` abstains when the *evidence* is absent, but a missing *checker* drove a flip-verified candidate (diff over budget → ModelVerdict → provider down) to `VerificationFailed` — the checker's absence treated as the work's failure. With nothing deterministic positive the fallback still fails closed. This deliberately inverts the "even a flip doesn't rescue an unconfirmed suite" pin; the test now states why. 2. **The scaffolding's budget must not discard the work** (`Refs #1789` — the reclassification + de-panic half). A budget stop during witness authoring/repair was `rejected`, aborting a candidate whose worker change was already complete. It degrades now: the budget guard still gates every later paid call (no overspend is possible), and what degrading buys is the deterministically-resolvable endings — a warranted waiver, an abstention — that need no further spend. The stage's two `expect`s on workspaces became degradable aborts, per its own produce-vs-trust contract. The issue stays open for the end-to-end complete-without-further-spend scenario. 3. **A build-failure baseline is recorded, never refused** (`Closes #1790`). Resolved per the on-issue analysis: refusing `SymptomClass::BuildFailure` baselines (the issue's original framing) would reject the most common Rust witness shape — a missing-API test fails to compile on the old code *by design*. Instead the arming failure's class is recorded (`witness_baseline=build_failure` in the verifier's trusted evidence, plus a run warning), so a compile-armed flip is visible to the verdict and to anyone reading the evidence — the honest treatment for a shape that is legitimate for missing-API goals and identical to two-tree environment drift. 4. **The cache-minimum measurement is a stated fact** (`Closes #1786` — the split landed in #1813). The management-prompt module doc records the measured prefix sizes: no fixed instruction block clears Anthropic's 1024-token minimum alone (verdict ~520, witness author ~620); the raw calls cache only with an `agents.<role>.prompt` override padding the prefix, while the witness author's engine turn crosses the minimum within its first tool round-trip — which is exactly where #1813's split pays. ## Witness tests `heuristic_fallback_passes_only_on_confirmed_green_tests` (inverted pin + new no-evidence case), `a_build_failure_baseline_is_recorded_and_an_assertion_one_is_not`. Both fail on main. ## CI note Until #1859 (witness_stage clippy, merged with #1813's premature auto-merge) and #1845 (file-size baseline skew: `deck_render.rs` +3) land, the required job is red on those pre-existing steps — none are in hunks this PR touches. I'll update-branch after they merge. Coordination: my #1795 implementation was dropped from this round in favor of the more complete open #1867; my duplicate unbreak #1874 was closed in favor of #1859/#1845. ## Still tracked #1787 (structured verdict output, per-candidate degradation records), #1789 (the e2e half), #1793 (FlipHalt — gated on a loop-bench measurement), #1794 (semantic witness review — needs its design pass; recommendation on the issue is extending the mutation audit to flip-corroborated ModelVerdict passes). Closes #1788 Closes #1790 Closes #1786 Refs #1789 ## Summary by Sourcery Adjust verification pipeline behavior to treat verifier outages, budget stops, and build-failure witnesses as recorded, degradable conditions rather than hard rejections, and document cache minimum measurements for management prompts. Bug Fixes: - Allow heuristic fallback verdicts to pass when a confirmed fail→pass flip exists even if the verifier is unavailable. - Prevent witness authoring and repair stages from discarding completed work on budget stops or missing workspaces by degrading the run instead of rejecting or panicking. - Record build-failure baselines for witnesses in pipeline state and evidence summaries instead of refusing them, ensuring missing-API compile errors are treated as legitimate but weaker evidence. Enhancements: - Expose the authored witness baseline symptom class in candidate state and evidence output so verifiers can distinguish build failures from assertion failures. - Clarify management prompt documentation with measured token-prefix sizes and their implications for provider cache behavior. Tests: - Extend heuristic fallback tests to cover verifier outage behavior and no-positive-evidence failure cases. - Add a witness-stage unit test to assert that build-failure baselines are recorded while assertion-based baselines are not. Co-authored-by: Stella Test <test@stella.local>
main is red
Three gate failures on
origin/main, from two merges:-D warnings:clippy::clone_on_copyonGenerationParamsinapply_role_shaping(crates/stella-pipeline/src/pipeline/witness_stage.rs) — fix(stella-pipeline,stella-cli): verification follow-ups round 2 — role tuning parity, policy reach, cache-stable witness prompt, scoped goal verifier #1813's auto-merge landed its pre-rebase head while the fmt+clippy+test job was still running; the fix existed on the branch but arrived after the merge.crates/stella-protocol/src/event.rsat 2964 over its 2962 ceiling — same pre-rebase head; theStageKind::Witnessdoc-comment rewrite is condensed to fit, anddocs/wire/is regenerated for the reworded description (wire-schema green).crates/stella-tui/src/deck_render.rsat 1531 over its 1528 ceiling (+3, from fix(stella-cli): record a deliberate stop distinctly from a crash in the session registry #1828).StoppedjoinsCancelled's match arm — same theme value, no behavior change, and the grouping states what the deleted comment said.cargo test -p stella-tuigreen (golden frames unchanged — same rendered color).Verified locally:
check-file-sizegreen,check-wire-schemagreen,cargo clippy -p stella-pipeline --all-targets -- -D warningsgreen,cargo test -p stella-tuigreen.Process note: this is the second time a PR auto-merged with its gate job still pending (#1798 did the same). The window between push and required-check completion is mergeable because the required check reports late; worth a look at whether auto-merge should wait on the run in progress rather than only registered checks.
Summary by Sourcery
Address gate failures on main by fixing a clippy warning, reducing file sizes in protocol and TUI code, and regenerating wire schemas.
Bug Fixes:
StageKind::Witnessdocumentation length to satisfy event.rs file size limits.CancelledandStoppedphase color handling to keep deck_render.rs within file size constraints.Documentation:
StageKind::Witnessdoc comment while preserving its conceptual meaning.