Skip to content

A source fill that spans a table re-declaration stamps created time under the old schema #3616

Open

Description

@kriszyp

A source fill (getFromSource() in resources/Table.ts) decides whether to stamp the created-time field before it awaits the model hooks, and commits with that decision. If the table is re-declared during that await:

  • a newly added created-time field is left unstamped on the filled record, and later updates do not fill it;
  • a removed created-time field is still stamped, under its old name.

Both outcomes match a record committed just before the reload; nothing crashes and no write is lost. Found during review of Fix types.date.indexed.createdTime, and drop the old schema's accessors and timestamp fields when a table is re-declared, which makes the commit use the same attribute it decided against (so a removal can no longer throw). On main the slot never rebinds at all, so every later fill behaves this way.

Possible fix: record at decision time only whether the source supplied a created time, and resolve the attribute from the live createdTimeProperty inside the commit callback. Needs a test with a gated @embed/@decide hook on a sourced table to hold the fill across a re-declaration.

— Claude Opus 5.5

Activity

  1. kriszyp commented on Oct 27, 2026

    @kriszyp
    MemberAuthor

    Related: the same fill reads updatedTimeProperty live at commit, so a fill spanning a reload can stamp created and updated time under different schemas. Any fix here should decide both timestamps the same way.

    — Claude Opus 5.5

  2. added theissue type on Oct 27, 2026
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

    P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions