Skip to content

Pin the office's copy, split and delete flow: deleting one of four routes merges its orders into route 1 and keeps every order - #524

Merged
OziinG merged 1 commit into
mainfrom
test/route-group-copy-split-delete-scenario
Oct 11, 2026
Merged

OziinG merged 1 commit into
mainfrom
test/route-group-copy-split-delete-scenario

Conversation

@OziinG

@OziinG OziinG commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Test-only. Two integration scenarios pin the office's copy → split → delete flow for both office paths: 40 orders, REFERENCE copy, four unnamed routes of ten (the copied route stays route 1), delete the second route. Result on main today: 20 + 10 + 10, route 1 holds the deleted route's ten orders, the copy and the source keep their 40 memberships, every order stays assigned, no order is deleted.

Why. Owner question of 2026-10-11: "40 → 10 + 10 + 10 + 10에서 10을 지우면 1번 경로에 복속 되는 느낌?" — the scenario review before a UI rehearsal with test orders. Both paths behave that way with #522 and shopify-clever#385 in place; no runtime change was needed.

Validation. Route-grouping integration suite (57) on a disposable local PostgreSQL 17, ESLint on the file.

Refs #518
Change control: EVNSolution/clever-change-control#349

🤖 Generated with Claude Code

…utes merges its orders into route 1 and keeps every order

The owner asked whether a copied group split into four routes of ten keeps its orders when one route is deleted and whether those ten orders join route 1. Two integration scenarios now pin it for both office paths (Routes list: DELETE then draft save of the remaining routes; Route Detail: one draft save with deletedRoutePlanIds): the copy ends with 20 + 10 + 10, route 1 holds the deleted route's orders, the copy and the source keep their 40 memberships, and every order stays assigned. No runtime change.

Constraint: the split keeps the copied route as route 1 and adds the other routes, as the office app does; a draft that omits a current route is rejected by the envelope check.
Confidence: high
Scope-risk: narrow
Tested: route-grouping integration suite on a disposable local PostgreSQL 17 (57 incl. the two new), eslint on the file.
Not-tested: the same flow through the office UI (rehearsal with test orders follows).

Refs #518
Change control: EVNSolution/clever-change-control#349

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@OziinG
OziinG merged commit e48d1c6 into main Oct 11, 2026
2 checks passed
@OziinG
OziinG deleted the test/route-group-copy-split-delete-scenario branch October 11, 2026 02:58
OziinG added a commit that referenced this pull request Oct 11, 2026
… be reviewed against the current route-grouping and completion code

PR #483 was 29 commits behind main and GitHub reported it CONFLICTING. This merge
takes main's live route change, cash receipt, delivery options and route-group
deletion changes, and keeps the DSV execution hooks beside them.

Constraint: main #522-#524 stopped cancelling sibling routes when a child route is deleted, so the DSV close hook for cancelled siblings no longer has a target and was dropped.
Rejected: rebase of the 16 DSV commits | each commit would repeat the same 7 conflicts; one merge resolves them once
Rejected: narrow Pick transaction type from the DSV branch | main's live-route validators require the full Prisma.TransactionClient; the export is kept for the DSV command service
Confidence: medium
Scope-risk: moderate
Directive: the child publish transaction now runs main's membership lock and authority checks before the DSV CURRENT-guarded publish and execution sync; keep that order.
Tested: prisma generate/validate, tsc, vitest 3437 pass (7 web-asset tests pass after route-ops-web build), DSV PostgreSQL integration 63 pass, typed eslint, env-authority
Not-tested: CI on this merge, production migration order, real FCM or vehicle GPS

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant