Skip to content

feat(transaction): experimental action-based transaction format skeleton#7641

Closed
wjones127 wants to merge 2 commits into
lance-format:mainfrom
wjones127:will/unstable-action-transactions-skeleton
Closed

feat(transaction): experimental action-based transaction format skeleton#7641
wjones127 wants to merge 2 commits into
lance-format:mainfrom
wjones127:will/unstable-action-transactions-skeleton

Conversation

@wjones127

@wjones127 wjones127 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Skeleton establishing the shape and safety gating of action-based
(UserOperation) transactions — the first slice of the Action-based
Transactions milestone (discussion #5960).

Stacked on #7646

This PR is stacked on #7646 (the general experimental-feature mechanism).
Its first commit belongs to #7646; review that PR first. Action-based
transactions are the first consumer of that mechanism rather than claiming a
dedicated feature-flag bit:

  • A dataset using action-based transactions declares the "action-transactions"
    experimental feature, registered in known_experimental_features() only under
    the unstable-action-transactions Cargo feature.
  • That sets FLAG_EXPERIMENTAL, so libraries that don't understand it fail
    closed. On graduation (PMC vote), the name moves onto its own dedicated bit.

Double gating

  1. Cargo feature — everything is behind the non-default
    unstable-action-transactions feature, so it is not compiled into released
    builds at all.
  2. Experimental feature flag — via FLAG_EXPERIMENTAL + the
    "action-transactions" name, as above.

What's here (the skeleton commit)

  • protos/transaction_experimental.protoUserOperation / UserAction /
    Action (with AddFragments only, as a proof of shape), in a separate proto
    file so canonical transaction.proto stays clean until promotion. Compiled
    only under the feature.
  • lance_table::transaction — Rust UserOperation / UserAction / Action /
    AddFragments types with protobuf conversions, a roundtrip test, and the
    FEATURE_NAME constant.
  • Registration of "action-transactions" in the experimental-feature registry,
    with admission tests for both default-build (rejected) and feature-on
    (recognized).

What's NOT here (follow-up vertical slices)

  • Translation from Operation, apply, and conflict resolution.
  • Wiring into the commit path / public API (nothing yet populates the
    experimental feature list).
  • The remaining actions beyond AddFragments.

Part of #5960. Precedes the proto PMC vote (#6455), which will promote the
finalized messages into transaction.proto.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Important

This PR touches the Lance format specification.

Substantive changes to the format specification — the .proto definitions
and the spec docs under docs/src/format/ — require a PMC vote before merge.
Minor edits such as typo fixes, wording, or formatting are excluded; use your
judgment.

If this is a meaningful format change:

  • Start a vote following the Lance community voting process.
    Format specification modifications need 3 binding +1 votes (excluding the
    proposer), held on GitHub Discussions, with a minimum voting period of 1 week.
  • Once the vote passes, link the completed vote in this PR. It should not be
    merged until the vote is linked.

@github-actions github-actions Bot added A-format On-disk format: protos and format spec docs enhancement New feature or request labels Jul 6, 2026
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.35028% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-table/src/transaction.rs 91.02% 3 Missing and 4 partials ⚠️
rust/lance-table/src/feature_flags.rs 96.29% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Proposes and implements a general mechanism for shipping experimental format
features without burning a permanent feature-flag bit per experiment. Policy
(design doc) and the proto/format change are together so they can be reviewed
and voted on as one.

Mechanism:
- Reserve one persisted bit, FLAG_EXPERIMENTAL (1 << 6, reusing the old first
  FLAG_UNKNOWN bit), meaning "this dataset uses experimental feature(s)". It is
  the fail-closed anchor: pre-mechanism libraries reject the dataset on the bit
  alone.
- Carry feature identities in free-form manifest string lists
  (experimental_reader_features / experimental_writer_features). New libraries
  admit a dataset iff they understand every declared name.
- A compile-time registry (known_experimental_features) lists the experiments a
  build understands, gated by each experiment's Cargo feature; a default build
  understands none and so rejects any experimental dataset.

This keeps experiments free-flowing (unbounded string namespace, mint/abandon
at will) while the bitmap stays conservative (a bit is spent only at
graduation). Design, graduation/lifecycle, alternatives, and prior art (Delta
Lake table features) in rust/lance-table/design/experimental_feature_flags.md.

can_read_dataset / can_write_dataset now take the declared experimental feature
list alongside the flags (two internal callers updated).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Skeleton for the Action-based Transactions milestone (discussion lance-format#5960),
gated behind the non-default `unstable-action-transactions` Cargo feature so
it is absent from released artifacts.

Stacked on the general experimental-feature mechanism (lance-format#7646): rather than
claiming a dedicated feature-flag bit, action-based transactions are the first
consumer of FLAG_EXPERIMENTAL. A dataset declares the "action-transactions"
experimental feature (registered in `known_experimental_features` under the
Cargo feature), which sets the bit so libraries without it fail closed.

- protos/transaction_experimental.proto: UserOperation / UserAction / Action
  (AddFragments only), compiled only under the feature.
- lance_table::transaction: UserOperation/UserAction/Action/AddFragments Rust
  types with protobuf conversions and a roundtrip test; FEATURE_NAME constant.
- Register "action-transactions" in the experimental-feature registry, with
  admission tests for both default (rejected) and feature-on (recognized).

The wire format carries no compatibility guarantee until finalized by PMC vote,
at which point it graduates to its own feature-flag bit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wjones127 wjones127 force-pushed the will/unstable-action-transactions-skeleton branch from ffd8196 to f464a85 Compare July 7, 2026 16:11
@wjones127

Copy link
Copy Markdown
Contributor Author

Superseded by #7671, now properly stacked on #7670 (base branch on lance-format instead of the fork).

@wjones127 wjones127 closed this Jul 7, 2026
@wjones127 wjones127 deleted the will/unstable-action-transactions-skeleton branch July 7, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-format On-disk format: protos and format spec docs enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant