Skip to content

feat: responses might be executed before canister_on_low_wasm_memory#271

Open
mraszyk wants to merge 2 commits into
mainfrom
mraszyk/on-low-wasm-memory-hook-scheduling
Open

feat: responses might be executed before canister_on_low_wasm_memory#271
mraszyk wants to merge 2 commits into
mainfrom
mraszyk/on-low-wasm-memory-hook-scheduling

Conversation

@mraszyk
Copy link
Copy Markdown

@mraszyk mraszyk commented May 22, 2026

This PR specifies that responses might still be executed after the condition for canister_on_low_wasm_memory is triggered and before the function canister_on_low_wasm_memory is actually executed.

@mraszyk mraszyk requested review from a team as code owners May 22, 2026 07:46
@github-actions github-actions Bot added the interface-spec Changes to the IC interface specification label May 22, 2026
@mraszyk mraszyk requested a review from Copilot May 22, 2026 07:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

🤖 Here's your preview: https://soxyi-6iaaa-aaaam-ai2ra-cai.icp0.io

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR clarifies the IC interface specification around the On Low Wasm Memory hook by documenting and formalizing that response callbacks may still execute after the low-memory condition is met but before canister_on_low_wasm_memory actually runs (e.g., when the hook is scheduled but cannot yet be executed).

Changes:

  • Add an explicit note to the canister interface docs stating that responses may execute between condition trigger and hook execution.
  • Update the abstract behavior “Message execution” rule to allow executing response callbacks even when on_low_wasm_memory_hook_status is Ready.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/references/ic-interface-spec/canister-interface.md Adds documentation clarifying execution ordering around canister_on_low_wasm_memory vs responses.
docs/references/ic-interface-spec/abstract-behavior.md Adjusts the formal “Message execution” conditions to permit response callback execution while the low-memory hook is pending.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/references/ic-interface-spec/abstract-behavior.md
Comment thread docs/references/ic-interface-spec/canister-interface.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

@alin-at-dfinity alin-at-dfinity left a comment

Choose a reason for hiding this comment

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

LGTM, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interface-spec Changes to the IC interface specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants