Skip to content

Preserve typed ObjectState history across restarts - #5

Merged
trissim merged 1 commit into
mainfrom
codex/typed-history-document
Jul 30, 2026
Merged

Preserve typed ObjectState history across restarts#5
trissim merged 1 commit into
mainfrom
codex/typed-history-document

Conversation

@trissim

@trissim trissim commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • persist ObjectState history with dill so Paths, enums, dataclasses, callable objects, and graph identity survive application restarts
  • remove the obsolete JSON compatibility import paths instead of maintaining a second lossy persistence contract
  • derive documentation release metadata from the package and add typed-history regression coverage
  • release ObjectState 1.0.23

Verification

  • 160 ObjectState tests passed on Python 3.13
  • no Ruff diagnostics on added lines
  • full fatal Ruff checks passed
  • real initialized OpenHCS GUI history saved and restored with typed Paths and an edited nested UIConfig field
  • sdist and wheel built; twine check passed

Copilot AI review requested due to automatic review settings July 30, 2026 22:34

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

@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 2 suggestions.

Fix in Cosmos

Comment thread README.md
# Or save to file
ObjectStateRegistry.save_history_to_file("history.json")
ObjectStateRegistry.load_history_from_file("history.json")
ObjectStateRegistry.save_history_to_file("history.objectstate")

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🐛

The README example now points users at history.objectstate, but docs/undo_redo.rst still documents save_history_to_file() / load_history_from_file() as JSON persistence. That generated documentation will describe the removed JSON contract after this PR, which can mislead users into treating the new dill file as portable JSON.

Severity: low


🤖 Was this useful? React with 👍 or 👎



def _reset_registry_history() -> None:
ObjectStateRegistry._snapshots.clear()

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🐛

This helper leaves the typed_history ObjectState registered in ObjectStateRegistry._states, so later tests in the same process can capture it in unrelated snapshots or import histories against the wrong scope set. Because the registry is global and conftest.py does not reset it between tests, this persistence test can make the suite order-dependent.

Severity: medium


🤖 Was this useful? React with 👍 or 👎

@trissim
trissim merged commit bed7382 into main Jul 30, 2026
11 checks passed
@trissim
trissim deleted the codex/typed-history-document branch July 30, 2026 22:39
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