Skip to content

fix: reject empty kernel packages before linking#3082

Merged
huitseeker merged 1 commit into0xMiden:nextfrom
KitaroMoha563:fix/reject-empty-kernel-packages
May 6, 2026
Merged

fix: reject empty kernel packages before linking#3082
huitseeker merged 1 commit into0xMiden:nextfrom
KitaroMoha563:fix/reject-empty-kernel-packages

Conversation

@KitaroMoha563
Copy link
Copy Markdown
Contributor

Describe your changes

Reject kernel packages whose manifest does not export any $kernel procedures before converting them into a runtime Kernel.

This turns malformed package metadata into a structured package error before it reaches the linker's non-empty-kernel assertion. Assemblers without a kernel still use the existing empty-kernel default.

Tests cover both direct package conversion and Assembler::link_package() returning an error instead of unwinding.

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Commits are signed.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.
  • Updated CHANGELOG.md

@github-actions
Copy link
Copy Markdown

Automated check (CONTRIBUTING.md)

Findings:

Recommendations:

  • Consider adding a Test plan or clear review steps.

Next steps:

  • Link a relevant issue (e.g., "Fixes Implement SHA256 in Miden Assembly #123") and ensure it is assigned to you.
  • See CONTRIBUTING.md for expectations.
  • If this is a false positive, comment: /quality-review.

@KitaroMoha563 KitaroMoha563 force-pushed the fix/reject-empty-kernel-packages branch 2 times, most recently from 4f3d731 to a6a5ee8 Compare April 30, 2026 01:16
Copy link
Copy Markdown
Collaborator

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @KitaroMoha563 ! This LGTM.

Note for @bitwalker : @bobbinth had a comment suggesting kernel procedure digests might be derived from ModuleInfo rather than the package manifest. This PR goes a bit further in the current implementation’s direction instead.

@huitseeker huitseeker requested a review from bitwalker May 4, 2026 13:11
@huitseeker huitseeker force-pushed the fix/reject-empty-kernel-packages branch from a6a5ee8 to d567b96 Compare May 6, 2026 00:25
@huitseeker huitseeker merged commit d4c1129 into 0xMiden:next May 6, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants