Skip to content

Conversation

gefjon
Copy link
Contributor

@gefjon gefjon commented Oct 9, 2025

Description of Changes

This commit extends various schema and schema-adjacent structures to describe procedures, a new kind of database function which are allowed to perform side effects.

This includes extending RawModuleDefV9 with a way to register RawProcedureDefV9s in the misc_exports, preserving compatibility with modules that predate procedures.

The module validation path is reorganized somewhat to validate various properties related to procedures while preserving code clarity and maintainability.

Additionally, the ArgsTuple machinery for ser/de-ing reducer arguments using the argument type as a seed is extended to also support procedure arguments.

All of this is currently unused.

API and ABI breaking changes

Additive and backwards-compatible additions to RawModuleDefV9 and friends.

Expected complexity level and risk

2 - some minor complexity in schema validation which may have gotten borked in a merge at some point.

Testing

Unsure what tests would be useful, open to suggestions from reviewers.

This commit extends various schema and schema-adjacent structures to describe procedures,
a new kind of database function which are allowed to perform side effects.

This includes extending `RawModuleDefV9` with a way to register `RawProcedureDefV9`s
in the `misc_exports`, preserving compatibility with modules that predate procedures.

The module validation path is reorganized somewhat
to validate various properties related to procedures
while preserving code clarity and maintainability.

Additionally, the `ArgsTuple` machinery for ser/de-ing reducer arguments
using the argument type as a seed is extended to also support procedure arguments.

All of this is currently unused.
@gefjon gefjon requested a review from Centril October 9, 2025 15:53
Prior to this commit, we never actually checked that reducers had unique names.
My new `check_function_names_are_unique` assumed this invariant,
but we were silently ignoring duplicate reducer names.

With this commit, `check_function_names_are_unique` actually validates uniqueness
not only between the two sets, but within them.

This commit also adds three tests for the three possible ways to have a duplicate name:
two reducers, two procedures, or one of each.
@gefjon gefjon enabled auto-merge October 15, 2025 17:53
@gefjon gefjon added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@gefjon gefjon added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@gefjon gefjon added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants