Repository navigation
fix: keep the legacy interpolator load backward compatible until the next major release (spec 005 S3) - #400
Merged
Conversation
…he next major release A legacy interpolator payload with no choice of the caller loads with the identity frame, as older releases did, and emits one FutureWarning. A module switch, _STRICT_LEGACY, carries a note to remove the fallback at the next major release, when the loader raises an error. A partial transform, a conflict, a malformed payload and an unsupported version still raise. Update the ROADMAP.md decision, the COMPAT.md rows and verification.md, and correct the P2 fit figures (issue #399). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
…arn only after a successful load The FutureWarning for a legacy payload with no choice used a fixed stacklevel. It pointed at a library file for from_json and from_yaml, and one frame too high for a direct factory call. It also came before a later failure of the same call. Add warn_legacy_identity, which computes the stacklevel to the first frame outside the package, and call it as the last step of a successful load. Add tests for the four entry points and for a failed load. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
This was referenced Nov 5, 2026
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.
Summary
PR #397 (stage S3 of spec 005) merged before these three commits were pushed. This pull request adds them. It makes the legacy-load change of #397 backward compatible on the 1.x line (decision C-018).
format_versionand no caller choice raisesInterpolatorFormatError. This is a break of the 1.x public behaviour.FutureWarning. The warning nameslocal_originandlocal_rotation,declare_identity=True, and the next major release.InterpolatorFormatError.from_dict,from_json,from_yamland the factory all show the user's call. It is emitted last, so a failed load gives no warning._STRICT_LEGACYin_frame_persistence.pyis the one switch. The comment says "REMOVE AT THE NEXT MAJOR RELEASE (spec 005, C-018)". At the major release, delete the fallback,warn_legacy_identityand_external_stacklevel.ROADMAP.mdrecords the decision.COMPAT.mdmoves the legacy-load row to the deprecation table (earliest removal: the next major release).verification.mdandrun-state.jsonrecord the gates.The P2 fit accuracy found in S3 is tracked in #399.
Test plan
ruff check LoopStructural packages: pass (on the original branch; the code tree is identical)pytest packages/loop_common/tests packages/loop_interpolation/tests: 912 passed, 47 skipped, 2 xfailedpytest(root): 1994 passed, 5 skippedtest_frame_persistence.py(184 in total): warn and load identity, strict switch raises, warning points at the caller (dict, json, yaml, factory), no warning when the load fails.These three commits were cherry-picked onto
masterwith no conflict. The tree matches the tested branch, but I did not re-run the suites after the cherry-pick.🤖 Generated with Claude Code
https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1