Skip to content

Release 0.28.0#1002

Merged
Tim020 merged 3 commits into
mainfrom
dev
May 8, 2026
Merged

Release 0.28.0#1002
Tim020 merged 3 commits into
mainfrom
dev

Conversation

@Tim020
Copy link
Copy Markdown
Contributor

@Tim020 Tim020 commented May 8, 2026

No description provided.

Tim020 and others added 2 commits May 8, 2026 21:23
…1001)

* Fix page-boundary corruption when line_parts count changes on PATCH

deep-object-diff classifies a line index as "added" whenever any nested
property is new (e.g. an extra line_part). The backend "added" branch
created a new ScriptLineRevisionAssociation without removing the old one,
leaving two associations both satisfying the first-line-of-page condition
and breaking the GET endpoint with "Failed to establish page line order".

Frontend: filter deepDiff.added by null id — existing lines with nested
additions are reclassified as updated before being sent to the server.

Backend: precompute is_truly_new / is_updated so existing-id lines in
status["added"] route through the update path, not the create path.

Migration: 897ae2963f6d repairs any already-corrupted linked lists on all
revisions, using max(line_id) to select the correct bridge line when
duplicates exist, and cleans up orphaned script_lines / script_line_parts.

Tests: two regression tests in TestPatchLinePartCountChange verify that
both a single-page and cross-page-boundary PATCH return 200 after a
line_parts count increase with status=added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add frontend unit tests for deepDiff page-status classification

Extract the deepDiff + status-building logic from SAVE_CHANGED_PAGE into
a pure exported helper (computePageStatus) so it can be tested without
a Vuex store. Add 7 Vitest tests covering: existing line whose line_parts
grew (must go to updated, not added), truly new line (added), top-level
field change (updated), deleted/inserted pass-through, mixed page, and
no-change baseline.

Tests 1 and 6 fail when the id != null filter is removed, confirming they
catch the original deep-object-diff misclassification regression.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Extract shared SQL helpers to eliminate migration duplication

Create alembic_config/repair_linked_list_utils.py with the common
building blocks (fetch_page_associations, build_page_ordered,
build_global_order, compute_expected_pointers, fetch_current_pointers,
collect_pointer_updates, delete_orphan_associations, apply_pointer_updates,
fetch_all_revision_ids) shared by both repair migrations.

Refactor c2f8d4a6e0b3 and 897ae2963f6d to import from this module.
The two migrations now differ only in bridge-line selection strategy
(first-found vs max) and in whether they clean up orphaned script_lines/
script_line_parts rows.

Also apply ruff formatting to test_script.py (missed in prior commit).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@Tim020 Tim020 added the release Pull requests for creating a new release label May 8, 2026
@Tim020 Tim020 enabled auto-merge May 8, 2026 20:24
@github-actions github-actions Bot added client Pull requests changing front end code server Pull requests changing back end code xlarge-diff labels May 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Client Test Results

106 tests   106 ✅  0s ⏱️
  5 suites    0 💤
  1 files      0 ❌

Results for commit 08be26e.

♻️ This comment has been updated with latest results.

Comment thread server/alembic_config/versions/897ae2963f6d_repair_linked_list_orphans_max_bridge.py Dismissed
Comment thread server/alembic_config/versions/897ae2963f6d_repair_linked_list_orphans_max_bridge.py Dismissed
Comment thread server/alembic_config/versions/897ae2963f6d_repair_linked_list_orphans_max_bridge.py Dismissed
Comment thread server/alembic_config/versions/897ae2963f6d_repair_linked_list_orphans_max_bridge.py Dismissed
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Python Test Results

  1 files    1 suites   1m 18s ⏱️
587 tests 587 ✅ 0 💤 0 ❌
592 runs  592 ✅ 0 💤 0 ❌

Results for commit 08be26e.

@Tim020 Tim020 merged commit 2df419a into main May 8, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Pull requests changing front end code release Pull requests for creating a new release server Pull requests changing back end code xlarge-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant