Skip to content

Restore persisted timeline state when loading history - #6

Merged
trissim merged 1 commit into
mainfrom
codex/restore-loaded-history-state
Jul 30, 2026
Merged

Restore persisted timeline state when loading history#6
trissim merged 1 commit into
mainfrom
codex/restore-loaded-history-state

Conversation

@trissim

@trissim trissim commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • materialize the persisted current snapshot into registered ObjectStates when loading a history document
  • preserve whether the restored timeline was at its live head
  • publish the strengthened persistence contract as ObjectState 1.1.0

Verification

  • 161 tests passed
  • configured fatal Ruff checks passed
  • added-line Ruff gate passed
  • real installed OpenHCS update/restart acceptance restored an unsaved typed UIConfig value through a fresh MCP process

Copilot AI review requested due to automatic review settings July 30, 2026 23:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@augmentcode

augmentcode Bot commented Jul 30, 2026

Copy link
Copy Markdown

PR Risk Analyzer Agent🛡️

👀 Human Input Needed
A pair-review briefing is ready for you.

→ Pair Review Briefing

@trissim
trissim merged commit 97b92e6 into main Jul 30, 2026
11 checks passed
@trissim
trissim deleted the codex/restore-loaded-history-state branch July 30, 2026 23:16

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Code Review Agent🐛

Review completed with 1 suggestions.

Fix in Cosmos

"Loaded ObjectState history could not restore its current snapshot."
)
if restored_at_head:
cls._current_head = None

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When histories saved at live head are loaded, time_travel_to_snapshot() fires history-change callbacks while _current_head is still set to the head snapshot; this line then resets it without firing another callback. UI subscribers that refresh from those callbacks can observe get_current_snapshot_index()/is_time_traveling() as time-traveling and never learn that the restored timeline is back at live head.

Severity: medium


🤖 Was this useful? React with 👍 or 👎

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.

2 participants