Skip to content

fix: restore diagnostics formatting on main - #2820

Closed
altvnk wants to merge 2 commits into
tangency-labs:mainfrom
altvnk:fix/diagnostics-main-formatting
Closed

altvnk wants to merge 2 commits into
tangency-labs:mainfrom
altvnk:fix/diagnostics-main-formatting

Conversation

@altvnk

@altvnk altvnk commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Superseded / already landed: all five file blobs at this PR head are identical to authoritative main 513e6fcfcd049d41e9487599880479de4add63f2, through merged #2838 (3f82278a14c1a6104db8e090a59b4bcf677ace01). Closing this duplicate instead of rebasing an empty formatting change or retriggering CI. No source/history is discarded; the branch and verified evidence remain preserved. This PR is not counted as a separate completed delivery.

Addresses the diagnostics formatting blocker reported on tangency-labs/solidcraft#13762: main d93a19bd4 fails cargo fmt --all --check in five diagnostics source files (job 127353812989). This PR repairs that formatting failure only, not the inherited sweep/rig failures or the gate policy.

Units: diagnostics tooling / main formatting gate; no kernel unit change.
In scope: pinned Rust 1.98.0 rustfmt output for the five existing diagnostics source files.
Expected edits: crates/diagnostics/src/body.rs, main.rs, png.rs, render.rs, report.rs only.
Evidence: exact-base red formatting check, successful post-change workspace formatting, identical before/after pinned formatter normal forms for every file, two existing diagnostics tests and focused strict Clippy; details below.
Related PRs / dependencies: tangency-labs/solidcraft#13762 coordination; #2816 owns the goldens/gate transition (#2802 closed in its favor). #2792, #2803, #2806, #2811 own diagnostic case accounting. #2804 and #2824 own their stated rig repairs. All are outside this scope.
Available follow-ups: behavioral diagnostics changes, rendering/PNG correctness, other rig failures, dependency changes and gate decisions remain independent work.
Status / blockers / next step: local validation and independent complete-diff review pass. Published exact reviewed head 212383a75d19cd69f06e71a7ecf92c17f1193f93 from fresh main d93a19bd4e0ca3b141cc028ca73f9cc80be38efe. Ready for review, but exact-head canonical run 42067640884, attempt 1, is action_required, zero jobs. Maintainer authorization is needed; CI must actually succeed before this can be considered merge-ready or countable. No inherited failure is waived, no baseline substituted, and no gate changed.

Change

Apply exactly the repository's Rust 1.98.0 formatter output: line reflow, canonical trailing commas, closure-body blocks, and serde_json import ordering. It is rustfmt-only, not literally whitespace-only. No numerical expressions, algorithm/iteration order, strings, CLI behavior, outputs, dependencies, fixtures, expected results or CI configuration are changed.

No new tests or geometry images are needed for source layout: the regression reproducer is the actual failing formatting check. This does not assert binary identity or a before/after rendered-output measurement.

Validation

Explicit RUSTUP_TOOLCHAIN=1.98.0 and cargo +1.98.0 were used because the shell inherited a newer toolchain override. Builds used nice -n 10, two Cargo jobs, debug information/incremental off and a lane-private target; the missing sccache wrapper was unset.

Check Result
Before: cargo +1.98.0 fmt --all --check at claim/base source Exit 1, exactly these five files
After: cargo +1.98.0 fmt --all --check Exit 0, whole workspace
Original and final contents normalized independently by pinned rustfmt --emit stdout All five byte-identical normal forms; final files are formatter fixpoints
git diff --check and file-set check Pass; only five claimed paths, no untracked source files
cargo +1.98.0 test -p diagnostics 2 passed, 0 failed (png::tests::header, png::tests::iend_crc)
cargo +1.98.0 clippy -p diagnostics --all-targets -- -D warnings Pass
Independent complete-diff review GO; exact diff SHA-256 2aebaa148e674b615167bb268804dbe92b4dc06fbcf1ade7e9e49c80f5e7a83a, all five source hashes matched; no semantic change found
Canonical workspace Clippy/tests, wasm and other workflow gates Pending exact published head

Formatter-normal-form identity is static evidence, not an AST-equivalence or runtime-output theorem. The two existing tests cover the PNG header/end chunk, not full rendering behavior. Full-system validation belongs to canonical CI; no local C++ build/difftest is claimed for this non-kernel formatting change.

Ownership was checked before the draft claim and before implementation. Gate-transition and case-accounting owners are not duplicated. Coordination: tangency-labs/solidcraft#13762 (comment).

— OpenCode (GPT-6.1 Sol), with DeepSeek V4.1 Flash Free implementation/review, on behalf of @altvnk

Summary by CodeRabbit

  • Style
    • Reformatted diagnostic rendering, image output, input parsing, and reporting code. No user-visible behavior or defaults changed.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request reformats existing Rust expressions and statements across five diagnostics modules. The supplied summaries report no behavior or public declaration changes.

Changes: Diagnostics formatting

Layer / File(s) Summary
Reformat diagnostics code
crates/diagnostics/src/body.rs, crates/diagnostics/src/main.rs, crates/diagnostics/src/png.rs, crates/diagnostics/src/render.rs, crates/diagnostics/src/report.rs
Reformats existing expressions and statements. Defaults, calculations, conditions, and outputs remain unchanged.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Refactor

Suggested reviewers: jyviko

Merge Risk: Minimal · up to 21238

The change restores diagnostics formatting without an identified behavior change. Complete the pending workspace CI checks before merging.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix: restore diagnostics formatting on main" matches the main change. The PR applies rustfmt output to five diagnostics source files (body.rs, main.rs, png.rs, render.rs, report.rs) so that…
Docstring Coverage Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix: restore diagnostics formatting on main" matches the main change. The PR applies rustfmt output to five diagnostics source files (body.rs, main.rs, png.rs, render.rs, report.rs) so that cargo fmt --all --check passes again on the base. The change does not alter behavior, which the title does not claim. The title is specific and concise.

Full details: Docstring Coverage

Explanation

Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 16 functions across 5 files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d93a19b and 212383a.

Files selected for processing: 5

  • crates/diagnostics/src/body.rs
  • crates/diagnostics/src/main.rs
  • crates/diagnostics/src/png.rs
  • crates/diagnostics/src/render.rs
  • crates/diagnostics/src/report.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Restore the five-file formatting gate failure on main for #2794.
Apply only Rust 1.98.0 rustfmt output; preserve behavior and gate policy.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@altvnk
altvnk marked this pull request as ready for review November 5, 2026 16:45
@altvnk

altvnk commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

CI authorization handoff — exact reviewed head

#2820 is now ready for review at 212383a75d19cd69f06e71a7ecf92c17f1193f93, from authoritative main d93a19bd4. It was published by one ordinary fast-forward push, with no rebase/force-push, and the five reviewed source hashes match the published commit.

Local pinned Rust 1.98.0 evidence:

  • Workspace fmt: failed before on exactly five diagnostics files, passes after.
  • All five before/after sources normalize to identical pinned rustfmt output; the final files are formatter fixpoints.
  • Existing diagnostics tests: 2 passed / 0 failed.
  • clippy -p diagnostics --all-targets -- -D warnings: passes.
  • Independent complete-diff review: GO, formatting-only; no semantic change found. Complete diff SHA-256: 2aebaa148e674b615167bb268804dbe92b4dc06fbcf1ade7e9e49c80f5e7a83a.

The actual exact-head canonical workflow 42067640884, attempt 1, currently reports action_required, zero jobs. Maintainer workflow authorization is needed before this has CI results. No workflow approval, retry, dispatch or merge was performed by this agent. This is not CI green, merge-ready or a delivered PR yet.

This repairs only main's formatting blocker; it makes no numerical, output, dependency or gate changes and does not hide the inherited sweep/rig/exact-base problems. Their integration is coordinated on tangency-labs/solidcraft#13762: tangency-labs/solidcraft#13762 (comment). #2816 owns the gate transition and #2824 the five count-domain rig cases.

— OpenCode (GPT-6.1 Sol), on behalf of @altvnk

@bherbruck bherbruck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Format only: the removed and added code match token for token apart from trailing commas and rustfmt's closure braces. fmt, clippy and test pass; the difftest and kernel-rig reds are main's.

@tdamsma

tdamsma commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@altvnk: #2838 merged the diagnostics formatting as 0956246 (main 3f82278). I compared all five files in this PR at 212383a: their Git blob IDs are identical to current main. Fresh workspace cargo fmt --all --check now passes on our five refreshed branches. This formatting scope appears fully landed through #2838; leaving closure to you.

@jyviko

jyviko commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks @altvnk! This is approved, but its CI ran on an older main, and its kernel rig shows failures beyond the three knife-edge chamfers main also fails. Could you rebase on main so CI runs again? If the extra failures are gone after the rebase, it's ready to merge.

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.

4 participants