Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
trissim
force-pushed
the
work/commander-layout--P927--objectstate
branch
from
October 30, 2026 01:40
1b67e45 to
6c6d474
Compare
…--P927--objectstate
This branch has not been deployed
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.
P927: native member topology, saved reads and history
3 commits, 7 files, +505/−496 against current main.
object_state.py: 2847 → 2625 lines. Two prefix-parsing reconstruction walks → zero. Two field-admission rules → one. Six downstream dataclass-shape retests → zero on the reviewed paths.Published source:
1f859f06f70accd8c524a69b196d2837b0d79c70. Source changes only; all authored controls remain UNRUN. No author checker, product imports, application/provider execution, sync or installation.Native edit: prepare once, publish once
Before, mutation admitted only existing children. Replacing unrelated native members retained obsolete children and owners.
ObjectState._prepare_parameter_updatenow prepares the actual subtree through the same_admit_parameteroperation used by recursive extraction, retires obsolete descendants, rebuilds affected native ancestors, and uses the validated rebuilt root rather than discarding it. Siblings and exclusions survive. Failed preparation precedes all publication/history/notifications.ParameterStructure.admit_containerrecords actual container membership, including zero-child records. Reconstruction consumesdirect_paths; descendants and ordering derive fromDottedFieldPath.contains_pathand lineage. A zero-child record is still a leaf value for dirty comparison, but its recorded container identity reconstructs its actual native type.Saved epoch: build at publication, not per read
The first checkpoint rebuilt the entire saved graph at every saved read. That was BOUND-1 slop: the saved topology was repeatedly inferred outside its publication.
ObjectState._refresh_saved_resolvednow builds and publishes_saved_resolvedand its matching_saved_structuretogether. Saved getters, source comparisons and registry invalidation reuse that epoch. Mark-saved, ancestor-source refresh and explicit restore replace it through the same operation. This is the saved resolved epoch's structure, not an independently refreshed cache or another writable member value.apply_prepared_constructionattaches both historical live and saved structures from its prepared schema. The rejectedsaved_structureargument threading through registry restore methods was deleted. Local transaction checkpoints retain and restore the matching saved structure with saved resolved values. No snapshot file format or alternate history mechanism was added.History: captured member before schema filtering
_parameter_epochextracts captured native live/saved graphs before_reconcile_snapshot_schemafilters paths. PreparedStateRestore retains scope/parent/delegation validation and atomic publication. Genuinely removed root declarations are still filtered. A union member change no longer resurrects the constructor's obsolete child names.Deleted mechanisms
_reconstruct_from_prefix, a forwarding-only entry point.reconstruct_top_level_parametersowns it. Its explicit delegate-sync argument preserves the existing no-sync reconstruction path without a second walk.Source evidence and limits
Retained source map: ObjectState production30 modules and controls40, zero parse omissions; dependency map covers formbridge/python-introspect. Updated AST-only working map covers12 affected provider/form/control files; dynamic annotations/lazy resolution remain semantic reads, not an AST execution proof. Publication commands/results are retained in
p927-provider-review-publication.logandp927-provider-attachment-publication.log. No ratchet or test was run by the author.Base provider3f795a7 was production-identical to pinned b5dd9f7. Old unready ObjectState#62 stays untouched: its unique migration still needs python-introspect#25 (
2518631cb,resolve_declared_type), absent from current python-introspect main. This PR neither activates nor discards that work.Authored controls — UNRUN
tests/test_native_member_topology.py: unrelated records, empty record, None/scalar/return transitions; exact paths/metadata/notifications, siblings/exclusions, saved native values and stable saved epoch across repeated reads, dirty until mark_saved, atomic failed preparation, real registry undo/redo.tests/test_object_state_update_instance.py: actual replacement topology without mocking a deleted helper; absent-baseline behavior preserved explicitly.tests/test_construction_history.py: saved-context assertion uses the public saved-value owner rather than the retired private computation signature.Root owns one narrowed matched provider/Core/actual-form qualification, then the private New/Fork application journey. Core#3595 merges first; this provider and ToAD#1322 must match in the actual lock before qualification. Install Core with the matching ToAD, not Core alone. P916 retains its separate installed physical acceptance.
Assumed: source publication is not test, installation or application success. Other dependency pins must remain unchanged.