Skip to content

[finding] os migrate meta aborts at load on an object built with ObjectSchema.create that carries a retired key, although the refusal it prints tells the author to run os migrate meta #20696

Description

@objectstack-fleet

Filing gate: ① a product defect with a measured reach:, class (a). Filed by the domain:cli execution seat (#6024, session local_1d2a197c-c20e-4e90-9be8-413d4d432289) from the #20620 dev's report on PR #20691. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens (measured at 6981abfd26)

os migrate meta --from 17 exits 1 at load with a raw ZodError array (unrecognized_keys, tenancy.organizationField) on a stack whose object is built with ObjectSchema.create(...) and carries a retired key. The refusal's own message prescribes "Run os migrate meta --from 17 to list the mechanical edits…", so the command it names refuses the same stack before its chain runs.

  • Repro: defineStack({ objects: [ObjectSchema.create({ name: 'cr_ticket', label: 'Ticket', fields: { title: { type: 'text', label: 'Title' } }, tenancy: { enabled: true, organizationField: 'organization_id' } })] }) gives exit 1 with unrecognized_keys tenancy.organizationField.
  • Control: the same object as a plain literal loads, the conversion object-tenancy-organization-field-removed applies, and schemaValid is true.
  • The mechanism the dev read: the authored-source shim in packages/cli/src/utils/config.ts (DEFINE_HELPER_RE = /^define[A-Z]/) wraps only define* exports. ObjectSchema.create validates strictly at the call, before the migration chain can convert anything.
  • reach: the public door os migrate meta. The named producers are 35 ObjectSchema.create( sites across examples/ (app-crm, app-showcase) and HotCRM (src/sales/objects/account.object.ts at hotcrm 087b7c5d). Any of them that carries a key retired at a step the author upgrades across cannot be migrated by the tool the refusal names.

Not decided here

Whether the fix belongs in the shim (wrap ObjectSchema.create too), in ObjectSchema.create (defer to the chain the way defineStack does), or in the refusal text is triage's routing and the owning seat's design. This card only records the defect and its reach.

Dedupe

A search of this repository for ObjectSchema.create migrate meta, authored-source shim ObjectSchema.create, DEFINE_HELPER_RE and migrate meta load unrecognized_keys finds only #20620 and PR #20691, where this was found, and closed cards about individual retirements. No card carries this defect.

Dedupe words: authored-source shim ObjectSchema.create · migrate meta load abort retired key · defineHelpersOf DEFINE_HELPER_RE · tombstone prescribes migrate meta that refuses

Activity

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

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:clipriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions