Repository navigation
fix(context-pivot): reset pending state on session start - #747
outlier27-cell wants to merge 8 commits into
Conversation
|
@tt-a1i 请审核此 PR。最新提交的 GitHub CI 已全部通过;会话切换待处理状态的回归已验证,现仅等待维护者审核。 |
tt-a1i
left a comment
There was a problem hiding this comment.
Reviewed head: 4b0a50a293f759bcfa9257ded629f07e77f05784 against main a18f457687b45c877bc8a15d689a7580c4f0659a.
Standards: no confirmed code-level blocker in the scoped change.
Spec: the inspected change matches the stated behavior in this PR. Integrate the two context-pivot Session-start changes together and retain both state/visibility regressions.
Validation: node --test --experimental-strip-types tests/extensions/context-pivot/index.test.ts: exit=0; ℹ tests 6; ℹ pass 6; ℹ fail 0; ℹ skipped 0
The unchanged-head focused receipts are reused after a live head/main refresh; #718 uses this round's latest-head tests. This code review does not claim installed-runtime, live-provider, full merged-queue or visual acceptance. No merge is authorized by this review.
…747-ready # Conflicts: # extensions/context-pivot/index.ts
Problem
Closes #746. A pivot pending in an old Session could retain an in-progress flag after Pi started a replacement Session. Old progress status and failure callbacks could also appear in the replacement Session.
Value
A replacement Session can immediately start an eligible pivot, while stale callbacks cannot change its state, continuation, UI status, notifications, or headless error output.
Approach
Preserve contributor history and merge current main
f98d6a4737461ba8d8ee100f113b5a7c3a0001a0, retaining main's context-based Session-start tool visibility. Invalidate the existing generation and clear pending/compacting state and status at native Session start. Reject old onError callbacks before any effect, matching the existing completion guard. Keep Pi's native compaction lifecycle, threshold, brief, and summary semantics.Validation
Final head: 65b0e14. Local macOS, Node v26.8.1 / Bun 1.3.14:
bun install --frozen-lockfile: passed.bun run check: passed.bun run test: passed; Node 2,452 passed / 9 skipped, UI 1,338 passed in 88 files./context-pivotrejects at zero tokens before and after native/new; clean exit. No model call made. The component was explicitly loaded from this checkout, with unrelated package extensions excluded.git diff --check: passed.Live provider compaction and whole-package native UI acceptance were not performed. Pending callback isolation is established by deterministic regression/probe evidence; native smoke establishes real Session context/command compatibility. Fresh final-head CI remains separate. The first check caught a test-only TypeScript narrowing issue; the equivalent empty-array length assertion was applied before the final focused/check/test rerun.
Two independent final source reviews passed on this exact head. Final-head CI run 38696999683 passed all runtime, UI, Web E2E, and Windows background-terminal checks. Independent last-push approval still gates merge.
Impact