Skip to content

fix(commands): reconcile targets when enabling downshift - #25

Merged
boadij merged 2 commits into
mainfrom
fix/reconcile-on-enable
Jul 11, 2026
Merged

fix(commands): reconcile targets when enabling downshift#25
boadij merged 2 commits into
mainfrom
fix/reconcile-on-enable

Conversation

@boadij

@boadij boadij commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • capture the active model and thinking level as a complete premium target
  • reconcile /downshift on to the latest premium/economy policy before reporting success
  • make target activation idempotent while suppressing internally generated selection events
  • keep failed reconciliation paused with a useful error and no false success notification
  • document the reconciliation boundary and side-effect-free configuration edits

Behavior

  • below threshold, enabling establishes the resolved premium target
  • above threshold without handoff, enabling switches directly to the configured economy target
  • above threshold with handoff, enabling establishes premium before requesting the existing handoff and uses the latest economy target when it completes
  • premiumSource: "current" captures both the active model and active thinking level at enable time
  • session-level /downshift on continues to override a globally disabled configuration

Tests

  • npm run check
    • TypeScript typecheck passes
    • 47 tests pass
  • git diff --check

boadij added 2 commits July 11, 2026 12:02
Capture the complete active model target, make managed target switches
idempotent, and establish the configured premium or economy policy before
reporting a session as enabled.

Keep failed reconciliation paused without a contradictory success message,
while preserving handoff ordering and session-level enable overrides. Extend
the lifecycle adapter tests for updated targets, current-model capture,
idempotence, failures, and internal event suppression, and document the new
/downshift on behavior.
Activate the configured economy target directly when enabling above the
threshold without a handoff, instead of allowing maybeDownshift to return
early from a retained economy position.

Cover the full lifecycle from an automatic economy transition through session
disablement, configuration change, and re-enablement.
@boadij
boadij merged commit 6d07ebb into main Jul 11, 2026
1 check 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