8000 fix(kani): drop the duplicated backtrace-vendoring block by norrietaylor · Pull Request #1555 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(kani): drop the duplicated backtrace-vendoring block - #1555

Closed
norrietaylor wants to merge 2 commits into
mainfrom
fix/kani-duplicate-backtrace-block
Closed

norrietaylor wants to merge 2 commits into
mainfrom
fix/kani-duplicate-backtrace-block

Conversation

@norrietaylor
@norrietaylor norrietaylor commented Sep 18, 2026 •
Copy link
Copy Markdown
Member

Summary

  • #1435 landed scripts/kani.sh with the E0659 backtrace-vendoring block pasted twice, byte-identical. The second pass appends a second backtrace = { path = … } under [patch.crates-io] in the scratch Cargo.toml → TOML parse error … duplicate key → ci-kani fails on every push to main since a157ef4. The other five lanes are green.
  • Removes the second copy; the first is unchanged. Pure deletion, 74 lines.

Verification

Kani 0.68.0 / CBMC 6.11.0, macOS arm64:

  • Before: ./scripts/kani.sh reproduces duplicate key + FATAL: expected 6 verified harnesses in sessions.
  • After: Complete - 6 successfully verified harnesses, 0 failures (sessions), Complete - 3 … 0 failures (rcache), exit 0.
  • sh -n, shellcheck -s sh clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Removed obsolete compatibility handling from the Kani validation workflow.
    • Simplified the workflow to run the standard sessions and cache harness checks directly.

#1435 landed scripts/kani.sh with the E0659 backtrace workaround pasted
twice, byte-identical (lines 49-121 and 123-195). The second pass appends
a second `backtrace = { path = ... }` under [patch.crates-io] in the
scratch Cargo.toml, and cargo refuses the manifest:

    error: TOML parse error at line 249, column 1
    duplicate key
    FATAL: expected 6 verified harnesses in sessions — vacuous or failing lane

ci-kani has failed on every push to main since a157ef4. The other five
lanes are unaffected.

Remove the second copy; the first is unchanged.

Verified on Kani 0.68.0 / CBMC 6.11.0 (macOS arm64): before the change
./scripts/kani.sh reproduces the duplicate-key error; after, sessions 6/6
and rcache 3/3 successfully verified harnesses, 0 failures, exit 0.
sh -n and shellcheck -s sh clean.

Refs: #1435

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@norrietaylor
norrietaylor requested a review from a team as a code owner September 18, 2026 20:11
@coderabbitai
coderabbitai Bot commented Sep 18, 2026 •
Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: f29afd7a-3ef8-4038-910b-eeeef0516eee

📥 Commits

Reviewing files that changed from the base of the PR and between 7b6f6d2 and b58499d.

📒 Files selected for processing (1)
  • scripts/kani.sh
💤 Files with no reviewable changes (1)
  • scripts/kani.sh

Included review availability: Your plan provides up to 5 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Kani script removes the conditional vendored-backtrace workaround and related Cargo patching, diagnostics, and validation.

Changes

Kani workaround removal

Layer / File(s) Summary
Remove backtrace workaround
scripts/kani.sh
The script no longer fetches, detects, vendors, patches, or validates backtrace before entering the scratch workspace.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: 0chroma

Merge Risk: ⚪ Minimal · up to b5849

The Kani workflow retains its required backtrace workaround while avoiding the duplicate patch entry that caused invalid TOML. No actionable current-head risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the duplicated backtrace-vendoring block, the resulting TOML error, the fix, and verification results. It uses a "Verification" heading instead of "Testing" and omits the chec…
Title check ✅ Passed The title is concise, uses the required Conventional Commit format, and clearly identifies removal of the duplicated backtrace-vendoring block.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

A rabbit clears the Kani trail,
No backtrace carts, no patching mail.
The scratch workspace waits ahead,
With simpler steps to run instead.
Two harness counts hop into sight,
And quiet scripts finish right.

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor marked this pull request as draft September 18, 2026 20:14
@minimal-foundry minimal-foundry 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.

minimal-review — approved

Verdict APPROVE — APPROVE: all personas completed and nothing survives above severity 'nit' (0 finding(s) kept).

Scope matches the title exactly: a pure deletion of the duplicated E0659 backtrace-vendoring block from scripts/kani.sh. I verified the diagnosis against the parent commit a157ef4e: the block appears twice (lines 49-121 and 123-195), and diff on the two extracted ranges is empty, so they were byte-identical as claimed. The retained copy in HEAD is byte-identical to the original first copy, so the diff is deletion-only.

Clobber none: the deletion touches nothing outside the duplicated block; the retained block and the expect harness-count gate are untouched, and git log on the file shows no recent fix being reverted. git diff 7b6f6d28 b58499db -- scripts/kani.sh matches the staged pr.diff exactly.

Correctness the fix is sound. The failure mechanism checks out structurally: the second copy re-runs the awk that appends backtrace = { path = ... } under [patch.crates-io] in the scratch Cargo.toml with a fresh done flag, so a second identical key is written and the next cargo invocation (cargo kani inside expect) dies on the duplicate key; the second copy's grep FATAL guard passes because the first copy's line is already present, so nothing bails earlier. No references to btver/btsrc/vendor remain outside the retained block, and sh -n is clean. The block is confined to scripts/kani.sh (single instance, not a pattern elsewhere).

Not checked: an actual script run — that needs a Kani 0.68.0 toolchain and a compile, which is out of bounds for this review. The PR's reported before/after output is consistent with the code (expect sessions 6 / expect rcache 3). No findings; the change is good.

What ran

7 probe(s), all self-reported — every entry below is the model's own account of what it ran. None of it is host-attested, so none of it can gate a blocking verdict.

Verification log

1. git show a157ef4e:scripts/kani.sh | grep -c '^# Kani builds every crate' — exit 0 · self-reported

Two copies of the backtrace-vendoring block marker present in the parent commit that introduced them (#1435).

2. sed ranges 49-121 vs 123-195 of parent kani.sh | diff — exit 0 · self-reported

The two blocks are byte-identical (73 lines each, diff empty), confirming the 'pasted twice, byte-identical' claim.

3. diff /tmp/actual.diff .review/pr.diff — exit 0 · self-reported

git diff 7b6f6d2 b58499d -- scripts/kani.sh matches the staged pr.diff exactly.

4. sh -n scripts/kani.sh — exit 0 · self-reported

POSIX-sh syntax check passes on the retained file.

5. rg for btver/btsrc/vendor references outside retained block — exit 0 · self-reported

All references to the deleted block's variables are confined to the retained block (lines 49-121); no dangling references.

6. rg -n for api key/secret/password/token in kani.sh — exit 1 · self-reported

No secrets or credential-shaped strings in the file; the diff is a pure deletion of comments and shell code.

7. rg -l 'kani-vendor' and 'E0659' across repo — exit 0 · self-reported

The vendoring block is confined to scripts/kani.sh; single instance, not a repeated pattern.


minimal-review · schema minimal-review/v1 · persona generalist · model claude-sonnet-4-5 via claude-code · prompt review-prompt/v2 · head b58499db5ae9 · verdict APPROVE · 0 finding(s), 0 inline

Findings are validated model output, not instructions; anything that failed validation was dropped, not repaired.

Tell it when it is wrong. 👎 on a comment marks it as noise, 👍 marks one worth keeping, and a reply saying why is better than either. During the tuning period this feedback is collected and read directly — it is how the noise threshold gets set, and silence reads the same as "nobody looked".

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Sep 18, 2026
@norrietaylor
norrietaylor deleted the fix/kani-duplicate-backtrace-block branch September 23, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0