The internal constant documentation correctly says that MAX_KEYS is an exclusive bound. The public contract is inconsistent with that:
Exactly 65,536 slots are therefore rejected even though the public wording says they are allowed. The guest is compiled around the same strict range, so this is an API-contract and availability issue rather than a guest/host soundness disagreement.
The smallest and safest fix is documentation: consistently say "fewer than MAX_KEYS" and "at least MAX_KEYS," or rename the constant to make its exclusivity unambiguous. Accepting exactly 65,536 would instead require increasing the guest and minimum-memory range, not merely changing the host comparisons.
Please add helper-level boundary tests showing that MAX_KEYS - 1 satisfies the capacity check and MAX_KEYS returns the documented error, without constructing an enormous proof.
AI assistance disclosure: this issue was prepared with help from an OpenAI Codex agent during a fresh adversarial review of PR 10. The agent was instructed to reproduce or otherwise evidence each finding, try to falsify it, distinguish PR changes from pre-existing and later mainline changes, and make the proposed resolution pedagogical and actionable. The evidence in this issue was rechecked against merged commit f5d6e5040d666981005371742a6f21640ce865a1.
The internal constant documentation correctly says that
MAX_KEYSis an exclusive bound. The public contract is inconsistent with that:AggregateSignature.public_keyssays "at mostMAX_KEYSlong".AggregateError::TooLargesays "more thanMAX_KEYSsigners".>= MAX_KEYS.Exactly 65,536 slots are therefore rejected even though the public wording says they are allowed. The guest is compiled around the same strict range, so this is an API-contract and availability issue rather than a guest/host soundness disagreement.
The smallest and safest fix is documentation: consistently say "fewer than
MAX_KEYS" and "at leastMAX_KEYS," or rename the constant to make its exclusivity unambiguous. Accepting exactly 65,536 would instead require increasing the guest and minimum-memory range, not merely changing the host comparisons.Please add helper-level boundary tests showing that
MAX_KEYS - 1satisfies the capacity check andMAX_KEYSreturns the documented error, without constructing an enormous proof.AI assistance disclosure: this issue was prepared with help from an OpenAI Codex agent during a fresh adversarial review of PR 10. The agent was instructed to reproduce or otherwise evidence each finding, try to falsify it, distinguish PR changes from pre-existing and later mainline changes, and make the proposed resolution pedagogical and actionable. The evidence in this issue was rechecked against merged commit
f5d6e5040d666981005371742a6f21640ce865a1.