Skip to content

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

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

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

GenVM ticket: GVM-365 (Kira). This manager PR pins the v0.3 executor test commit, mirrored in genvm-executor #48. The repository provision workflow hit an executor PAT HTTP 403, so the exact mirror branch and PR were created through host Git/SSH and GitHub CLI. The manager PR remains the authoritative merge unit.

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. The emission must fail locally against the exact allocation budget.

Merged manager #54 / executor f7f95a31 filters zero-budget concrete-recipient nodes before both internal and external matching. When GenVM receives a zero-remaining exact node, its internal path can use the wildcard and emit a message for which consensus selects the exact node and rejects at reveal. This is verified in the executor tests; the composed Node path is tracked separately. The existing external zero-budget fallback remains intentional. Before #54, executor 16b81732 had no zero-budget filter and already tested that an exhausted exact key stays selected.

This is an expected-red, test-only handoff. It does not change production matching.

Reproduction and validation

The executor commit updates three existing tests in executor/src/wasi/genlayer_sdk/tests.rs to assert the current consensus rule:

  • internal_zero_remaining_exact_shadows_funded_wildcard: red; actual wildcard index 0, expected exact index 1.
  • internal_zero_remaining_exact_phase_blocks_wildcard: red; actual wildcard match bypasses the exact key's phase mismatch.
  • internal_zero_remaining_exact_fails_before_using_wildcard: red; call/deploy emits successfully where an internal allocation-budget error is expected.

At manager 619dfad / executor f7f95a31, cargo test --manifest-path executor/Cargo.toml --lib produced 152 passed, 3 failed, all three failures above. Both external zero-budget controls passed. cargo fmt --all -- --check and the stack-relative diff check passed. The exact executor binary built locally. The manager binary did not build on this macOS host because lua53.pc is unavailable; the repository Nix shells request Linux glibc.

Acceptance for implementation

  • Internal key presence takes precedence over a broader wildcard even with zero remaining budget; no spill on budget or phase failure.
  • Call and deploy reject at emission with no emission or wildcard charge.
  • External zero-budget and unallocated fallback semantics stay intact.
  • Update the 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.

No full E2E is requested for this expected-red draft.

@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)

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 43b1468 to db03fc9 Compare October 1, 2026 13:40
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