Skip to content

fix(seed): deferred reference update failures are swallowed as success #2805

Description

@yinlianghui

Baseline and relation to #2678/#2680

Minimal reproduction

Load circular real-SQL seed data (department ↔ worker) with multi-pass resolution enabled. Inject one fetch failed in the pass-2 deferred reference update.

Repeated twice on fresh databases.

Expected / actual

  • Expected: retry a transient update; if it still fails, report an error and return an unsuccessful load with the deferred reference unresolved.
  • Actual: the update is attempted once, the catch only logs a warning, allErrors remains empty, and the loader returns success:true while the source lookup remains null.

Impact

Seed-once/boot logic can accept incomplete relational data as a successful seed, with no actionable error in the returned result.

Evidence and exclusions

  • Source: packages/metadata-protocol/src/seed-loader.ts, resolveDeferredUpdates catch.
  • The no-fault circular case resolves both references and passed.
  • This is separate from self-referencing sequential retry: it is pass-2 error propagation/accounting for cross-object deferred references.

Required regression tests

  • Transient deferred update retries.
  • Exhausted update failure is appended to returned errors, leaves deferred accounting accurate, and makes success false.
  • No-fault circular resolution remains successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions