Repository navigation
ScopeKey, inspection, authored-path retention; delete HistoryMigration (1.4.0) - #27
Merged
Merged
Conversation
Scope ids were plain strings whose '::' grammar was restated at every use: joining, ancestors, descendant tests, depth and last segment. ScopeKey, a str subclass, owns that grammar once; the registry stores its states under ScopeKey keys and every hierarchy operation calls it. Containment is by whole segments, so /plate1 no longer looks like a parent of /plate10 to callers that used a bare prefix test. get_root_from_scope_key and is_scope_affected, which nothing called, are replaced by ScopeKey.root and ScopeKey.contains. Restoring the global scope still restores no descendant parameters: the global scope provides context to every scope and owns none of their state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A history document is current or refused. The one application that passed a converter (OpenHCS's desktop history upgrade) deleted it: desktop histories are runtime state and reset on upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MAIN_BRANCH replaces four 'main' literals, so callers that fall back to the main branch (deleting the current branch) name it through the registry. is_restoring_snapshot() is the public reading of the restore-in-progress flag that view libraries read privately to refresh widget values after time travel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fields explicit A lazy dataclass rebuilt from ObjectState's flattened fields reads every field as explicitly set. Clean code generation needs only the authored paths, which ObjectState already tracks as signature-diff fields. The function lived in an application's serializer while touching only ObjectState's lazy metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FieldInspection reads one field's raw and resolved value (an unresolvable value is reported unavailable), its dirty and signature-diff state, whether it inherits, its provenance and type names. field_markers/state_markers own the '*' (dirty) and '_' (differs from signature default) markers views prefix to fields; applications wrote that rule in each view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Added: ScopeKey; objectstate.inspection (FieldInspection, field_markers, state_markers); retain_only_authored_paths; ObjectStateRegistry.MAIN_BRANCH and is_restoring_snapshot(). Removed: HistoryMigration and the migration= parameter of import_history_from_dict/load_history_from_file (a history document is current or refused); get_root_from_scope_key and is_scope_affected (ScopeKey.root and ScopeKey.contains). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… two unused scope helpers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of OpenHCS surface U3 (generic Qt and ObjectState machinery leaves OpenHCS). Version 1.4.0. Commits, each reviewable alone:
ScopeKeyowns the scope hierarchy grammar. Astrsubclass withof,child,parent,root,ancestors(),contains,strictly_contains,depth,last,partsand oneSEPARATOR. Registry keys areScopeKeys; the hand-written::joins, ancestor lists, prefix tests and depth counts in the registry andObjectStatecall it. Containment is by whole segments.get_root_from_scope_keyandis_scope_affected(no callers) are deleted. Restoring the global scope still restores no descendant parameters.HistoryMigrationandmigration=. A history document is current or refused; the only converter (OpenHCS's desktop history upgrade) was deleted by OpenHCS U5.MAIN_BRANCHandis_restoring_snapshot(). The main branch is named once; view libraries read the restore flag publicly instead of_in_time_travel.retain_only_authored_paths. Moved from OpenHCS's serializer: a lazy dataclass copy marking only the authored (signature-diff) paths explicit.objectstate.inspection.FieldInspection(raw/resolved value, edit state, inheritance, provenance, type names) andfield_markers/state_markers, the one owner of the*/_marker rule.Removed public API:
HistoryMigration, themigration=parameter,get_root_from_scope_key,is_scope_affected. The owner may prefer 2.0.0 for that; OpenHCS pinsobjectstate>=1.4,<2.Tests: the suite passes locally (225 passed), including new
test_scope_key.py,test_inspection.py,test_authored_paths.py.Release order for the U3 train: python-introspect 0.2.6 → ObjectState 1.4.0 → pyqt-reactive 0.5.0 → OpenHCS repin. Not tagged or released; the owner releases.
🤖 Generated with Claude Code