Skip to content

fix: kernel mode#99

Open
kopy-kat wants to merge 1 commit into
mainfrom
fix/kernel-types
Open

fix: kernel mode#99
kopy-kat wants to merge 1 commit into
mainfrom
fix/kernel-types

Conversation

@kopy-kat
Copy link
Copy Markdown
Member

@kopy-kat kopy-kat commented Nov 3, 2024

No description provided.

@kopy-kat
Copy link
Copy Markdown
Member Author

🤖 Automated review by Greg

PR Review

Summary: One-line fix for the Kernel account mode byte in formatPermissionEnableSig — changes the packed prefix from 0x01 to 0x00 for the kernel case.

Risk: Medium — this changes the encoding of the permission enable signature for all Kernel accounts. If any live sessions were created with the old 0x01 prefix, they will stop working after this change. The fix appears correct based on the Kernel validator mode spec.

Issues:

  • src/module/smart-sessions/usage.ts:406 — No test added for the kernel case in formatPermissionEnableSig. Given this is a correctness fix (not a refactor), a test asserting the exact packed bytes for the kernel mode would prevent this regressing silently.

Missing:

  • Test for the kernel branch of formatPermissionEnableSig verifying that the packed encoding starts with 0x00.
  • Changelog / migration note if existing Kernel sessions with the old prefix need to be re-created.

Verdict: Needs changes ⚠️

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