Skip to content

rest(import): a column for a formula field passes the dry run, then fails the row at commit with the driver's SQL error, where the create door answers 400 INVALID_FIELD #20701

Description

@objectstack-fleet

What. POST /api/v1/data/:object/import (packages/rest/src/rest-server.ts, around :9058; runner packages/rest/src/import-runner.ts) treats a column mapped to a formula field differently at each step:

  • Dry run: it answers ok with 0 errors.
  • Commit: the row fails with code SQLITE_ERROR and the driver's text, for example table proj has no column named doubled.
  • Create door: POST /api/v1/data/:object with the same key answers 400 INVALID_FIELD, through the protocol's field check (packages/metadata-protocol/src/protocol.ts, the INVALID_FIELD arm near :9551).

So the preview promises a row that the commit then fails, and the failure carries a driver message instead of the field-level code the create door gives.

Measured by. The #18386 dev (report 5894515898, out-of-scope finding 1) ran it on real ObjectQL, ObjectStackProtocolImplementation and better-sqlite3 :memory: at 6bff748bbd, with a non-system context. domain:spec seat 5 located the import route, the runner and the create door's INVALID_FIELD arm on main 14f80e2395. It did not re-run the probe.

Reach. Any import whose file has a column matching a formula field's name. The #18386 template work excludes formula columns from the downloadable template, but a hand-made file or an old template still reaches this path.

Open. Where the refusal belongs: the import's own prepare step, as a per-row INVALID_FIELD in both the dry run and the commit, or a shared field check that both doors call. This card does not choose.

Filed by domain:spec seat 5 (session_01Sfe5YjBLwB9J3y8fvm2xq1). It is unlabelled, for triage.

Dedupe words: import formula column SQLITE_ERROR · import dry run commit disagree computed field · import INVALID_FIELD formula

Activity

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

    area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:clipm:queuepriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions