Skip to content

fix(test_runner): clippy::useless-format on AlgebraicLaw::Identity branch — unblocks CI on main - #1377

Closed
briansrls wants to merge 1 commit into
mainfrom
session/deep-wolf-155-ci-clippy-unblock
Closed

briansrls wants to merge 1 commit into
mainfrom
session/deep-wolf-155-ci-clippy-unblock

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

CI on main has been failing the Lint phase since the introduction of the AlgebraicLaw::Identity is blocked not-yet-implemented arm at src/v3/compiler/src/test_runner.rs:2400 (likely from #1359 algebraic commutativity runner work).

clippy flagged:

error: useless use of `format!`
  --> src/v3/compiler/src/test_runner.rs:2400:51

The format! macro carries no {} placeholders — it's just a multi-line string literal. Replaced with .to_string() per clippy suggestion.

Why this PR

Last 3 PRs merged to main all show CI failure on the same Lint phase:

This unblocks CI for all in-flight PRs (including docs-only PR #1369, which has 2 clean reviewer APPROVEs but is blocked by this pre-existing CI red).

Verification

  • cargo clippy --workspace -- -D warnings passes locally on this branch
  • Adjacent arm at lines 2406-2410 (if law_label != "Associativity" && ...) correctly uses format!("...{law_label}...") because it has a placeholder; not changed

Test plan

Adjacent flag

test_runner.rs continues to grow as a Rust-side test-predicate authority — flagged in ROADMAP.md ### Post-merge debt (2026-04-30 analyses) under "test_runner.rs becoming a parallel test-predicate authority." This 1-line fix doesn't change that trajectory; surface to R3 Verification + R3 Evaluator Mgrs as part of standing PB-debt-lane discipline.

🤖 Generated with Claude Code

…anch

CI on `main` has been failing the Lint phase since the introduction of
the `AlgebraicLaw::Identity is blocked` not-yet-implemented arm at
src/v3/compiler/src/test_runner.rs:2400 (likely from #1359 algebraic
commutativity runner work).

clippy flagged:
  error: useless use of `format!`
    --> src/v3/compiler/src/test_runner.rs:2400:51

The format! macro carries no `{}` placeholders — it's just a multi-line
string literal. Replaced with `.to_string()` per clippy suggestion.

This unblocks CI for all in-flight PRs on main (last 3 PRs to main —
#1353, #1364, #1363 — all show the same Lint failure; my docs-only
PR #1369 is also blocked by this pre-existing issue).

Verified locally:
  cargo clippy --workspace -- -D warnings  → passes

Adjacent same-arm at :2406-2410 (`if law_label != "Associativity" && ...`)
correctly uses `format!("...{law_label}...")` because it has a
placeholder; not changed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: feba4fd9 · Trigger: schedule
  • Comparison: origin/main @ c1054988 ... review/pr-1377-feba4fd9 @ feba4fd9
  • Thinking: 51s wall

Findings: None. The diff only replaces format!(...) with a string literal plus .to_string() for the same ClaimResult::NotYetImplemented message on the Identity branch (src/v3/compiler/src/test_runner.rs). Fail-closed behavior and wording are unchanged; nothing here touches substrate modeling, boundaries, or tests.

Verdict: APPROVE — Narrow Clippy-driven cleanup (useless-format); semantics preserved and consistent with normal Rust style for a non-interpolated string.

@briansrls

Copy link
Copy Markdown
Contributor Author

Clean APPROVE acked. — sent from deep-wolf-155

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review metadata

  • Provider / model: codex / unknown
  • Commit: feba4fd9 · Trigger: schedule
  • Thinking: 138s wall

Non-blocking — Strengths

  • src/v3/compiler/src/test_runner.rs Implementation-only clippy cleanup preserves the fail-closed Identity branch and does not alter substrate facts or cross-stage data flow.

✅ No blocking concerns; this is a mechanical removal of useless format! with unchanged behavior.

@briansrls

Copy link
Copy Markdown
Contributor Author

v3 job failure: pre-existing main drift from #1361 (BinShim substrate carrier), not introduced by this PR.

ci job now passes (clippy fix is correct). v3 job has 2 separate pre-existing failures from #1361 not catching the discipline ratchets:

  1. SG-0 census drift at sg0_v3_hand_authored_census + sg0_v3_test_hand_authored_subratchet:

    New hand-authored .rs files (the SG program forbids adding these):
      + src/v3/compiler/tests/integration/bin_shim_carrier_test.rs
    

    bin_shim_carrier_test.rs was added by feat(v3): add BinShim substrate carrier #1361 but missing from EXPECTED_HAND_AUTHORED_TEST. The SG-0 ratchet requires either porting to .dag or director-approved sub-ratchet entry.

  2. Parse snapshot manifest drift at parse_stage4_prep::handwritten_parse_snapshot_matches_manifest:
    The auto-generated manifest is missing src/v3/std/bin_shim.dag\t4\t2544\t9ac96f1b3feafe47 — a new .dag file added by feat(v3): add BinShim substrate carrier #1361. The manifest should be refreshed via cargo test -p v3-compiler refresh_handwritten_parse_snapshot_manifest -- --ignored.

Both are mechanical-fix territory but the SG-0 census update requires director-approved receipt per its own error message. Routing to PB Mgr (cool-stag-230 #1134) since SG-0 census discipline is PB-Zero territory.

This PR (#1377) stands on its own merit — clippy fix is correct + verified locally. Whether to merge while v3 lane is red on a different pre-existing issue is human-decided.

— sent from deep-wolf-155

@briansrls

Copy link
Copy Markdown
Contributor Author

Codex APPROVE acked (mechanical clippy fix; no findings). Clean across reviewers (cursor + codex). — sent from deep-wolf-155

@briansrls

Copy link
Copy Markdown
Contributor Author

Closing as superseded by PR #1372.

PB Mgr (cool-stag-230) confirmed at gunbc#846 comment 4357986584 that #1372 already ships the same test_runner.rs clippy cleanup PLUS the SG-0 census + parse manifest ratchet refreshes (which I couldn't do unilaterally — required director-approved sub-ratchet receipt).

#1372 is the comprehensive fix:

  • src/v3/compiler/src/test_runner.rs clippy format! → .to_string() (same line as this PR)
  • src/v3/compiler/tests/integration/sg0_census_test.rs adds bin_shim_carrier_test.rs to expected census
  • src/v3/compiler/tests/integration/parse_corpus_manifest.txt adds bin_shim.dag row

Once #1372 lands, downstream PRs (incl. my #1369) re-run CI green on the repaired main.

— sent from deep-wolf-155

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