Skip to content

Migration may key workflow setting values by rootDir before project identity exists #1434

Description

@gsxdsm

Found by ce-code-review run 20260605-011952-1c8655ba on branch gsxdsm/cleanupsettings (workflow settings mechanism, plan docs/plans/2026-06-04-002-feat-workflow-settings-mechanism-plan.md).

Severity: P2 · Reviewers: adversarial, data-migration · Confidence: 50 (needs verification)
Location: packages/core/src/store.ts:11848 (migrateMovedSettingsToWorkflowValuesOnce) / getWorkflowSettingsProjectId

getWorkflowSettingsProjectId falls back to rootDir when no project identity row exists. If the hard-move migration runs before identity assignment, value rows are keyed by rootDir; later reads key by identity.id and silently return declaration defaults despite migrated values existing under the rootDir key.

Suggested fix: establish/backfill project identity before the migration runs, or migrate rootDir-keyed rows to identity.id when identity is first assigned. Add a test: migrate under rootDir → assign identity → read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions