Skip to content

fix(session): synchronize authoritative state projections - #456

Open
beruro wants to merge 2 commits into
developfrom
fix/issue-454-session-state-sync
Open

fix(session): synchronize authoritative state projections#456
beruro wants to merge 2 commits into
developfrom
fix/issue-454-session-state-sync

Conversation

@beruro

@beruro beruro commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Problem

Session state projections can diverge from authoritative runtime and persistence state across todo synchronization, pending-plan rehydration, permission recovery, and replay conversion. Empty or late authoritative snapshots can leave stale frontend state or incomplete replay data.

Solution

  • Synchronize same-ID todo updates, including authoritative empty snapshots.
  • Persist and rehydrate pending-plan edits through the Rust approval manager.
  • Replace one-shot permission events with recoverable session-scoped state.
  • Normalize replay shell/delete data and process reconciliation against current EventStore APIs.
  • Validation: 73 focused Vitest tests, TypeScript typecheck, scoped ESLint, diff check, and GitHub frontend/Rust CI.

Potential risks

  • This is a cross-layer session-state sweep, so regressions could appear at Rust/TypeScript ownership boundaries or during late-event reconciliation.
  • The PR intentionally keeps todo, plan, permission, and replay projections together because they enforce the same authoritative-state invariant; reviewers should verify each projection independently.

Verification

Published branch was rebased by GitHub onto current develop at 7be527a7a, producing head 8c21ac9c8. The rebase completed without conflicts, and changed-file/addition/deletion counts are unchanged from the pre-rebase PR. CI is rerunning on this integrated head.

Previous GitHub CI on head 1c6eb55f1:

  • pnpm install --frozen-lockfilePASS in Frontend (typecheck · lint · test).
  • pnpm typecheckPASS in Frontend (typecheck · lint · test).
  • pnpm lintPASS in Frontend (typecheck · lint · test).
  • pnpm run testPASS in Frontend (typecheck · lint · test).
  • node scripts/tauri/prepare-sidecars.cjs --profile debugPASS in Rust (clippy).
  • (cd src-tauri && cargo clippy --workspace --all-targets -- -D warnings)PASS in Rust (clippy).
  • AI-attribution history scan — PASS.

@beruro
beruro force-pushed the fix/issue-454-session-state-sync branch 4 times, most recently from 7a36f81 to 8cb6d0e Compare July 30, 2026 15:08
@beruro
beruro force-pushed the fix/issue-454-session-state-sync branch from 1c6eb55 to 1f2489b Compare August 10, 2026 04:05
@beruro
beruro force-pushed the fix/issue-454-session-state-sync branch from 1f2489b to 8c21ac9 Compare August 10, 2026 05:47
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