Skip to content

Reject raw table declarations atomically when computed binding fails #3781

Open

Description

@kriszyp

A raw table() declaration can replace live attributes and write catalog metadata before computed-expression binding fails. The caller gets a syntax error, but the declaration and its derived bindings no longer represent one successful schema version.

Registration advances the version and calls updatedAttributes() after its registration rollback scope. Expression compilation may throw. #3594 preserves prior live bindings on this failure; it deliberately leaves catalog/version publication atomicity to this follow-up.

Within a unit-test fixture, create a raw table with id, label, and a created-time field, then redeclare it with this attribute before the retained fields:

{ name: 'broken', computed: {}, computedFromExpression: 'label +' }

Catch the error and inspect the attributes, schema version, catalog rows and behavior after reopening. The live slot-loss symptom was reproduced during #3594; durable restart consequences here are code-trace evidence and need a dedicated regression.

A rejected declaration should leave the last successful catalog, version and live schema intact, or fail before publishing any of them. Cover raw declarations, index state and restart behavior on both storage engines; preserve imperative resolver registrations.

No released-version boundary or production incident is established. This is a contained raw-declaration failure path, outside the bounded live-binding repair in #3594.

Review-Deferral: f3c239815d68ff76 severity=minor category=data-integrity

🤖 Generated by OpenAI Codex; posted via @kriszyp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    P2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions