Skip to content

test(fees): [ISSUE REPRO] exact-zero internal key falls through - #55

Closed
MuncleUscles wants to merge 1 commit into
v0.6-devfrom
handoff/zero-exact-allocation-261001
Closed

MuncleUscles wants to merge 1 commit into
v0.6-devfrom
handoff/zero-exact-allocation-261001

Conversation

@MuncleUscles

@MuncleUscles MuncleUscles commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Delivery context

Depends-On: genlayerlabs/genlayer-consensus#1709

GVM-365 is assigned to Kira. This manager PR pins signed executor test commit dd98d661c7ba6afe2ea758b95be2761fce2e706d, mirrored in genvm-executor #48. The manager PR is the authoritative handoff; the executor mirror is not for independent landing.

Rebased after merged manager #56 / executor #49. The manager base is 6f7e8dead0c2af5ed30330baac973a83cde7ec08, and the executor base is 7e0936a125f917a8071b66add10dd555c2a07c8f. This keeps #56's zero-declared-budget fix in the composed checkout.

Problem and outcome

Consensus #1709 resolves internal message allocation keys by presence. An exact key whose remaining budget is zero still shadows a funded call-key wildcard. GenVM must select that exact key and fail an unaffordable emission locally.

Merged manager #54 filtered zero-budget concrete-recipient nodes before matching. As a result, the internal path can use a wildcard and emit a message for which consensus selects the exact node and rejects at reveal. The external zero-budget fallback is intentional and remains unchanged. This is separate from the merged #56 rule that an emitted child must declare a positive budget, including useBalance.

This is an expected-red, test-only handoff. It changes no production matching code.

Reproduction and validation

The executor mirror changes three existing tests in executor/src/wasi/genlayer_sdk/tests.rs:

  • internal_zero_remaining_exact_shadows_funded_wildcard: red; the wildcard is selected instead of the exact key.
  • internal_zero_remaining_exact_phase_blocks_wildcard: red; the wildcard bypasses the exact key's phase mismatch.
  • internal_zero_remaining_exact_fails_before_using_wildcard: red; call/deploy emits successfully instead of failing against the exact allocation budget.

On executor dd98d661 atop merged #49, the three reproduction tests fail for those expected reasons. Five external controls and six positive internal controls pass. cargo fmt --check and stack-relative git diff --check pass. The manager diff only updates executors/v0.3.x from 7e0936a to dd98d66. No full E2E was run for this draft.

Acceptance for implementation

  • Internal exact-key presence takes precedence over a broader wildcard even with zero remaining budget; no spill on budget or phase failure.
  • Internal call and deploy reject at emission, with no emission or wildcard charge.
  • External zero-budget and unallocated fallback semantics stay intact.
  • Update GenVM spec/API text left stale by fix(fees): treat zero-budget chain allocations as absent 🐛 #54, and coordinate with the Node conformance/helper handoff before repinning the release stack.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

GenVM PR actions

Tick a box to run it (the box unticks itself when handled). Actions only run while the PR has the ci-safe label.

  • Force run full tests
  • Provision executor PRs
Commands
  • /genvm-run-tests — run full tests once for the current manager snapshot
  • /merge — queue the exact manager snapshot through the App-owned E2E merge train

@MuncleUscles MuncleUscles changed the title [ISSUE REPRO] Internal exact-zero allocation wrongly falls through to wildcard test(fees): [ISSUE REPRO] exact-zero internal key falls through Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Linked executor PR(s)

executor: genlayerlabs/genvm-executor#48 (v0.3)

@MuncleUscles
MuncleUscles force-pushed the handoff/zero-exact-allocation-261001 branch from 43b1468 to db03fc9 Compare October 1, 2026 13:40
@github-actions github-actions Bot added the not rebased branch is behind its base; rebase before it can be merged label Oct 2, 2026
Advance the v0.3 executor gitlink to the focused expected-red allocation tests. The executor succeeds using a wildcard where the consensus candidate selects a zero-remaining exact key and rejects the emission. This manager layer is a draft handoff for the matcher correction.
@MuncleUscles
MuncleUscles force-pushed the handoff/zero-exact-allocation-261001 branch from db03fc9 to aedeec3 Compare October 2, 2026 10:44
@github-actions github-actions Bot removed the not rebased branch is behind its base; rebase before it can be merged label Oct 2, 2026
@kp2pml30

kp2pml30 commented Oct 2, 2026

Copy link
Copy Markdown
Member

Semantics of this place was flipped a bunch of times already:

c6c6f3ce on 2026-09-09 Treated as absent: internal_allocation_match_priority returns None when budget.is_zero(), so the wildcard funds the message
624aecf9 on 2026-09-24 Shadows the wildcard: the zero filter is deleted, and a recipient-specific key now skips the on phase check
f7f95a31 on 2026-10-01 Treated as absent again, but only for nodes with a concrete recipient; synthetic wildcards still match at any budget
this PR: request to shadow the wildcard

is this semantics final?

@kp2pml30

kp2pml30 commented Oct 2, 2026

Copy link
Copy Markdown
Member

robo-kp2pml30: carried over to #57 — the tests from genvm-executor#48 plus the fix (an exact zero-budget internal key now shadows wildcards and fails on its budget) land in manager commit 072d9ea (PR head e4252e5), executor commits genlayerlabs/genvm-executor@3cd91d26 and genlayerlabs/genvm-executor@49aa5746. Closing in favor of #57

@kp2pml30 kp2pml30 closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants