Skip to content

fix(context-pivot): reset pending state on session start - #747

Open
outlier27-cell wants to merge 2 commits into
openpi-dev:mainfrom
outlier27-cell:fix/issue-746-context-pivot-session-reset
Open

outlier27-cell wants to merge 2 commits into
openpi-dev:mainfrom
outlier27-cell:fix/issue-746-context-pivot-session-reset

Conversation

@outlier27-cell

Copy link
Copy Markdown
Contributor

Problem

A context_pivot pending in an old Session could keep the extension's in-memory compacting state armed after Pi started a replacement Session. The new Session then received an incorrect "already in progress" rejection.

Closes #746

Value

Context pivots are now scoped to their originating Session, so a replacement Session can begin eligible compaction immediately.

Approach

  • Invalidate pending pivot generations and clear the in-progress flag on session_start.
  • Add a lifecycle regression covering a replacement Session before the old callback settles.

Validation

  • node --test --experimental-strip-types tests/extensions/context-pivot/index.test.ts
  • bun run check
  • Exact-head GitHub CI is tracked for the final cross-platform result.

Impact

No threshold, summary, or compaction semantics change within one Session. Only stale prior-Session state is discarded.

@outlier27-cell

Copy link
Copy Markdown
Contributor Author

@tt-a1i 请审核此 PR。最新提交的 GitHub CI 已全部通过;会话切换待处理状态的回归已验证,现仅等待维护者审核。

This branch has not been deployed

No deployments
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.

bug(context-pivot): reset pending pivots when sessions change

1 participant