Skip to content

Clear unavailable sessions after restore - #2037

Open
Pybsama wants to merge 1 commit into
aws:mainfrom
Pybsama:codex/clear-empty-restored-session
Open

Clear unavailable sessions after restore#2037
Pybsama wants to merge 1 commit into
aws:mainfrom
Pybsama:codex/clear-empty-restored-session

Conversation

@Pybsama

@Pybsama Pybsama commented Aug 1, 2026

Copy link
Copy Markdown

Description

  • Persist a successful empty restoration through the existing graph-session update boundary so a stale previous session is replaced by the current empty graph and the restore action disappears.
  • Keep failed restorations retryable and leave non-empty restorations on the existing add-and-persist path.
  • Add a hook regression test and a DbState session fixture that reproduce a persisted session whose entities no longer exist in the graph database.

Validation

  • pnpm test useRestoreGraphSession
  • pnpm checks
  • pnpm test — 219 test files and 2,668 tests passed

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

An empty successful restore returned before updating graph session state, leaving the restore action visible.
@Pybsama
Pybsama force-pushed the codex/clear-empty-restored-session branch from 16d9dd8 to 1331382 Compare August 28, 2026 21:36
@Pybsama
Pybsama marked this pull request as ready for review August 28, 2026 21:39
@Pybsama

Pybsama commented Aug 28, 2026

Copy link
Copy Markdown
Author

This is now ready for review.

The branch has been rebased onto the current main (0f17c393) as a single GitHub-verified commit. The three affected files had no upstream changes, and the published tree exactly matches the locally verified tree.

Fresh verification with Node 24.18.1 and pnpm 11.9.0:

  • pnpm test useRestoreGraphSession — 1/1 passed
  • pnpm checks — lint, formatting, and all workspace type checks passed
  • pnpm test — 219/219 test files and 2,668/2,668 tests passed
  • git diff --check passed

The new Unit Tests and Docker workflow runs are both action_required with zero jobs, so they are waiting for maintainer approval before execution; this is not a test failure.

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.

Restoring previous graph leaves restore button present

1 participant