Skip to content

fix: use panic unwind on tests with quick profile#6621

Merged
LesnyRumcajs merged 1 commit intomainfrom
use-panic-unwind-in-tests
Feb 17, 2026
Merged

fix: use panic unwind on tests with quick profile#6621
LesnyRumcajs merged 1 commit intomainfrom
use-panic-unwind-in-tests

Conversation

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Feb 17, 2026

Summary of changes

  • using the quick profile which inherits panic=abort results in extremely cryptic errors when, e.g., trying to override packages in fil-actor-states. See https://github.com/ChainSafe/fil-actor-states/actions/runs/21994597700/job/63550945119?pr=413
  • the above results in weird duplicates in the dependency tree that cause further errors
  • panic=abort is also undesirable in tests for various reasons (should_panic test would be incorrectly handled I guess, also worse error messages).

Changes introduced in this pull request:

  • introduced a quick-test profile that doesn't abort on paics.

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Chores
    • Added a new "quick-test" build profile tuned for faster test runs.
    • Updated test task configurations and defaults to include and prefer "quick-test" as an option.
    • Adjusted the unit test workflow to invoke tests using the updated/default profile settings.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner February 17, 2026 10:23
@LesnyRumcajs LesnyRumcajs requested review from akaladarshi and sudo-shashank and removed request for a team February 17, 2026 10:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Adds a new Cargo profile "quick-test", updates mise task defaults/choices to expose it, and adjusts the CI workflow to invoke mise without the previous explicit "quick" argument so the new default profile is used.

Changes

Cohort / File(s) Summary
CI Workflow
/.github/workflows/unit-tests.yml
Removed explicit "quick" argument from the mise invocation, causing mise to run with its updated default profile (now quick-test).
Cargo Build Profile
Cargo.toml
Added [profile.quick-test] inheriting from [profile.quick] and set panic = "unwind".
Mise Task Configuration
mise.toml
Updated test-related task usage signatures and help text to add the quick-test profile, make it the default, and include it in choices for test:docs, test:nextest, test:cargo, and test.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • akaladarshi
  • sudo-shashank
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: introducing a new quick-test profile that uses panic unwind for tests instead of panic abort.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch use-panic-unwind-in-tests

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
mise.toml (1)

155-156: Consider defaulting test tasks to quick-test.

Default remains quick, so mise test still uses panic=abort unless the caller passes quick-test. If the goal is to avoid aborting panics by default, switching the default to quick-test (or explicitly documenting this in dev docs) would align local runs with CI.

Suggested diff (apply similarly to other test tasks)
-arg "<profile>" help="Build profile (quick-test, dev, etc.)" default="quick" {
+arg "<profile>" help="Build profile (quick-test, dev, etc.)" default="quick-test" {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@mise.toml` around lines 155 - 156, Change the default build profile for the
test arg so local `mise test` uses the non-aborting test profile: update the arg
declaration for "<profile>" (the argument block currently with help="Build
profile (quick-test, dev, etc.)" and choices "quick" "quick-test" "release"
"dev") to set default="quick-test" instead of default="quick" (apply same change
to other test task arg blocks if present).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@mise.toml`:
- Around line 178-180: The arg declaration for profile (arg "<profile>"
default="quick") duplicates an earlier default-profile suggestion — update this
arg's default to the same recommended default used elsewhere (replace
default="quick" with the agreed-upon value) and ensure the choices list on arg
"<profile>" remains correct; locate the arg "<profile>" block and change only
the default to match the prior recommendation so both declarations are
consistent.
- Around line 166-168: The arg "<profile>" block currently sets default="quick"
but the review notes the default profile should match the project's standard
(duplicate suggestion applies here); update the arg "<profile>" declaration (the
arg "<profile>" with choices "quick" "quick-test" "release" "dev") to use the
consistent default used elsewhere (e.g., change default from "quick" to
"quick-test" or whatever the canonical default is) so the default aligns with
other profile arg definitions.
- Around line 190-192: The arg block for "<profile>" currently sets
default="quick" but the reviewer notes the same default-profile suggestion
should be applied here; update the arg "<profile>" declaration (the block
defining arg "<profile>" help="Build profile (quick-test, dev, etc.)"
default="quick") to use the agreed default (e.g., default="quick-test") and
ensure the choices list ("quick" "quick-test" "release" "dev") still includes
that default; also verify any other "<profile>" arg occurrences are consistent
with this default to avoid duplicate/conflicting defaults.

---

Nitpick comments:
In `@mise.toml`:
- Around line 155-156: Change the default build profile for the test arg so
local `mise test` uses the non-aborting test profile: update the arg declaration
for "<profile>" (the argument block currently with help="Build profile
(quick-test, dev, etc.)" and choices "quick" "quick-test" "release" "dev") to
set default="quick-test" instead of default="quick" (apply same change to other
test task arg blocks if present).

@LesnyRumcajs LesnyRumcajs force-pushed the use-panic-unwind-in-tests branch from 5fe3f0b to de2be4d Compare February 17, 2026 10:28
@LesnyRumcajs LesnyRumcajs force-pushed the use-panic-unwind-in-tests branch from de2be4d to 292b427 Compare February 17, 2026 10:29
@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit d4d7634 Feb 17, 2026
36 of 39 checks passed
@LesnyRumcajs LesnyRumcajs deleted the use-panic-unwind-in-tests branch February 17, 2026 16:43
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.

2 participants