Skip to content

fix(pi): treat review as a command, never a session level - #1120

Open
CodeAlex52 wants to merge 1 commit into
DietrichGebert:mainfrom
CodeAlex52:fix/pi-stale-review-entry
Open

CodeAlex52 wants to merge 1 commit into
DietrichGebert:mainfrom
CodeAlex52:fix/pi-stale-review-entry

Conversation

@CodeAlex52

Copy link
Copy Markdown

What

resolveSessionMode still accepted review as a session level, so a ponytail-mode entry saved by an older pi version latched: every later turn injected the one-line pointer instead of the ruleset — the state #736 removed from the hooks, #1103 from OpenCode ("a review saved by an older version falls back to the default instead of latching") and #1105 from Hermes.

Fix

pi now only honors runtime levels (off/lite/full/ultra):

  • resolveSessionMode skips a review entry, keeps looking, then falls back to the default;
  • setMode refuses non-runtime values;
  • both fallback normalizations use normalizeMode too, so a review fallback cannot latch either.

/ponytail-review is unaffected — it already runs as a one-shot skill alias, never as a mode.

Tests

npm test passes (root suite and pi-extension).

A ponytail-mode entry saved by an older pi version still latched: review resolved as a session level, so every later turn injected the one-line pointer instead of the ruleset (the state DietrichGebert#736 removed from the hooks, DietrichGebert#1103 from OpenCode and DietrichGebert#1105 from Hermes). resolveSessionMode now skips a review entry and falls back, setMode refuses non-runtime values, and the fallback normalizations only accept runtime levels too.
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