Skip to content

fix(doctor): make dm.policy migration idempotent#70

Merged
dgarson merged 1 commit intodgarson/forkfrom
fix/dm-policy-migration-idempotency
Feb 23, 2026
Merged

fix(doctor): make dm.policy migration idempotent#70
dgarson merged 1 commit intodgarson/forkfrom
fix/dm-policy-migration-idempotency

Conversation

@dgarson
Copy link
Owner

@dgarson dgarson commented Feb 22, 2026

Summary

  • Fix normalizeLegacyConfigValues dm alias migration to only act when legacy keys are explicitly present on the dm object
  • Add an idempotency guard comment to document why the explicit key-presence check is required
  • Add regression coverage to ensure running the migration twice yields no further changes

Root cause

The migration logic checked legacy values by value/undefined, not explicit key presence. This allowed non-explicit fallback/computed states to be treated as pending legacy migrations and re-reported repeatedly.

Validation

  • pnpm vitest -c vitest.e2e.config.ts src/commands/doctor-legacy-config.e2e.test.ts

Notes

  • While touching this area, I did not find another confirmed always-retriggering migration in doctor config normalization.

@dgarson dgarson changed the base branch from dgarson/fork to codex/design-extensible-issue-tracking-system February 22, 2026 15:49
@dgarson dgarson changed the base branch from codex/design-extensible-issue-tracking-system to codex/design-extensible-issue-tracking-system-zpx6pa February 22, 2026 15:49
dgarson added a commit that referenced this pull request Feb 22, 2026
- ModelRouter: 7 routing rules, condition pills, strategy presets, route test panel (Quinn)
- SessionReplay: session timeline player, playback controls, event kind filters (Wes)
@dgarson dgarson changed the base branch from codex/design-extensible-issue-tracking-system-zpx6pa to dgarson/fork February 22, 2026 19:13
@dgarson dgarson force-pushed the fix/dm-policy-migration-idempotency branch from 02cf1d4 to fcb0952 Compare February 23, 2026 00:24
@dgarson dgarson merged commit 07d458a into dgarson/fork Feb 23, 2026
2 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant