Skip to content

Allow array values in executable emit calls#1872

Merged
Th0rgal merged 1 commit into
mainfrom
codex/event-arg-array-surface
May 14, 2026
Merged

Allow array values in executable emit calls#1872
Th0rgal merged 1 commit into
mainfrom
codex/event-arg-array-surface

Conversation

@Th0rgal
Copy link
Copy Markdown
Member

@Th0rgal Th0rgal commented May 14, 2026

Summary

  • add Contracts.EventArg so executable emit calls can accept scalar words and array values in one argument list
  • coerce array event arguments to dynamic-array length placeholders for the executable event trace
  • add macro smoke coverage for scalar plus array event emits and memory-array event emits

Verification

  • git diff --check
  • lake build Compiler.CompilationModelFeatureTest
  • lake build PrintAxioms
  • python3 scripts/generate_print_axioms.py --check
  • python3 scripts/check_axioms.py

Note

Medium Risk
Changes the Contracts.emit API and its coercions, which could subtly affect executable event traces for existing contracts, especially around dynamic array arguments. The change is conceptually small but touches a commonly used surface in contract stubs/tests.

Overview
Extends executable event emission to accept a mixed argument list of scalar words and dynamic arrays by introducing Contracts.EventArg and updating emit to map arrays to a dynamic-array length placeholder in the event trace.

Adds macro smoke coverage for emitting events with array parameters, including emitting an allocated memory array, and updates event-metadata assertions to cover the new array-typed events.

Reviewed by Cursor Bugbot for commit 5dfe314. Bugbot is set up for automated code reviews on this repo. Configure here.

@Th0rgal Th0rgal merged commit 1d6abc8 into main May 14, 2026
6 checks passed
@Th0rgal Th0rgal deleted the codex/event-arg-array-surface branch May 14, 2026 19:51
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